Class JwtAuthenticationProvider
- java.lang.Object
-
- com.atlassian.connect.spring.internal.auth.AbstractConnectAuthenticationProvider
-
- com.atlassian.connect.spring.internal.auth.jwt.JwtAuthenticationProvider
-
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public class JwtAuthenticationProvider extends AbstractConnectAuthenticationProvider
AnAuthenticationProvider
for JSON Web Tokens, issued by an Atlassian host or by the add-on itself.For JWTs issued by Atlassian hosts, in addition to verifying the signature of the JWT, the query string hash claim specific to Atlassian Connect is also verified.
-
-
Field Summary
-
Fields inherited from class com.atlassian.connect.spring.internal.auth.AbstractConnectAuthenticationProvider
addonDescriptorLoader, hostRepository, log
-
-
Constructor Summary
Constructors Constructor Description JwtAuthenticationProvider(AddonDescriptorLoader addonDescriptorLoader, AtlassianHostRepository hostRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authentication
authenticate(org.springframework.security.core.Authentication authentication)
boolean
supports(Class<?> authenticationClass)
-
Methods inherited from class com.atlassian.connect.spring.internal.auth.AbstractConnectAuthenticationProvider
computeQueryStringHash, createHostUserFromSubjectClaim, getHost, getHostClientKeyFromSelfAuthenticationToken
-
-
-
-
Constructor Detail
-
JwtAuthenticationProvider
public JwtAuthenticationProvider(AddonDescriptorLoader addonDescriptorLoader, AtlassianHostRepository hostRepository)
-
-
Method Detail
-
supports
public boolean supports(Class<?> authenticationClass)
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
- Throws:
org.springframework.security.core.AuthenticationException
-
-