Interface AuthenticationSystemSupport


  • public interface AuthenticationSystemSupport
    This is AuthenticationSystemSupport - a facade that exposes a high level authentication system API to CAS core.

    This component is to be injected into others where authentication subsystem interaction needs to happen - like performing single authentication transaction, performing a finalized authentication transaction, or finalizing an all authentication transactions that might have been processed and collected.

    This facade also exposes lower level components that implementations use to perform necessary authentication steps, so that clients of this API have the ability to use those components directly if they choose so.

    Since:
    4.2.0
    • Method Detail

      • getAuthenticationTransactionManager

        AuthenticationTransactionManager getAuthenticationTransactionManager()
        Gets authentication transaction manager.
        Returns:
        the authentication transaction manager
      • getPrincipalElectionStrategy

        PrincipalElectionStrategy getPrincipalElectionStrategy()
        Gets principal election strategy.
        Returns:
        the principal election strategy
      • establishAuthenticationContextFromInitial

        AuthenticationResultBuilder establishAuthenticationContextFromInitial​(Authentication authentication,
                                                                              Credential credential)
        Initiate potential multi-transaction authentication event by handling the initial authentication transaction.
        Parameters:
        authentication - a pre-established authentication object in a multi-legged authentication flow.
        credential - a credential for the authentication transaction.
        Returns:
        authentication result builder used to accumulate authentication transactions in this authentication event.
        Since:
        5.0.0
      • establishAuthenticationContextFromInitial

        AuthenticationResultBuilder establishAuthenticationContextFromInitial​(Authentication authentication)
        Establish authentication context from initial authentication result builder.
        Parameters:
        authentication - the authentication
        Returns:
        the authentication result builder
      • handleInitialAuthenticationTransaction

        AuthenticationResultBuilder handleInitialAuthenticationTransaction​(Service service,
                                                                           Credential... credential)
                                                                    throws AuthenticationException
        Initiate potential multi-transaction authentication event by handling the initial authentication transaction.
        Parameters:
        service - the service
        credential - a credential for the initial authentication transaction.
        Returns:
        authentication result builder used to accumulate authentication transactions in this authentication event.
        Throws:
        AuthenticationException - exception to indicate authentication processing failure.
        Since:
        5.0.0
      • handleAuthenticationTransaction

        AuthenticationResultBuilder handleAuthenticationTransaction​(Service service,
                                                                    AuthenticationResultBuilder authenticationResultBuilder,
                                                                    Credential... credential)
                                                             throws AuthenticationException
        Handle single authentication transaction within potential multi-transaction authentication event.
        Parameters:
        service - the service
        authenticationResultBuilder - builder used to accumulate authentication transactions in this authentication event.
        credential - a credential used for this authentication transaction.
        Returns:
        authentication result builder used to accumulate authentication transactions in this authentication event.
        Throws:
        AuthenticationException - exception to indicate authentication processing failure.
        Since:
        5.0.0
      • finalizeAllAuthenticationTransactions

        AuthenticationResult finalizeAllAuthenticationTransactions​(AuthenticationResultBuilder authenticationResultBuilder,
                                                                   Service service)
        Finalize all authentication transactions processed and collected for this authentication event.
        Parameters:
        authenticationResultBuilder - builder used to accumulate authentication transactions in this authentication event.
        service - a service for this authentication event.
        Returns:
        authentication result representing a final outcome of the authentication event.
        Since:
        5.0.0
      • handleAndFinalizeSingleAuthenticationTransaction

        AuthenticationResult handleAndFinalizeSingleAuthenticationTransaction​(Service service,
                                                                              Credential... credential)
                                                                       throws AuthenticationException
        Handle a single-transaction authentication event and immediately produce a finalized AuthenticationResult.
        Parameters:
        service - a service for this authentication event.
        credential - a credential used for this single-transaction authentication event.
        Returns:
        authentication result representing a final outcome of the authentication event.
        Throws:
        AuthenticationException - exception to indicate authentication processing failure.
        Since:
        5.0.0
      • handleAndFinalizeSingleAuthenticationTransaction

        default AuthenticationResult handleAndFinalizeSingleAuthenticationTransaction​(Service service,
                                                                                      java.util.Collection<Credential> credentials)
                                                                               throws AuthenticationException
        Handle a single-transaction authentication event and immediately produce a finalized AuthenticationResult.
        Parameters:
        service - a service for this authentication event.
        credentials - credentials used for this single-transaction authentication event.
        Returns:
        authentication result representing a final outcome of the authentication event.
        Throws:
        AuthenticationException - exception to indicate authentication processing failure.
        Since:
        5.3.0