jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java
/**
     * Sign the given claims
     *
     * @param user the user to create the claims from
     * @return the created and signed JSON Web Token as string
     */
Sign the given claims
@param user the user to create the claims from
@return the created and signed JSON Web Token as string
Sign the given claims @param user the user to create the claims from @return the created and signed JSON Web Token as string
public String signToken(AuthenticatedUser user) {
        Date expiry = new Date(System.currentTimeMillis() + this.jwtTimeout);
        JWTClaimsSet claimsSet = user.toClaimSet(this.jwtIssuer, expiry);
        SignedJWT jwt = this.signToken(claimsSet);
        return jwt.serialize();
    }
public String signToken ( AuthenticatedUser user ) { Date expiry = new Date ( System . currentTimeMillis ( ) + this . jwtTimeout ) ; JWTClaimsSet claimsSet = user . toClaimSet ( this . jwtIssuer , expiry ) ; SignedJWT jwt = this . signToken ( claimsSet ) ; return jwt . serialize ( ) ; }
Sign the given claims
 @param user the user to create the claims from
 @return the created and signed JSON Web Token as string
Sign the given claims @param user the user to create the claims from @return the created and signed JSON Web Token as string