Class BankIdAuthenticationProvider

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

public class BankIdAuthenticationProvider extends AbstractUserRedirectAuthenticationProvider
The BankID AuthenticationProvider.
Author:
Martin Lindström, Felix Hellman
  • Constructor Details

    • BankIdAuthenticationProvider

      public BankIdAuthenticationProvider(String authnPath, String resumeAuthnPath, List<String> supportedAuthnContextUris, List<String> entityCategories)
      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
      supportedAuthnContextUris - the supported LoA:s
      entityCategories - declared/supported entity categories
  • Method Details

    • resumeAuthentication

      Throws:
      Saml2ErrorStatusException
    • supportsUserAuthenticationToken

      public boolean supportsUserAuthenticationToken(org.springframework.security.core.Authentication authentication)
    • setName

      public void setName(String name)
      Assigns the provider name.
      Parameters:
      name - the provider name
    • getName

      public String getName()
    • getSupportedAuthnContextUris

      public List<String> getSupportedAuthnContextUris()
    • getAuthnContextUri

      protected String getAuthnContextUri(BankIdAuthenticationToken token)
      Returns the authentication context URI that should be used for the operation.

      The BankID IdP should only be configured with one URI and the default implementation uses the first URI in the list of supported URI:s.

      Parameters:
      token - the BankID authentication token
      Returns:
      the URI
    • getEntityCategories

      public List<String> getEntityCategories()