Options
All
  • Public
  • Public/Protected
  • All
Menu

Handle authentication with Kubernetes JSON Web Token.

Index

Functions

Functions

Const makeTokenProcessor

  • makeTokenProcessor(name: string): (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>) => string
  • Returns a function to parse the JSON Web Token from:

    • Authorization header if supplied
    • An HttpOnly Cookie

    If the token cannot be parsed, an OperatorError will be thrown. Otherwise, the HttpOnly Cookie will be set and the token will be returned.

    Parameters

    • name: string

      Name of the HttpOnly Cookie.

    Returns (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>) => string

    Token parser function.

      • (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>): string
      • Parameters

        • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
        • res: Response<any, Record<string, any>>

        Returns string

Generated using TypeDoc