Class JwtIssuer


  • public class JwtIssuer
    extends Object
    JWT token issuer helper utility that use by light-ouath2 token and code services to generate JWT tokens.
    Author:
    Steve Hu
    • Constructor Detail

      • JwtIssuer

        public JwtIssuer()
    • Method Detail

      • getJwt

        public static String getJwt​(org.jose4j.jwt.JwtClaims claims)
                             throws org.jose4j.lang.JoseException
        A static method that generate JWT token from JWT claims object
        Parameters:
        claims - JwtClaims object
        Returns:
        A string represents jwt token
        Throws:
        org.jose4j.lang.JoseException - JoseException
      • getDefaultJwtClaims

        public static org.jose4j.jwt.JwtClaims getDefaultJwtClaims()
        Construct a default JwtClaims
        Returns:
        JwtClaims
      • getJwtClaimsWithExpiresIn

        public static org.jose4j.jwt.JwtClaims getJwtClaimsWithExpiresIn​(int expiresIn)
        Construct a default JwtClaims
        Parameters:
        expiresIn - expires in
        Returns:
        JwtClaims