code: protected String signToken(final OidcRegisteredService svc, final JsonWebSignature jws) throws Exception {
          LOGGER.debug("Fetching JSON web key to sign the token for : [{}]", svc.getClientId());
          val jsonWebKey = getJsonWebKeySigningKey();
          LOGGER.debug("Found JSON web key to sign the token: [{}]", jsonWebKey);
          if (jsonWebKey.getPrivateKey() == null) {
              throw new IllegalArgumentException("JSON web key used to sign the token has no associated private key");
          }
          configureJsonWebSignatureForTokenSigning(svc, jws, jsonWebKey);
          return jws.getCompactSerialization();
      }
docs: Sign token.
  
  @param svc the svc
  @param jws the jws
  @return the string
  @throws Exception the exception