docs: @Override
      public AuthenticationMechanism create(String mechanismName, FormParserFactory formParserFactory, Map<String, String> properties) {
          ClassLoader loader = Thread.currentThread().getContextClassLoader();
  
          JWTAuthContextInfo contextInfo;
          Optional<JWTAuthContextInfo> optContextInfo = Optional.empty();
          try {
              Instance<JWTAuthContextInfo> contextInfoInstance = CDI.current().select(JWTAuthContextInfo.class);
              contextInfo = contextInfoInstance.get();
              optContextInfo = Optional.of(contextInfo);
          } catch (Exception e) {
              log.debugf(e, "Unable to select JWTAuthContextInfo provider");
          }
  
          if (!optContextInfo.isPresent()) {
              // Try building the JWTAuthContextInfo from the properties and/or the deployment resources
              contextInfo = new JWTAuthContextInfo();
              String issuedBy = properties.get("issuedBy");
              if (issuedBy == null) {
                  // Try the /META-INF/MP-JWT-ISSUER content
                  URL issURL = loader.getResource("/META-INF/MP-JWT-ISSUER");
                  if (issURL != null) {
                      issuedBy = readURLContent(issURL);
                  }
  
                  if (issuedBy == null) {
                      log.debug("No issuedBy parameter was found");
                  }
                  issuedBy = issuedBy.trim();
              }
              contextInfo.setIssuedBy(issuedBy);
  
              String publicKeyPemEnc = properties.get("signerPubKey");
              if (publicKeyPemEnc == null) {
                  // Try the /META-INF/MP-JWT-SIGNER content
                  URL pkURL = loader.getResource("/META-INF/MP-JWT-SIGNER");
                  if (pkURL != null) {
                      publicKeyPemEnc = readURLContent(pkURL);
                  }
              }
  
              String expGracePeriod = properties.get("expGracePeriod");
              if (expGracePeriod == null) {
                  URL expGracePeriodUrl = loader.getResource("/META-INF/MP-JWT-EXP-GRACE");
                  if (expGracePeriodUrl != null) {
                      expGracePeriod = readURLContent(expGracePeriodUrl);
                  }
              }
              if (expGracePeriod != null) {
                  contextInfo.setExpGracePeriodSecs(Integer.parseInt(expGracePeriod.trim()));
              }
  
              if (publicKeyPemEnc == null) { // signerPubKey and MP-JWT-Signer was empty, now trying for JWKS URI.
                  String jwksUri = properties.get("jwksUri");
                  if (jwksUri == null) {
                      URL jwksUriURL = loader.getResource("/META-INF/MP-JWT-JWKS");
                      if (jwksUriURL != null) {
                          jwksUri = readURLContent(jwksUriURL);
                      }
                  }
                  if (jwksUri != null) {
                      contextInfo.setJwksUri(jwksUri.trim());
  
                      String jwksRefreshInterval = properties.get("jwksRefreshInterval");
                      if (jwksRefreshInterval == null) {
                          URL jwksRefreshIntervalURL = loader.getResource("/META-INF/MP-JWT-JWKS-REFRESH");
                          if (jwksRefreshIntervalURL != null) {
                              jwksRefreshInterval = readURLContent(jwksRefreshIntervalURL);
                          }
                      }
                      if (jwksRefreshInterval == null) {
                          throw new IllegalStateException("JWKS Refresh Interval should be set when JWKS URI is used.");
                      }
                      contextInfo.setJwksRefreshInterval(Integer.valueOf(jwksRefreshInterval.trim()));
                  } else {
                      log.debug("Neither a static key nor a JWKS URI was set.");
                  }
              } else { // PEM key was provided, now parse and set it.
                  // Workaround the double decode issue; https://issues.jboss.org/browse/WFLY-9135
                  String publicKeyPem = publicKeyPemEnc.replace(' ', '+');
                  try {
                      RSAPublicKey pk = (RSAPublicKey) KeyUtils.decodePublicKey(publicKeyPem);
                      contextInfo.setSignerKey(pk);
                  } catch (Exception e) {
                      throw new IllegalStateException(e);
                  }
              }
  
          } else {
              contextInfo = optContextInfo.get();
          }
  
          return new JWTAuthMechanism(contextInfo);
      }