Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OAuth2AuthHandler

An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.

Hierarchy

  • OAuth2AuthHandler

Implements

Index

Methods

extraParams

  • Extra parameters needed to be passed while requesting a token.

    Parameters

    • extraParams: {}
      • [key: string]: any

    Returns OAuth2AuthHandler

handle

pkceVerifierLength

  • PKCE (RFC 7636) is an extension to the Authorization Code flow to prevent several attacks and to be able to securely perform the OAuth exchange from public clients.

    It was originally designed to protect mobile apps, but its ability to prevent authorization code injection makes it useful for every OAuth client, even web apps that use a client secret.

    Parameters

    • length: number

    Returns OAuth2AuthHandler

prompt

  • Indicates the type of user interaction that is required. Not all providers support this or the full list.

    Well known values are:

    • login will force the user to enter their credentials on that request, negating single-sign on.
    • none is the opposite - it will ensure that the user isn't presented with any interactive prompt whatsoever. If the request can't be completed silently via single-sign on, the Microsoft identity platform endpoint will return an interaction_required error.
    • consent will trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app.
    • select_account will interrupt single sign-on providing account selection experience listing all the accounts either in session or any remembered account or an option to choose to use a different account altogether.

    Parameters

    • prompt: string

    Returns OAuth2AuthHandler

setupCallback

  • add the callback handler to a given route.

    Parameters

    Returns OAuth2AuthHandler

withScope

  • Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance.

    Parameters

    • scope: string

    Returns OAuth2AuthHandler

withScopes

  • Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance.

    Parameters

    • scopes: string

    Returns OAuth2AuthHandler

Static create

  • Create a OAuth2 auth handler with host pinning

    Parameters

    • vertx: Vertx
    • authProvider: OAuth2Auth
    • callbackURL: string

    Returns OAuth2AuthHandler

  • Create a OAuth2 auth handler without host pinning. Most providers will not look to the redirect url but always redirect to the preconfigured callback. So this factory does not provide a callback url.

    Parameters

    • vertx: Vertx
    • authProvider: OAuth2Auth

    Returns OAuth2AuthHandler

Generated using TypeDoc