Package io.jans.configapi.util
Class JwtUtil
- java.lang.Object
-
- io.jans.configapi.util.JwtUtil
-
@ApplicationScoped public class JwtUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description JwtUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.JSONObject
fromJson(String json)
io.jans.as.model.jwk.JSONWebKeySet
getJSONWebKeys(String jwksUri)
String
getJwksUri(String issuer)
io.jans.as.model.crypto.PublicKey
getPublicKey(String kid, io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm)
boolean
isJwt(String token)
io.jans.as.model.jwt.Jwt
parse(String encodedJwt)
boolean
validateSignature(io.jans.as.model.jwt.Jwt jwt, io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet)
List<String>
validateToken(String token)
void
validateToken(String token, List<String> resourceScopes)
-
-
-
Method Detail
-
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.InvalidJwtException
Exception
-
validateToken
public void validateToken(String token, List<String> resourceScopes) throws io.jans.as.model.exception.InvalidJwtException, Exception
- Throws:
io.jans.as.model.exception.InvalidJwtException
Exception
-
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
public org.json.JSONObject fromJson(String json) throws IOException
- Throws:
IOException
-
-