Class ApiTokenAuthenticationProvider
java.lang.Object
org.genesys.blocks.tokenauth.spring.ApiTokenAuthenticationProvider
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,org.springframework.core.Ordered,org.springframework.security.authentication.AuthenticationProvider
public class ApiTokenAuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered
API Token authentication provider
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) Authenticate the given PreAuthenticatedAuthenticationToken.intgetOrder()voidsetOrder(int i) final booleanIndicate that this provider only supports PreAuthenticatedAuthenticationToken (sub)classes.
-
Constructor Details
-
ApiTokenAuthenticationProvider
public ApiTokenAuthenticationProvider()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException Authenticate the given PreAuthenticatedAuthenticationToken.If the principal contained in the authentication object is null, the request will be ignored to allow other providers to authenticate it.
- Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
supports
Indicate that this provider only supports PreAuthenticatedAuthenticationToken (sub)classes.- Specified by:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int i)
-