Class JWTAuthentication
- java.lang.Object
-
- org.apache.syncope.core.spring.security.JWTAuthentication
-
- All Implemented Interfaces:
Serializable,Principal,Authentication
public class JWTAuthentication extends Object implements Authentication
Represents the token for an authentication request or for an authenticated principal as JSON Web Token, once the request has been processed by theAuthenticationManager.authenticate(Authentication)method.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JWTAuthentication(com.nimbusds.jwt.JWTClaimsSet claims, SyncopeAuthenticationDetails details)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Collection<SyncopeGrantedAuthority>getAuthorities()com.nimbusds.jwt.JWTClaimsSetgetClaims()ObjectgetCredentials()SyncopeAuthenticationDetailsgetDetails()StringgetName()ObjectgetPrincipal()inthashCode()booleanisAuthenticated()voidsetAuthenticated(boolean authenticated)voidsetUsername(String username)StringtoString()
-
-
-
Constructor Detail
-
JWTAuthentication
public JWTAuthentication(com.nimbusds.jwt.JWTClaimsSet claims, SyncopeAuthenticationDetails details)
-
-
Method Detail
-
getClaims
public com.nimbusds.jwt.JWTClaimsSet getClaims()
-
getAuthorities
public Collection<SyncopeGrantedAuthority> getAuthorities()
- Specified by:
getAuthoritiesin interfaceAuthentication
-
getCredentials
public Object getCredentials()
- Specified by:
getCredentialsin interfaceAuthentication
-
getDetails
public SyncopeAuthenticationDetails getDetails()
- Specified by:
getDetailsin interfaceAuthentication
-
getPrincipal
public Object getPrincipal()
- Specified by:
getPrincipalin interfaceAuthentication
-
setUsername
public void setUsername(String username)
-
isAuthenticated
public boolean isAuthenticated()
- Specified by:
isAuthenticatedin interfaceAuthentication
-
setAuthenticated
public void setAuthenticated(boolean authenticated) throws IllegalArgumentException- Specified by:
setAuthenticatedin interfaceAuthentication- Throws:
IllegalArgumentException
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
-