import type { HonoRequest } from 'hono'; import type { CredentialsResult } from '../auth/index.js'; import type { MastraAuthProviderOptions } from './auth.js'; import { MastraAuthProvider } from './auth.js'; type TokenToUser = Record; export interface SimpleAuthOptions extends MastraAuthProviderOptions { /** * Valid tokens to authenticate against */ tokens: TokenToUser; /** * Headers to check for authentication * @default ['Authorization', 'X-Playground-Access'] */ headers?: string | string[]; } export declare class SimpleAuth extends MastraAuthProvider { /** * Marker to exempt SimpleAuth from EE license requirement. * SimpleAuth is for development/testing and should work without a license. */ readonly isSimpleAuth = true; private tokens; private headers; private users; private userById; constructor(options: SimpleAuthOptions); authenticateToken(token: string, request: HonoRequest): Promise; authorizeUser(user: TUser, _request: HonoRequest): Promise; /** Get current user from request headers or cookie. */ getCurrentUser(request: Request): Promise; private getUserFromCookie; /** Get user by ID. */ getUser(userId: string): Promise; /** * Sign in with token (passed as password field). * The email field is ignored - only the token matters. */ signIn(_email: string, password: string, _request: Request): Promise>; signUp(): Promise>; isSignUpEnabled(): boolean; /** * Get headers to clear the session cookie on logout. * Partial ISessionProvider implementation for logout support. */ getClearSessionHeaders(): Record; private stripBearerPrefix; /** * Get a header value from either a HonoRequest or standard Request. * The auth middleware passes a raw Request (c.req.raw), not a HonoRequest, * so we need to handle both APIs. */ private getRequestHeader; private getTokensFromHeaders; } export {}; //# sourceMappingURL=simple-auth.d.ts.map