package com.l7tech.external.assertions.oauth2.introspection.server;

import com.l7tech.common.http.GenericHttpClient;
import com.l7tech.common.http.GenericHttpException;
import com.l7tech.common.http.GenericHttpRequest;
import com.l7tech.common.http.HttpMethod;
import com.l7tech.external.assertions.oauth2.introspection.config.OAuthConfigEvent;
import com.l7tech.external.assertions.oauth2.introspection.config.OAuthIntrospectionResult;
import com.l7tech.external.assertions.oauth2.introspection.config.OAuthTokenIssuerConfig;
import com.l7tech.external.assertions.oauth2.introspection.util.Util;
import com.l7tech.server.transport.http.SslClientTrustManager;
import com.l7tech.util.ExceptionUtils;
import java.net.MalformedURLException;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jose4j.jwa.AlgorithmConstraints;
import org.jose4j.jwk.JsonWebKey;
import org.jose4j.jwk.JsonWebKeySet;
import org.jose4j.jws.JsonWebSignature;
import org.jose4j.jwx.CompactSerializer;
import org.jose4j.jwx.JsonWebStructure;
import org.jose4j.lang.JoseException;

public class OAuthJWTTokenIntrospector extends OAuthOpaqueTokenIntrospector {
   private static final Logger g;
   private static final OAuthIntrospectionResult h;
   private final ExecutorService i;
   private Future<?> j;
   private long k = System.currentTimeMillis();
   private static final String[] n;

   public OAuthJWTTokenIntrospector(OAuthTokenIssuerConfig var1, ExecutorService var2, GenericHttpClient var3, SslClientTrustManager var4) {
      super(var1, var3, var4);
      this.i = var2;
   }

   @Override
   public OAuthIntrospectionResult introspect(String var1) {
      String[] var2 = CompactSerializer.deserialize(var1);

      try {
         if (var2.length == 1) {
            return h;
         }
      } catch (OAuth2IntrospectionRuntimeException var5) {
         throw var5;
      }

      OAuthIntrospectionResult var3 = (OAuthIntrospectionResult)this.cache.get(var2[var2.length - 1], var2x -> this.introspectJWTToken(var1));

      try {
         if (var1.equals(var3.getToken())) {
            return var3;
         }
      } catch (OAuth2IntrospectionRuntimeException var4) {
         throw var4;
      }

      return h;
   }

   protected OAuthIntrospectionResult introspectJWTToken(String var1) {
      String var2;
      try {
         JsonWebStructure var3 = JsonWebStructure.fromCompactSerialization(var1);

         label49: {
            label55: {
               try {
                  if (!(var3 instanceof JsonWebSignature)) {
                     if (Util.isNotEmpty(this.issuerConfig.getIntrospectionEndpoint())) {
                        break label49;
                     }
                     break label55;
                  }
               } catch (OAuth2IntrospectionRuntimeException var6) {
                  throw var6;
               }

               String[] var10 = n;
               g.log(Level.INFO, var10[9], this.issuerConfig.getName());
               if (!this.b((JsonWebSignature)var3)) {
                  return OAuthIntrospectionResult.newErrorResult(var1, var10[17], var10[12]);
               }

               var10 = n;
               boolean var4 = this.issuerConfig.getBooleanProperty(var10[14]);
               if (var4) {
                  return super.introspectOpaqueToken(var1);
               }

               return new OAuthIntrospectionResult(var1, var3.getPayload(), true);
            }

            String[] var12 = n;
            return OAuthIntrospectionResult.newErrorResult(var1, var12[17], var12[10]);
         }

         String[] var13 = n;
         g.log(Level.INFO, var13[4], this.issuerConfig.getName());
         return super.introspectOpaqueToken(var1);
      } catch (OAuth2IntrospectionRuntimeException var7) {
         var2 = var7.getMessage();
         String[] var9 = n;
         g.log(Level.WARNING, var9[13], new Object[]{this.issuerConfig.getName(), var7.getDetailedMessage()});
      } catch (Exception var8) {
         String[] var5 = n;
         var2 = var5[2];
         g.log(Level.WARNING, var5[11], new Object[]{this.issuerConfig.getName(), ExceptionUtils.getMessageWithCause(var8)});
      }

      return OAuthIntrospectionResult.newErrorResult(var1, n[20], var2);
   }

