Class JwtGenerator<U extends CommonProfile>


  • public class JwtGenerator<U extends CommonProfile>
    extends Object
    Generates a JWT token from a user profile.
    Since:
    1.8.0
    Author:
    Jerome Leleu
    • Method Detail

      • generate

        public String generate​(Map<String,​Object> claims)
        Generate a JWT from a map of claims.
        Parameters:
        claims - the map of claims
        Returns:
        the created JWT
      • generate

        public String generate​(U profile)
        Generate a JWT from a user profile.
        Parameters:
        profile - the given user profile
        Returns:
        the created JWT
      • internalGenerate

        protected String internalGenerate​(com.nimbusds.jwt.JWTClaimsSet claimsSet)
        Generate a JWT from a claims set.
        Parameters:
        claimsSet - the claims set
        Returns:
        the JWT
      • verifyProfile

        protected void verifyProfile​(U profile)
      • buildJwtClaimsSet

        protected com.nimbusds.jwt.JWTClaimsSet buildJwtClaimsSet​(U profile)
      • setSignatureConfiguration

        public void setSignatureConfiguration​(SignatureConfiguration signatureConfiguration)
      • setEncryptionConfiguration

        public void setEncryptionConfiguration​(EncryptionConfiguration encryptionConfiguration)
      • getExpirationTime

        public Date getExpirationTime()
      • setExpirationTime

        public void setExpirationTime​(Date expirationTime)