jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java
/**
     * Sign the given claims
     *
     * @param claims the claims to sign
     * @return the created and signed JSON Web Token
     */
Sign the given claims
@param claims the claims to sign
@return the created and signed JSON Web Token
Sign the given claims @param claims the claims to sign @return the created and signed JSON Web Token
public SignedJWT signToken(JWTClaimsSet claims) {
        try {
            SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.HS256), claims);
            signedJWT.sign(new MACSigner(this.jwtSharedSecret));
            return signedJWT;
        } catch (JOSEException e) {
            throw new RuntimeException("Error signing JSON Web Token", e);
        }
    }
public SignedJWT signToken ( JWTClaimsSet claims ) { try { SignedJWT signedJWT = new SignedJWT ( new JWSHeader ( JWSAlgorithm . HS256 ) , claims ) ; signedJWT . sign ( new MACSigner ( this . jwtSharedSecret ) ) ; return signedJWT ; } catch ( JOSEException e ) { throw new RuntimeException ( "Error signing JSON Web Token" , e ) ; } }
Sign the given claims
 @param claims the claims to sign
 @return the created and signed JSON Web Token
Sign the given claims @param claims the claims to sign @return the created and signed JSON Web Token