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