Options
All
  • Public
  • Public/Protected
  • All
Menu

jamalta-oidc-client

Index

Type Aliases

IssuerOptions: { cacheEnabled?: boolean; cacheTTL?: number }

Store the issuer options in case there is anything custom

Type declaration

  • Optional cacheEnabled?: boolean
  • Optional cacheTTL?: number

Functions

  • authenticate(issuer: JAMaltaIssuer): ((req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void)
  • Authentication Middleware is the function called when one wants to make sure that the user is properly authenticated. If the user is not authenticated, they will be redirected to the login page. Once the login is complete, the user continues where they left off.

    This also sets req information such as jaUserInfo and tokenCode for future usage if needed.

    Parameters

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

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

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

        Returns void

  • callbackMiddleware(issuer: JAMaltaIssuer, useRedirect: boolean, uri?: number): ((req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void)
  • Callback Middleware is the function that will handle the token verification during the callback. This will also set the cookie with the Bearer token (aka code).

    Parameters

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

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

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

        Returns void

  • logoutMiddleware(issuer: JAMaltaIssuer): ((req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void)
  • Parameters

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

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

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

        Returns void

Generated using TypeDoc