Class RsaJwtReader
- java.lang.Object
-
- com.atlassian.connect.spring.internal.jwt.AbstractJwtReader
-
- com.atlassian.connect.spring.internal.jwt.RsaJwtReader
-
public class RsaJwtReader extends AbstractJwtReader
-
-
Constructor Summary
Constructors Constructor Description RsaJwtReader(String pemEncodedKey)RsaJwtReader(RSAPublicKey key)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringgetKeyIdAndCheckSigningAlgorithm(String jwt)Parses the jwt and returns the key id if the jwt is signed with RS256protected com.nimbusds.jose.AlgorithmgetSupportedAlgorithm()-
Methods inherited from class com.atlassian.connect.spring.internal.jwt.AbstractJwtReader
readAndVerify
-
-
-
-
Field Detail
-
BEGIN
public static final String BEGIN
- See Also:
- Constant Field Values
-
END
public static final String END
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RsaJwtReader
public RsaJwtReader(String pemEncodedKey) throws NoSuchAlgorithmException, InvalidKeySpecException
-
RsaJwtReader
public RsaJwtReader(RSAPublicKey key)
-
-
Method Detail
-
getKeyIdAndCheckSigningAlgorithm
public static String getKeyIdAndCheckSigningAlgorithm(String jwt) throws JwtInvalidSigningAlgorithmException, JwtParseException
Parses the jwt and returns the key id if the jwt is signed with RS256Note that this method can be removed once signed installs is completely rolled out and we can assume all installs are signed with the asymmetric key
- Parameters:
jwt-- Returns:
- Throws:
JwtInvalidSigningAlgorithmException- if the algorithm used to sign the JWT was not RS256JwtParseException- if parsing the JWT failed
-
getSupportedAlgorithm
protected com.nimbusds.jose.Algorithm getSupportedAlgorithm()
- Specified by:
getSupportedAlgorithmin classAbstractJwtReader
-
-