Class JwtUtil


  • @Service
    public class JwtUtil
    extends Object
    • Constructor Detail

      • JwtUtil

        public JwtUtil()
    • Method Detail

      • processFlattenedJWT

        public org.jose4j.jwt.consumer.JwtContext processFlattenedJWT​(String flattenedJwsJson)
      • processCompactJWT

        public org.jose4j.jwt.consumer.JwtContext processCompactJWT​(String compactJwsSerialization)
      • convertCompact

        public org.jose4j.jwt.consumer.JwtContext convertCompact​(String compactJwsSerialization)
                                                          throws org.jose4j.jwt.consumer.InvalidJwtException
        Throws:
        org.jose4j.jwt.consumer.InvalidJwtException
      • validateSignature

        public void validateSignature​(org.jose4j.jwt.consumer.JwtContext context,
                                      String publicKeyBase64,
                                      long accountId)
                               throws org.jose4j.jwt.consumer.InvalidJwtException,
                                      org.jose4j.lang.JoseException,
                                      IOException
        Throws:
        org.jose4j.jwt.consumer.InvalidJwtException
        org.jose4j.lang.JoseException
        IOException
      • verifyJWT

        public void verifyJWT​(org.jose4j.jwt.consumer.JwtContext context,
                              PublicKey publicKey)
      • getAccountRequest

        public AccountRequest getAccountRequest​(org.jose4j.jwt.JwtClaims jwtClaims)
      • getChangeKeyRequest

        public ChangeKeyRequest getChangeKeyRequest​(org.jose4j.jwt.JwtClaims jwtClaims)
      • getIdentifiers

        public IdentifiersResponse getIdentifiers​(org.jose4j.jwt.JwtClaims jwtClaims)
      • getFinalizeReq

        public FinalizeRequest getFinalizeReq​(org.jose4j.jwt.JwtClaims jwtClaims)
      • getRevokeReq

        public RevokeRequest getRevokeReq​(org.jose4j.jwt.JwtClaims jwtClaims)
      • getJsonWebStructure

        public org.jose4j.jwx.JsonWebStructure getJsonWebStructure​(org.jose4j.jwt.consumer.JwtContext context)
      • getAccountIdForKid

        public long getAccountIdForKid​(String kid)
      • getPublicKey

        public PublicKey getPublicKey​(org.jose4j.jwx.JsonWebStructure webStruct)
      • getKid

        public String getKid​(org.jose4j.jwx.JsonWebStructure webStruct)
                      throws org.jose4j.lang.JoseException
        Throws:
        org.jose4j.lang.JoseException
      • getNonce

        public String getNonce​(org.jose4j.jwx.JsonWebStructure webStruct)
                        throws org.jose4j.lang.JoseException
        Throws:
        org.jose4j.lang.JoseException
      • getJWKThumbPrint

        public String getJWKThumbPrint​(PublicKey newPK)
                                throws org.jose4j.lang.JoseException
        Parameters:
        newPK -
        Returns:
        Throws:
        org.jose4j.lang.JoseException