Class JWTServiceImpl

    • Constructor Detail

      • JWTServiceImpl

        public JWTServiceImpl()
    • Method Detail

      • builderWithClaim

        protected void builderWithClaim​(com.auth0.jwt.JWTCreator.Builder builder,
                                        String name,
                                        Object value)
      • verifyToken

        public Map<String,​Object> verifyToken​(String token)
        Description copied from interface: JWTService
        Verifies the token and returns its claims, or null if the token is invalid (corrupted, constructed from an invalid secret, or expired).

        The claim JWTClaims.CLAIM_SUBJECT contains the token's creator user id.

        The token hash algorithm is based on a secret provided by the service configuration.

        Specified by:
        verifyToken in interface JWTService
        Parameters:
        token - the token
        Returns:
        the claims if the token is valid, or null if the token is invalid
      • nodeToValue

        protected static Object nodeToValue​(com.fasterxml.jackson.databind.JsonNode node)
        Converts a JsonNode to a Java value.
      • getDefaultTTL

        protected int getDefaultTTL()
      • getAlgorithm

        protected com.auth0.jwt.algorithms.Algorithm getAlgorithm()