Class JwtAuthentication
- java.lang.Object
-
- com.atlassian.connect.spring.internal.auth.jwt.JwtAuthentication
-
- All Implemented Interfaces:
Serializable
,Principal
,org.springframework.security.core.Authentication
- Direct Known Subclasses:
AsymmetricAuthentication
public class JwtAuthentication extends Object implements org.springframework.security.core.Authentication
An authentication object representing a verified and accepted JSON Web Token.- See Also:
JwtAuthenticationToken
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTEXT_QSH
static String
ROLE_JWT
-
Constructor Summary
Constructors Constructor Description JwtAuthentication(AtlassianHostUser hostUser, com.nimbusds.jwt.JWTClaimsSet claims, String queryStringHash)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends org.springframework.security.core.GrantedAuthority>
getAuthorities()
Object
getCredentials()
Object
getDetails()
String
getName()
Object
getPrincipal()
boolean
isAuthenticated()
void
setAuthenticated(boolean b)
void
validateQueryStringHash(boolean checkValues)
-
-
-
Field Detail
-
ROLE_JWT
public static final String ROLE_JWT
- See Also:
- Constant Field Values
-
CONTEXT_QSH
public static final String CONTEXT_QSH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JwtAuthentication
public JwtAuthentication(AtlassianHostUser hostUser, com.nimbusds.jwt.JWTClaimsSet claims, String queryStringHash)
-
-
Method Detail
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
-
getCredentials
public Object getCredentials()
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getDetails
public Object getDetails()
- Specified by:
getDetails
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
public Object getPrincipal()
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()
- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
public void setAuthenticated(boolean b) throws IllegalArgumentException
- Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Throws:
IllegalArgumentException
-
validateQueryStringHash
public void validateQueryStringHash(boolean checkValues) throws JwtInvalidClaimException
- Throws:
JwtInvalidClaimException
-
-