code: protected JsonWebSignature configureJsonWebSignatureForTokenSigning(final OAuthRegisteredService svc,
                                                                          final JsonWebSignature jws,
                                                                          final PublicJsonWebKey jsonWebKey) {
          LOGGER.debug("Service [{}] is set to sign id tokens", svc);
          jws.setKey(jsonWebKey.getPrivateKey());
          jws.setAlgorithmConstraints(AlgorithmConstraints.DISALLOW_NONE);
          if (StringUtils.isNotBlank(jsonWebKey.getKeyId())) {
              jws.setKeyIdHeaderValue(jsonWebKey.getKeyId());
          }
          LOGGER.debug("Signing id token with key id header value [{}]", jws.getKeyIdHeaderValue());
          jws.setAlgorithmHeaderValue(getJsonWebKeySigningAlgorithm(svc));
  
          LOGGER.debug("Signing id token with algorithm [{}]", jws.getAlgorithmHeaderValue());
          return jws;
      }
docs: Configure json web signature for id token signing.
  
  @param svc        the svc
  @param jws        the jws
  @param jsonWebKey the json web key
  @return the json web signature