Package io.jans.configapi.util
Class JwtUtil
java.lang.Object
io.jans.configapi.util.JwtUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.json.JSONObjectio.jans.as.model.jwk.JSONWebKeySetgetJSONWebKeys(String jwksUri) getJwksUri(String issuer) io.jans.as.model.crypto.PublicKeygetPublicKey(String kid, io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) booleanio.jans.as.model.jwt.JwtbooleanvalidateSignature(io.jans.as.model.jwt.Jwt jwt, io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet) validateToken(String token) voidvalidateToken(String token, List<String> resourceScopes)
-
Constructor Details
-
JwtUtil
public JwtUtil()
-
-
Method Details
-
isJwt
- Throws:
Exception
-
parse
public io.jans.as.model.jwt.Jwt parse(String encodedJwt) throws io.jans.as.model.exception.InvalidJwtException - Throws:
io.jans.as.model.exception.InvalidJwtException
-
validateToken
public List<String> validateToken(String token) throws io.jans.as.model.exception.InvalidJwtException, Exception - Throws:
io.jans.as.model.exception.InvalidJwtExceptionException
-
validateToken
public void validateToken(String token, List<String> resourceScopes) throws io.jans.as.model.exception.InvalidJwtException, Exception - Throws:
io.jans.as.model.exception.InvalidJwtExceptionException
-
validateSignature
public boolean validateSignature(io.jans.as.model.jwt.Jwt jwt, io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet) -
getPublicKey
public io.jans.as.model.crypto.PublicKey getPublicKey(String kid, io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) -
fromJson
- Throws:
IOException
-
getJwksUri
- Throws:
Exception
-
getJSONWebKeys
- Throws:
Exception
-