code: 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);
          }
      }
docs: Sign the given claims
  
  @param claims the claims to sign
  @return the created and signed JSON Web Token