T - Authentication token typeA - Spring Security Authentication typepublic class AuthenticationProviderAdapter<T extends AuthenticationToken,A extends org.springframework.security.core.Authentication> extends Object implements org.springframework.security.authentication.AuthenticationProvider
Authenticator as a Spring Security AuthenticationProvider.| Constructor and Description |
|---|
AuthenticationProviderAdapter(Authenticator<T> authenticator,
Class<A> authenticationType,
Function<A,T> converter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
boolean |
supports(Class<?> authentication) |
public AuthenticationProviderAdapter(Authenticator<T> authenticator, Class<A> authenticationType, Function<A,T> converter)
authenticator - Authenticator (not null)authenticationType - Supported Spring Security Authentication typeconverter - Function to convert the Spring Security Authentication into the required
AuthenticationToken type.public boolean supports(Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProviderpublic org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate in interface org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationExceptionCopyright © 2019 The Holon Platform. All rights reserved.