   private JsonWebKeySet b() {
      JsonWebKeySet var1 = (JsonWebKeySet)this.issuerConfig.getParsedJwks();

      try {
         if (var1 == null) {
            throw new OAuth2IntrospectionRuntimeException(n[18]);
         } else {
            return var1;
         }
      } catch (OAuth2IntrospectionRuntimeException var2) {
         throw var2;
      }
   }

   private JsonWebKey a(JsonWebSignature var1) throws JoseException {
      JsonWebKeySet var2 = this.b();
      String var3 = var1.getKeyIdHeaderValue();
      JsonWebKey var4 = null;
      if (Util.isNotEmpty(var3)) {
         var4 = var2.findJsonWebKey(var3, var1.getKeyType(), null, null);
         if (var4 == null) {
            this.d();
            this.c();
            var4 = this.b().findJsonWebKey(var3, var1.getKeyType(), null, null);
         }
      } else if (!var2.getJsonWebKeys().isEmpty()) {
         var4 = (JsonWebKey)var2.getJsonWebKeys().getFirst();
      }

      try {
         if (var4 == null) {
            throw new OAuth2IntrospectionRuntimeException(n[1], Map.of(n[5], var3));
         } else {
            return var4;
         }
      } catch (JoseException var5) {
         throw var5;
      }
   }

   private void c() {
      try {
         try {
            if (this.j != null) {
               this.j.get(this.issuerConfig.getIntProperty(n[16]).intValue(), TimeUnit.MILLISECONDS);
            }
         } catch (OAuth2IntrospectionRuntimeException var2) {
            throw var2;
         }
      } catch (InterruptedException | ExecutionException | TimeoutException var3) {
         g.log(Level.WARNING, ExceptionUtils.getDebugException(var3), () -> {
            String var10000 = this.issuerConfig.getName();
            String var10001 = ExceptionUtils.getMessageWithCause(var3);
            String[] var2x = n;
            return var2x[21] + var10000 + var2x[3] + var10001;
         });
      }
   }

