Interface JWTService.JWTBuilder

    • Method Detail

      • withTTL

        JWTService.JWTBuilder withTTL​(int ttlSeconds)
        Adds a TTL (in seconds) to the token to be built.

        A negative or zero TTL means to use the platform default.

        Parameters:
        ttlSeconds - the TTL, in seconds
      • build

        String build()
        Builds and returns the token.

        The JWTClaims.CLAIM_SUBJECT of the token is set to the current user id. The JWTClaims.CLAIM_ISSUER of the token is set to the string "nuxeo".

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

        Returns:
        the token