Interface ChainAuth

All Superinterfaces:
AuthenticationProvider

public interface ChainAuth extends AuthenticationProvider
Chain several authentication providers as if they were one. This is useful for cases where one want to authenticate across several providers, for example, database and fallback to passwd file.
  • Method Summary

    Modifier and Type
    Method
    Description
    Appends a auth provider to the chain.
    static ChainAuth
    all()
    Create a Chainable Auth Provider auth provider that will resolve if all auth providers are successful.
    static ChainAuth
    any()
    Create a Chainable Auth Provider auth provider that will resolve on the first success.

    Methods inherited from interface AuthenticationProvider

    authenticate
  • Method Details

    • all

      static ChainAuth all()
      Create a Chainable Auth Provider auth provider that will resolve if all auth providers are successful.
      Returns:
      the auth provider
    • any

      static ChainAuth any()
      Create a Chainable Auth Provider auth provider that will resolve on the first success.
      Returns:
      the auth provider
    • add

      Appends a auth provider to the chain.
      Parameters:
      other - auth provider
      Returns:
      self