   private synchronized void d() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: invokestatic java/lang/System.currentTimeMillis ()J
      // 03: aload 0
      // 04: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.k J
      // 07: getstatic com/l7tech/external/assertions/oauth2/introspection/config/OAuthGlobalTokenIssuerConfig.MIN_TIME_BETWEEN_JWKS_REFRESH_IN_MILLIS I
      // 0a: i2l
      // 0b: ladd
      // 0c: lcmp
      // 0d: ifle 49
      // 10: aload 0
      // 11: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.j Ljava/util/concurrent/Future;
      // 14: ifnull 2b
      // 17: goto 1b
      // 1a: athrow
      // 1b: aload 0
      // 1c: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.j Ljava/util/concurrent/Future;
      // 1f: invokeinterface java/util/concurrent/Future.isDone ()Z 1
      // 24: ifeq 49
      // 27: goto 2b
      // 2a: athrow
      // 2b: aload 0
      // 2c: aload 0
      // 2d: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.i Ljava/util/concurrent/ExecutorService;
      // 30: aload 0
      // 31: invokedynamic run (Lcom/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector;)Ljava/lang/Runnable; bsm=java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; args=[ ()V, com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.e ()V, ()V ]
      // 36: invokeinterface java/util/concurrent/ExecutorService.submit (Ljava/lang/Runnable;)Ljava/util/concurrent/Future; 2
      // 3b: putfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.j Ljava/util/concurrent/Future;
      // 3e: aload 0
      // 3f: invokestatic java/lang/System.currentTimeMillis ()J
      // 42: putfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.k J
      // 45: goto 49
      // 48: athrow
      // 49: return
      // try (0 -> 11): 12 com/l7tech/external/assertions/oauth2/introspection/server/OAuth2IntrospectionRuntimeException
      // try (8 -> 17): 18 com/l7tech/external/assertions/oauth2/introspection/server/OAuth2IntrospectionRuntimeException
      // try (13 -> 29): 30 com/l7tech/external/assertions/oauth2/introspection/server/OAuth2IntrospectionRuntimeException
   }

   private boolean b(JsonWebSignature var1) throws JoseException {
      var1.setAlgorithmConstraints(AlgorithmConstraints.NO_CONSTRAINTS);
      var1.setDoKeyValidation(true);
      JsonWebKey var2 = this.a(var1);
      var1.setKey(var2.getKey());
      return var1.verifySignature();
   }

   private void e() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: getstatic com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.g Ljava/util/logging/Logger;
      // 003: getstatic java/util/logging/Level.INFO Ljava/util/logging/Level;
      // 006: getstatic com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.n [Ljava/lang/String;
      // 009: bipush 19
      // 00b: aaload
      // 00c: aload 0
      // 00d: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 010: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getName ()Ljava/lang/String;
      // 013: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
      // 016: aload 0
      // 017: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 01a: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getJwksSupplier ()Ljava/util/function/Supplier;
      // 01d: ifnull 045
      // 020: aload 0
      // 021: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 024: getstatic com/l7tech/external/assertions/oauth2/introspection/util/JsonUtil.DEFAULT Lcom/l7tech/external/assertions/oauth2/introspection/util/JsonUtil;
      // 027: aload 0
      // 028: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 02b: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getJwksSupplier ()Ljava/util/function/Supplier;
      // 02e: invokeinterface java/util/function/Supplier.get ()Ljava/lang/Object; 1
      // 033: checkcast java/lang/String
      // 036: ldc java/util/Map
      // 038: invokevirtual com/l7tech/external/assertions/oauth2/introspection/util/JsonUtil.jsonToJava (Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
      // 03b: checkcast java/util/Map
      // 03e: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.setJwks (Ljava/util/Map;)V
      // 041: goto 045
      // 044: athrow
      // 045: aload 0
      // 046: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 049: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getJwks ()Ljava/util/Map;
      // 04c: ifnull 07e
      // 04f: aload 0
      // 050: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 053: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getJwks ()Ljava/util/Map;
      // 056: invokeinterface java/util/Map.isEmpty ()Z 1
      // 05b: ifne 07e
      // 05e: goto 062
      // 061: athrow
      // 062: aload 0
      // 063: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 066: new org/jose4j/jwk/JsonWebKeySet
      // 069: dup
      // 06a: getstatic com/l7tech/external/assertions/oauth2/introspection/util/JsonUtil.DEFAULT Lcom/l7tech/external/assertions/oauth2/introspection/util/JsonUtil;
      // 06d: aload 0
      // 06e: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 071: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getJwks ()Ljava/util/Map;
      // 074: invokevirtual com/l7tech/external/assertions/oauth2/introspection/util/JsonUtil.javaToJson (Ljava/lang/Object;)Ljava/lang/String;
      // 077: invokespecial org/jose4j/jwk/JsonWebKeySet.<init> (Ljava/lang/String;)V
      // 07a: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.setParsedJwks (Ljava/lang/Object;)V
      // 07d: return
      // 07e: aload 0
      // 07f: invokevirtual com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.f ()Lcom/l7tech/common/http/GenericHttpRequest;
      // 082: astore 1
      // 083: aload 1
      // 084: invokeinterface com/l7tech/common/http/GenericHttpRequest.getResponse ()Lcom/l7tech/common/http/GenericHttpResponse; 1
      // 089: astore 2
      // 08a: aload 2
      // 08b: invokevirtual com/l7tech/common/http/GenericHttpResponse.getStatus ()I
      // 08e: istore 3
      // 08f: aload 0
      // 090: aload 2
      // 091: invokevirtual com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.readHttpResponse (Lcom/l7tech/common/http/GenericHttpResponse;)Ljava/lang/String;
      // 094: astore 4
      // 096: iload 3
      // 097: sipush 200
      // 09a: if_icmpne 0e1
      // 09d: aload 2
      // 09e: invokevirtual com/l7tech/common/http/GenericHttpResponse.getContentType ()Lcom/l7tech/common/mime/ContentTypeHeader;
      // 0a1: invokevirtual com/l7tech/common/mime/ContentTypeHeader.isJson ()Z
      // 0a4: ifeq 0e1
      // 0a7: goto 0ab
      // 0aa: athrow
      // 0ab: getstatic com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.g Ljava/util/logging/Logger;
      // 0ae: getstatic java/util/logging/Level.FINE Ljava/util/logging/Level;
      // 0b1: getstatic com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.n [Ljava/lang/String;
      // 0b4: bipush 8
      // 0b6: aaload
      // 0b7: bipush 2
      // 0b8: anewarray 24
      // 0bb: dup
      // 0bc: bipush 0
      // 0bd: aload 0
      // 0be: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 0c1: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getName ()Ljava/lang/String;
      // 0c4: aastore
      // 0c5: dup
      // 0c6: bipush 1
      // 0c7: aload 4
      // 0c9: aastore
      // 0ca: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
      // 0cd: aload 0
      // 0ce: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 0d1: new org/jose4j/jwk/JsonWebKeySet
      // 0d4: dup
      // 0d5: aload 4
      // 0d7: invokespecial org/jose4j/jwk/JsonWebKeySet.<init> (Ljava/lang/String;)V
      // 0da: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.setParsedJwks (Ljava/lang/Object;)V
      // 0dd: goto 10a
      // 0e0: athrow
      // 0e1: getstatic com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.g Ljava/util/logging/Logger;
      // 0e4: getstatic java/util/logging/Level.WARNING Ljava/util/logging/Level;
      // 0e7: getstatic com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.n [Ljava/lang/String;
      // 0ea: bipush 6
      // 0ec: aaload
      // 0ed: bipush 3
      // 0ee: anewarray 24
      // 0f1: dup
      // 0f2: bipush 0
      // 0f3: aload 0
      // 0f4: getfield com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.issuerConfig Lcom/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig;
      // 0f7: invokevirtual com/l7tech/external/assertions/oauth2/introspection/config/OAuthTokenIssuerConfig.getName ()Ljava/lang/String;
      // 0fa: aastore
      // 0fb: dup
      // 0fc: bipush 1
      // 0fd: iload 3
      // 0fe: invokestatic java/lang/Integer.valueOf (I)Ljava/lang/Integer;
      // 101: aastore
      // 102: dup
      // 103: bipush 2
      // 104: aload 4
      // 106: aastore
      // 107: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
      // 10a: aload 2
      // 10b: ifnull 12c
      // 10e: aload 2
      // 10f: invokevirtual com/l7tech/common/http/GenericHttpResponse.close ()V
      // 112: goto 12c
      // 115: athrow
      // 116: astore 3
      // 117: aload 2
      // 118: ifnull 12a
      // 11b: aload 2
      // 11c: invokevirtual com/l7tech/common/http/GenericHttpResponse.close ()V
      // 11f: goto 12a
      // 122: astore 4
      // 124: aload 3
      // 125: aload 4
      // 127: invokevirtual java/lang/Throwable.addSuppressed (Ljava/lang/Throwable;)V
      // 12a: aload 3
      // 12b: athrow
      // 12c: aload 1
      // 12d: ifnull 150
      // 130: aload 1
      // 131: invokeinterface com/l7tech/common/http/GenericHttpRequest.close ()V 1
      // 136: goto 150
      // 139: athrow
      // 13a: astore 2
      // 13b: aload 1
      // 13c: ifnull 14e
      // 13f: aload 1
      // 140: invokeinterface com/l7tech/common/http/GenericHttpRequest.close ()V 1
      // 145: goto 14e
      // 148: astore 3
      // 149: aload 2
      // 14a: aload 3
      // 14b: invokevirtual java/lang/Throwable.addSuppressed (Ljava/lang/Throwable;)V
      // 14e: aload 2
      // 14f: athrow
      // 150: goto 168
      // 153: astore 1
      // 154: getstatic com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.g Ljava/util/logging/Logger;
      // 157: getstatic java/util/logging/Level.WARNING Ljava/util/logging/Level;
      // 15a: aload 1
      // 15b: invokestatic com/l7tech/util/ExceptionUtils.getDebugException (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 15e: aload 0
      // 15f: aload 1
      // 160: invokedynamic get (Lcom/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector;Ljava/lang/Exception;)Ljava/util/function/Supplier; bsm=java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; args=[ ()Ljava/lang/Object;, com/l7tech/external/assertions/oauth2/introspection/server/OAuthJWTTokenIntrospector.lambda$refreshJWKS$2 (Ljava/lang/Exception;)Ljava/lang/String;, ()Ljava/lang/String; ]
      // 165: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/Throwable;Ljava/util/function/Supplier;)V
      // 168: return
      // try (66 -> 98): 98 java/lang/Throwable
      // try (63 -> 70): 71 java/lang/Throwable
      // try (27 -> 36): 37 java/lang/Throwable
      // try (0 -> 25): 26 java/lang/Throwable
      // try (56 -> 122): 128 java/lang/Throwable
      // try (131 -> 133): 134 java/lang/Throwable
      // try (122 -> 127): 127 java/lang/Throwable
      // try (53 -> 140): 146 java/lang/Throwable
      // try (149 -> 151): 152 java/lang/Throwable
      // try (0 -> 49): 159 java/lang/Exception
      // try (140 -> 145): 145 java/lang/Throwable
      // try (50 -> 158): 159 java/lang/Exception
   }

   private GenericHttpRequest f() throws MalformedURLException, GenericHttpException {
      return this.createHttpRequest(HttpMethod.GET, this.issuerConfig.getJwksEndpoint(), var1 -> var1.setSslContext(this.getSSLContext()));
   }

   @Override
   public void notify(OAuthConfigEvent var1) {
      try {
         super.notify(var1);
         if (OAuthConfigEvent.REFRESH_JWKS == var1) {
            this.e();
         }
      } catch (OAuth2IntrospectionRuntimeException var2) {
         throw var2;
      }
   }

   static {
      String[] var5 = new String[23];
      int var3 = 0;
      String var2 = "+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018h\u0013\u001f[\u000fwQv\u0006Z_\u0006`\u0018q\u0012\t^\u000bw\u0005\u0019=pQl\u0000\u0018G\u000b%rO*ZB\u001d%Vw\u0015ZM\u0001pV|6-jMt\u0005ZE\u0001q\u0018q\u000f\u000eY\u0001vH}\u0002\u000e\u000b\u001am]8\u0015\u0015@\u000bk\u0018m\u0012\u0013E\t%Lp\u0004ZB\u001dvM}\u0013]XNOoS2\u0002T%N$Rl8\u0015\u0015@\u000bk\u0018q\u0012ZE\u0001q\u0018yA\tB\tkYl\u0014\bNNgYk\u0004\u001e\u0007NcYt\r\u0013E\t%Zy\u0002\u0011\u000b\u001aj\u0018l\t\u001f\u000b\u0007vKm\u0004\b\u0016\u00155E?F\t\u000b\u000bk\\h\u000e\u0013E\u001a\u0003\u0005l\\M+wJw\u0013Z[\u000fwKq\u000f\u001d\u000b\u001am]8\u000b\r@\u001d%J}\u0012\nD\u0000v]8\u0007\bD\u0003%Lp\u0004ZB\u001dvM}\u0013GP^x\u00028\u0012\u000eJ\u001apK%\u001aKVB%J}\u0012\nD\u0000v]%\u001aHV\r\u0007kNy\r\u0013O1qWs\u0004\u0014/\u0004rSkA\bN\u001duWv\u0012\u001f\u000b\bwWuA\u000eC\u000b%Qk\u0012\u000fN\u001c8C(\u001c@\u000b\u001c`Kh\u000e\u0014X\u000b8C)\u001c6'kLj\u000e\t[\u000bfLq\u000f\u001d\u000b\u000f%rO5Z_\u0001n]vA\u000fX\u0007k_8\u0015\u0012NNlKk\u0014\u001fYS~\beF]XNoOs\u0012\u001b;kKm\u0011\nD\u001cq]|A0|:%\u0010R6?\u0002NqWs\u0004\u0014L+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018q\u000f\u000eY\u0001vH}\u0002\u000eB\u0000b\u0018l\t\u001f\u000b!DMl\tZ_\u0001n]v[ZB\u001dvM}\u0013GP^x\u00148\u0002\u001b^\u001d`\u0005cP\u0007\u0016=l_v\u0000\u000e^\u001c`\u0018q\u0012ZE\u0001q\u0018n\u0000\u0016B\nL+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018q\u000f\u000eY\u0001vH}\u0002\u000eB\u0000b\u0018l\t\u001f\u000b!DMl\tZ_\u0001n]v[ZB\u001dvM}\u0013GP^x\u00148\u0002\u001b^\u001d`\u0005cP\u0007\u0018\u001bv]G\u0013\u001fF\u0001q]G\b\u0014_\u001cjKh\u0004\u0019_\u0007jV\tIv\u0018r\u0016\u0011XT%\u0011\u0004rSk>\bN\u000fagl\b\u0017N\u0001pL\r\u0007kNy\r\u0013O1qWs\u0004\u0014*'vKm\u0004\b\f\u001d%rO*)\u000b\u0007v\u0018}\b\u000eC\u000bw\u0018u\b\tX\u0007k_8\u000e\b\u000b\u0007kNy\r\u0013O!<`^j\u0004\tC\u0007k_8\u000b\r@\u001d%W~A\u000eC\u000b%Qk\u0012\u000fN\u001c8C(\u001c\u000e\u0007kL}\u0013\u0014J\u0002Z]j\u0013\u0015Y";
      int var4 = "+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018h\u0013\u001f[\u000fwQv\u0006Z_\u0006`\u0018q\u0012\t^\u000bw\u0005\u0019=pQl\u0000\u0018G\u000b%rO*ZB\u001d%Vw\u0015ZM\u0001pV|6-jMt\u0005ZE\u0001q\u0018q\u000f\u000eY\u0001vH}\u0002\u000e\u000b\u001am]8\u0015\u0015@\u000bk\u0018m\u0012\u0013E\t%Lp\u0004ZB\u001dvM}\u0013]XNOoS2\u0002T%N$Rl8\u0015\u0015@\u000bk\u0018q\u0012ZE\u0001q\u0018yA\tB\tkYl\u0014\bNNgYk\u0004\u001e\u0007NcYt\r\u0013E\t%Zy\u0002\u0011\u000b\u001aj\u0018l\t\u001f\u000b\u0007vKm\u0004\b\u0016\u00155E?F\t\u000b\u000bk\\h\u000e\u0013E\u001a\u0003\u0005l\\M+wJw\u0013Z[\u000fwKq\u000f\u001d\u000b\u001am]8\u000b\r@\u001d%J}\u0012\nD\u0000v]8\u0007\bD\u0003%Lp\u0004ZB\u001dvM}\u0013GP^x\u00028\u0012\u000eJ\u001apK%\u001aKVB%J}\u0012\nD\u0000v]%\u001aHV\r\u0007kNy\r\u0013O1qWs\u0004\u0014/\u0004rSkA\bN\u001duWv\u0012\u001f\u000b\bwWuA\u000eC\u000b%Qk\u0012\u000fN\u001c8C(\u001c@\u000b\u001c`Kh\u000e\u0014X\u000b8C)\u001c6'kLj\u000e\t[\u000bfLq\u000f\u001d\u000b\u000f%rO5Z_\u0001n]vA\u000fX\u0007k_8\u0015\u0012NNlKk\u0014\u001fYS~\beF]XNoOs\u0012\u001b;kKm\u0011\nD\u001cq]|A0|:%\u0010R6?\u0002NqWs\u0004\u0014L+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018q\u000f\u000eY\u0001vH}\u0002\u000eB\u0000b\u0018l\t\u001f\u000b!DMl\tZ_\u0001n]v[ZB\u001dvM}\u0013GP^x\u00148\u0002\u001b^\u001d`\u0005cP\u0007\u0016=l_v\u0000\u000e^\u001c`\u0018q\u0012ZE\u0001q\u0018n\u0000\u0016B\nL+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018q\u000f\u000eY\u0001vH}\u0002\u000eB\u0000b\u0018l\t\u001f\u000b!DMl\tZ_\u0001n]v[ZB\u001dvM}\u0013GP^x\u00148\u0002\u001b^\u001d`\u0005cP\u0007\u0018\u001bv]G\u0013\u001fF\u0001q]G\b\u0014_\u001cjKh\u0004\u0019_\u0007jV\tIv\u0018r\u0016\u0011XT%\u0011\u0004rSk>\bN\u000fagl\b\u0017N\u0001pL\r\u0007kNy\r\u0013O1qWs\u0004\u0014*'vKm\u0004\b\f\u001d%rO*)\u000b\u0007v\u0018}\b\u000eC\u000bw\u0018u\b\tX\u0007k_8\u000e\b\u000b\u0007kNy\r\u0013O!<`^j\u0004\tC\u0007k_8\u000b\r@\u001d%W~A\u000eC\u000b%Qk\u0012\u000fN\u001c8C(\u001c\u000e\u0007kL}\u0013\u0014J\u0002Z]j\u0013\u0015Y"
         .length();
      char var1 = '-';
      int var7 = -1;

      label24:
      while (true) {
         String var10000 = var2.substring(++var7, var7 + var1);
         byte var10001 = -1;

         while (true) {
            String var13 = c(d(var10000));
            switch (var10001) {
               case 0:
                  var5[var3++] = var13;
                  if ((var7 += var1) >= var4) {
                     n = var5;
                     g = Logger.getLogger(OAuthJWTTokenIntrospector.class.getName());
                     String[] var8 = n;
                     h = OAuthIntrospectionResult.newErrorResult(null, var8[7], var8[22]);
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var13;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018j\u0004\u001cY\u000bvPq\u000f\u001d\u000b\u0004rSkA\u001cD\u001c%Lp\u0004ZB\u001dvM}\u0013G\u0011'kNy\r\u0013ONOoLA\u000eD\u0005`V";
                  var4 = "+wJw\u0013ZN\u0000fWm\u000f\u000eN\u001c`\\8\u0016\u0012B\u0002`\u0018j\u0004\u001cY\u000bvPq\u000f\u001d\u000b\u0004rSkA\u001cD\u001c%Lp\u0004ZB\u001dvM}\u0013G\u0011'kNy\r\u0013ONOoLA\u000eD\u0005`V"
                     .length();
                  var1 = '7';
                  var7 = -1;
            }

            var10000 = var2.substring(++var7, var7 + var1);
            var10001 = 0;
         }
      }
   }

   private static char[] d(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 43);
      }

      return var10000;
   }

   private static String c(char[] var0) {
      int var10002 = var0.length;
      char[] var10001 = var0;
      int var10000 = var10002;

      for (int var1 = 0; var10000 > var1; var1++) {
         var10001[var1] = (char)(var10001[var1] ^ switch (var1 % 7) {
            case 0 -> 110;
            case 1 -> 5;
            case 2 -> 56;
            case 3 -> 24;
            case 4 -> 97;
            case 5 -> 122;
            default -> 43;
         });
      }

      return new String(var10001).intern();
   }
}
