import { ExecutionContext } from "@nestjs/common"; import { AuthHandler, AuthData, AuthRequestLike } from "@decaf-ts/for-http/server"; import { DecafRequestContext } from "../request/DecafRequestContext.d.cts"; /** * Simple auth handler that reads a role string from the `Authorization: Bearer ` header. * * Only overrides {@link AuthHandler.extractFromRequest} to return the bearer token as * both the user identifier and the single role. The base class `bindToContext` * (`ctx.accumulate(data)`) is sufficient — the transformer/adapter is responsible * for mapping context fields to adapter-specific keys like `UUID`. */ export declare class DecafAuthHandler extends AuthHandler { protected isPublicRequest(_request: AuthRequestLike): boolean; protected parseRequest(req: any): string | undefined; protected requestFromContext(ctx: ExecutionContext): any; protected extractFromRequest(req: any): AuthData; } /** * Alias for {@link DecafAuthHandler} kept for backward compatibility. * The "role" variant previously returned roles from `authorize`; with the base * class now orchestrating role checks internally, the two classes are equivalent. */ export declare class DecafRoleAuthHandler extends DecafAuthHandler { }