public class CrowdAuthenticationProviderMock extends Object implements org.springframework.security.authentication.AuthenticationProvider
AuthenticationProvider
which is using our CrowdAuthenticationProviderMock
to manage users.Constructor and Description |
---|
CrowdAuthenticationProviderMock(CrowdUserDetailsServiceMock userDetailsService)
Constructor for CrowdAuthenticationProviderMock.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication)
Performs authentication with the same contract as
AuthenticationManager.authenticate(Authentication) . |
boolean |
supports(Class<?> authentication)
Returns
true if this AuthenticationProvider supports the indicated
Authentication object. |
public CrowdAuthenticationProviderMock(CrowdUserDetailsServiceMock userDetailsService)
Constructor for CrowdAuthenticationProviderMock.
userDetailsService
- a CrowdUserDetailsServiceMock
object.public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
AuthenticationManager.authenticate(Authentication)
.authenticate
in interface org.springframework.security.authentication.AuthenticationProvider
org.springframework.security.core.AuthenticationException
public boolean supports(Class<?> authentication)
true
if this AuthenticationProvider
supports the indicated
Authentication
object.
Returning true
does not guarantee an AuthenticationProvider
will be able to
authenticate the presented instance of the Authentication
class. It simply indicates it can support
closer evaluation of it. An AuthenticationProvider
can still return null
from the
authenticate(Authentication)
method to indicate another AuthenticationProvider
should be
tried.
Selection of an AuthenticationProvider
capable of performing authentication is
conducted at runtime the ProviderManager
.
supports
in interface org.springframework.security.authentication.AuthenticationProvider
Copyright © 2011–2016 eXo Platform SAS. All rights reserved.