Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AuthenticationHandlerCallback

Single-use callback provided to the onAuthenticate call.

The server calls the handlers for each authentication request. Each handler must respond allow, abstain, or deny.

The handler may provide additional information to the allow method with a user-supplied AuthenticationResult object.

Authentication handlers are configured in precedence order. Authentication will succeed if a handler returns 'allow' and all higher precedence handlers (earlier in the order) return 'abstain'. Authentication will fail if a handler returns 'deny' and all higher precedence handlers return 'abstain'. If all authentication handlers return 'abstain', the request will be denied. Once the outcome is known, the server may choose not to call the remaining handlers.

deprecated

since 6.3

This interface is part of the deprecated AuthenticationHandler API. Use the new Authenticator API instead.

Hierarchy

  • AuthenticationHandlerCallback

Index

Methods

Methods

abstain

  • abstain(): void
  • Abstain from deciding on the authentication request

    Returns void

allow

  • Authentication passed - allow the authentication request

    Example:

    // Basic allow
    callback.allow();
    
    // Allow with AuthenticationResult
    callback.allow({
        roles : ['SOME_ROLE'],
        properties : {
            MyPropertyKey : 'MyPropertyValue'
        }
    });

    Parameters

    • Optional result: AuthenticationResult

      optional roles/properties to assign to the authenticated session

    Returns void

deny

  • deny(): void
  • Authentication failed - deny the authentication request.

    Returns void