Interface AuthenticationResultBuilder

  • All Superinterfaces:
    java.io.Serializable

    public interface AuthenticationResultBuilder
    extends java.io.Serializable
    This is AuthenticationResultBuilder. It attempts to collect authentication objects and will put the computed finalized primary Authentication into AuthenticationResult. Concurrency semantics: implementations MUST be thread-safe. Instances of this class should never be declared as a field. Rather they should always be passed around to methods that need them.
    Since:
    4.2.0
    • Method Detail

      • getInitialAuthentication

        java.util.Optional<Authentication> getInitialAuthentication()
        Gets the initial authentication.
        Returns:
        the initial authentication
      • getInitialCredential

        java.util.Optional<Credential> getInitialCredential()
        Gets initial credential.
        Returns:
        the initial credential
      • collect

        AuthenticationResultBuilder collect​(Authentication authentication)
        Collect authentication objects from any number of processed authentication transactions.
        Parameters:
        authentication - the authentication
        Returns:
        the authentication result builder
      • collect

        AuthenticationResultBuilder collect​(Credential credential)
        Provided credentials immediately by the user.
        Parameters:
        credential - the credential
        Returns:
        the authentication context builder
      • build

        AuthenticationResult build​(PrincipalElectionStrategy principalElectionStrategy)
        Build authentication result.
        Parameters:
        principalElectionStrategy - a principalElectionStrategy to use
        Returns:
        the authentication result
      • build

        AuthenticationResult build​(PrincipalElectionStrategy principalElectionStrategy,
                                   Service service)
        Build authentication result.
        Parameters:
        principalElectionStrategy - a principalElectionStrategy to use
        service - the service
        Returns:
        the authentication result