Interface UserAuthenticationProvider
- All Superinterfaces:
org.springframework.security.authentication.AuthenticationProvider
- All Known Subinterfaces:
UserRedirectAuthenticationProvider
- All Known Implementing Classes:
AbstractUserAuthenticationProvider, AbstractUserRedirectAuthenticationProvider, SimulatedAuthenticationProvider
public interface UserAuthenticationProvider
extends org.springframework.security.authentication.AuthenticationProvider
Interface for an
AuthenticationProvider that implements SAML2 Identity Provider user authentication. The
authenticate(org.springframework.security.core.Authentication) method returns a
Saml2UserAuthentication.
Note: The authentication provider should release all possible attributes about an authentication (user). These will
be filtered by an AttributeProducer before adding attributes to an assertion. The reason for this is that in
SSO-cases another set of attributes may be requested, and if attributes are filtered by the provider we may not be
able to re-use and authentication.
Note that the authenticate(org.springframework.security.core.Authentication) must only return null
under one condition and that is when the requested authentication context(s) can not be met by the authentication
provider.
- Author:
- Martin Lindström
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) org.springframework.security.core.AuthenticationPerforms the user authentication.Gets a list of all SAML entity categories that thisAuthenticationProviderdeclares.getName()Gets the name of the provider.Gets the supported authentication context URI:s for the provider.default booleanSupportsSaml2UserAuthenticationInputToken.
-
Method Details
-
getName
-
authenticate
default org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
authenticateUser
org.springframework.security.core.Authentication authenticateUser(Saml2UserAuthenticationInputToken token) throws Saml2ErrorStatusException Performs the user authentication.- Parameters:
token- the input token- Returns:
- the authentication token or
nullif the requested authentication context(s) can not be met by the authentication provider. - Throws:
Saml2ErrorStatusException- for authentication errors
-
supports
SupportsSaml2UserAuthenticationInputToken.- Specified by:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider
-
getSupportedAuthnContextUris
-
getEntityCategories
-