Class SimulatedAuthenticationProvider

All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider, UserRedirectAuthenticationProvider, UserAuthenticationProvider

public class SimulatedAuthenticationProvider extends AbstractUserRedirectAuthenticationProvider
Simulated authentication provider.
Author:
Martin Lindström
  • Constructor Details

    • SimulatedAuthenticationProvider

      public SimulatedAuthenticationProvider(String authnPath, String resumeAuthnPath)
      Constructor.
      Parameters:
      authnPath - the path to where we redirect the user for authentication
      resumeAuthnPath - the path that the authentication process uses to redirect the user back after a completed authentication
  • Method Details

    • getName

      public String getName()
      Gets the name of the provider.
      Returns:
      the name of the provider
    • getSupportedAuthnContextUris

      public List<String> getSupportedAuthnContextUris()
      Gets the supported authentication context URI:s for the provider.
      Returns:
      a list of the authenticator's supported authentication context URI:s
    • getEntityCategories

      public List<String> getEntityCategories()
      Gets a list of all SAML entity categories that this AuthenticationProvider declares.
      Returns:
      a list of entity category URI:s
    • resumeAuthentication

      Is invoked when the user has been authenticated outside the SAML IdP Spring Security flow and the user agent has been re-directed back to the UserRedirectAuthenticationProvider.getResumeAuthnPath().
      Parameters:
      token - the ResumedAuthenticationToken
      Returns:
      a Saml2UserAuthentication
      Throws:
      Saml2ErrorStatusException - for authentication errors
    • supportsUserAuthenticationToken

      public boolean supportsUserAuthenticationToken(org.springframework.security.core.Authentication authentication)
      Predicate that tells whether this provider supports the supplied Authentication object. With "supports" in this case we mean: Can the supplied object be interpreted and give the input in the creation of a Saml2UserAuthentication token.
      Parameters:
      authentication - the Authentication object to test
      Returns:
      true if the object is supported and false otherwise