docs: @FFDCIgnore(Exception.class)
      protected void initSigningKey(BuilderImpl jwtBuilder, JwtConfig jwtConfig) throws JwtTokenException {
          String keyType = Constants.SIGNING_KEY_X509;
          try {
              if (jwtConfig.isJwkEnabled() && SIGNATURE_ALG_RS256.equals(signatureAlgorithm)) {
                  keyType = Constants.SIGNING_KEY_JWK;
                  if (tc.isDebugEnabled()) {
                      Tr.debug(tc, "Signing key type is " + keyType);
                  }
                  JSONWebKey jwk = jwtConfig.getJSONWebKey();
                  if (jwk == null) {
                      if (tc.isDebugEnabled()) {
                          Tr.debug(tc, "Did not succcessfully build a JWK");
                      }
                      _signingKey = null;
                      _keyId = null;
                  } else {
                      _signingKey = jwk.getPrivateKey();
                      _keyId = jwk.getKeyID();
                  }
              } else {
                  if (SIGNATURE_ALG_HS256.equals(signatureAlgorithm)) {
                      keyType = Constants.SIGNING_KEY_SECRET;
                      if (tc.isDebugEnabled()) {
                          Tr.debug(tc, "Signing key type is " + keyType);
                      }
                      String sharedKey = jwtBuilder.getSharedKey();
                      if (JwtUtils.isNullEmpty(sharedKey)) {
                          sharedKey = jwtConfig.getSharedKey();
                      }
                      if (!JwtUtils.isNullEmpty(sharedKey)) {
                          _signingKey = new HmacKey(sharedKey.getBytes("UTF-8"));
                      } else {
                          _signingKey = null;
                      }
  
                  } else if (SIGNATURE_ALG_RS256.equals(signatureAlgorithm)) {
                      _signingKey = jwtBuilder.getKey();
                      if (tc.isDebugEnabled()) {
                          Tr.debug(tc, "Signing key type is " + keyType);
                      }
                      if (_signingKey == null) {
                          String keyAlias = null;
                          String keyStoreRef = null;
                          keyAlias = jwtConfig.getKeyAlias();
                          keyStoreRef = jwtConfig.getKeyStoreRef();
                          _signingKey = JwtUtils.getPrivateKey(keyAlias, keyStoreRef);
                          _keyId = buildKidFromPublicKey(JwtUtils.getPublicKey(keyAlias, keyStoreRef));
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "Key alias: " + keyAlias + ", Keystore: " + keyStoreRef+ ", kid: " + _keyId);
                          }
                      }
  
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "RSAPrivateKey: " + (_signingKey instanceof RSAPrivateKey));
                      }
                      if (_signingKey != null && !(_signingKey instanceof RSAPrivateKey)) {
                          // error handling
                          // String errorMsg = Tr.formatMessage(tc, "SIGNING_KEY_NOT_RSA", new Object[] { signatureAlgorithm });
                          // Object[] objs = new Object[] { signatureAlgorithm, errorMsg };
                          // noKeyException = JWTTokenException.newInstance(false, "JWT_BAD_SIGNING_KEY", objs);
                          _signingKey = null; // we will catch this later in jwtSigner
                          _keyId = null;
                      }
                  }
              }
          } catch (Exception e) {
              // UnsupportedEncodingException e (won't happen)
              // if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              // Tr.debug(tc, "Exception obtaining the signing key: " + e);
              // }
              // error messages
              // JWT_BAD_SIGNING_KEY=CWWKS1455E: A signing key was not available. The signature algorithm is [{0}]. {1}
  
              Object[] objs = new Object[] { signatureAlgorithm, jwtConfig.isJwkEnabled(), e.getLocalizedMessage() }; // let JWTTokenException handle the exception
              JwtTokenException jte = JwtTokenException.newInstance(false, "JWT_NO_SIGNING_KEY_WITH_ERROR", objs);
              jte.initCause(e);
              throw jte;
          }
          if (_signingKey == null) {
              Object[] objs = new Object[] { signatureAlgorithm, jwtConfig.isJwkEnabled(), "" }; // let JWTTokenException handle the exception
              throw JwtTokenException.newInstance(true, "JWT_NO_SIGNING_KEY_WITH_ERROR", objs);
          }
      }