public static String generateToken ( final Integer apiKey , final String apiSecret ) throws OpenTokException { //This is the default expire time we use for rest endpoints. final long defaultExpireTime = System . currentTimeMillis ( ) / 1000L + TimeUnit . MINUTES . toSeconds ( 3 ) ; final JwtClaims claims = new JwtClaims ( ) ; claims . setIssuer ( apiKey . toString ( ) ) ; claims . setStringClaim ( ISSUER_TYPE , PROJECT_ISSUER_TYPE ) ; claims . setGeneratedJwtId ( ) ; // JTI a unique identifier for the JWT. return getToken ( claims , defaultExpireTime , apiSecret ) ; }
Used by the REST Endpoints