Class SimulatedAuthenticationProvider
java.lang.Object
se.swedenconnect.spring.saml.idp.authentication.provider.AbstractUserAuthenticationProvider
se.swedenconnect.spring.saml.idp.authentication.provider.external.AbstractUserRedirectAuthenticationProvider
se.swedenconnect.spring.saml.idp.demo.authn.SimulatedAuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider,UserRedirectAuthenticationProvider,UserAuthenticationProvider
Simulated authentication provider.
- Author:
- Martin Lindström
-
Constructor Summary
ConstructorsConstructorDescriptionSimulatedAuthenticationProvider(String authnPath, String resumeAuthnPath) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets 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.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 theUserRedirectAuthenticationProvider.getResumeAuthnPath().booleansupportsUserAuthenticationToken(org.springframework.security.core.Authentication authentication) Predicate that tells whether this provider supports the suppliedAuthenticationobject.Methods inherited from class se.swedenconnect.spring.saml.idp.authentication.provider.external.AbstractUserRedirectAuthenticationProvider
authenticate, getAuthnPath, getResumeAuthnPath, getTokenRepository, setTokenRepositoryMethods inherited from class se.swedenconnect.spring.saml.idp.authentication.provider.AbstractUserAuthenticationProvider
applySso, authenticateUser, filterRequestedAuthnContextUris, ssoVotersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.swedenconnect.spring.saml.idp.authentication.provider.UserAuthenticationProvider
authenticateUserMethods inherited from interface se.swedenconnect.spring.saml.idp.authentication.provider.external.UserRedirectAuthenticationProvider
authenticate, supports
-
Constructor Details
-
SimulatedAuthenticationProvider
Constructor.- Parameters:
authnPath- the path to where we redirect the user for authenticationresumeAuthnPath- the path that the authentication process uses to redirect the user back after a completed authentication
-
-
Method Details
-
getName
Gets the name of the provider.- Returns:
- the name of the provider
-
getSupportedAuthnContextUris
Gets the supported authentication context URI:s for the provider.- Returns:
- a list of the authenticator's supported authentication context URI:s
-
getEntityCategories
Gets a list of all SAML entity categories that thisAuthenticationProviderdeclares.- Returns:
- a list of entity category URI:s
-
resumeAuthentication
public Saml2UserAuthentication resumeAuthentication(ResumedAuthenticationToken token) throws Saml2ErrorStatusException 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 theUserRedirectAuthenticationProvider.getResumeAuthnPath().- Parameters:
token- theResumedAuthenticationToken- 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 suppliedAuthenticationobject. With "supports" in this case we mean: Can the supplied object be interpreted and give the input in the creation of aSaml2UserAuthenticationtoken.- Parameters:
authentication- theAuthenticationobject to test- Returns:
trueif the object is supported andfalseotherwise
-