package com.l7tech.server.policy.assertion.identity;

import com.l7tech.identity.AuthenticationException;
import com.l7tech.identity.IdentityProvider;
import com.l7tech.message.Message;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.ObjectNotFoundException;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.credential.LoginCredentials;
import com.l7tech.policy.assertion.identity.IdentityAssertion;
import com.l7tech.policy.assertion.identity.MemberOfGroup;
import com.l7tech.policy.assertion.identity.SpecificUser;
import com.l7tech.server.identity.AuthenticationResult;
import com.l7tech.server.identity.IdentityProviderFactory;
import com.l7tech.server.message.AuthenticationContext;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.AbstractMessageTargetableServerAssertion;
import com.l7tech.util.Pair;
import java.security.cert.X509Certificate;
import java.util.List;
import java.util.logging.Level;
import org.springframework.context.ApplicationContext;

public abstract class ServerIdentityAssertion<AT extends IdentityAssertion> extends AbstractMessageTargetableServerAssertion<AT> {
   private final IdentityProviderFactory d;
   private static final String[] h;

   public ServerIdentityAssertion(AT var1, ApplicationContext var2) {
      super((AT)var1);
      if (var2 == null) {
         String[] var3 = h;
         throw new IllegalArgumentException(var3[10]);
      }

      this.d = (IdentityProviderFactory)var2.getBean(h[0], IdentityProviderFactory.class);
   }

   @Override
   protected AssertionStatus doCheckRequest(PolicyEnforcementContext param1, Message param2, String param3, AuthenticationContext param4) {
      // $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: new java/util/ArrayList
      // 003: dup
      // 004: invokespecial java/util/ArrayList.<init> ()V
      // 007: astore 5
      // 009: aload 4
      // 00b: invokevirtual com/l7tech/server/message/AuthenticationContext.getCredentials ()Ljava/util/List;
      // 00e: astore 6
      // 010: aload 6
      // 012: invokeinterface java/util/List.size ()I 1
      // 017: bipush 1
      // 018: if_icmpge 078
      // 01b: aload 4
      // 01d: invokevirtual com/l7tech/server/message/AuthenticationContext.getLastAuthenticatedUser ()Lcom/l7tech/identity/User;
      // 020: ifnonnull 078
      // 023: goto 02a
      // 026: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 029: athrow
      // 02a: aload 4
      // 02c: invokevirtual com/l7tech/server/message/AuthenticationContext.isAuthenticated ()Z
      // 02f: ifeq 059
      // 032: goto 039
      // 035: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 038: athrow
      // 039: aload 0
      // 03a: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_AUTHENTICATED_NO_CREDS Lcom/l7tech/gateway/common/audit/Messages$M;
      // 03d: bipush 1
      // 03e: anewarray 368
      // 041: dup
      // 042: bipush 0
      // 043: aload 3
      // 044: aastore
      // 045: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 048: new java/lang/IllegalStateException
      // 04b: dup
      // 04c: getstatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.h [Ljava/lang/String;
      // 04f: bipush 2
      // 050: aaload
      // 051: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      // 054: athrow
      // 055: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 058: athrow
      // 059: aload 0
      // 05a: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.isRequest ()Z
      // 05d: ifeq 06d
      // 060: aload 1
      // 061: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setAuthenticationMissing ()V 1
      // 066: goto 06d
      // 069: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 06c: athrow
      // 06d: aload 0
      // 06e: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_NO_CREDS Lcom/l7tech/gateway/common/audit/Messages$M;
      // 071: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 074: getstatic com/l7tech/policy/assertion/AssertionStatus.AUTH_REQUIRED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 077: areturn
      // 078: aload 0
      // 079: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 07c: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 07f: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.getIdentityProviderOid ()Lcom/l7tech/objectmodel/Goid;
      // 082: invokestatic com/l7tech/objectmodel/Goid.isDefault (Lcom/l7tech/objectmodel/Goid;)Z
      // 085: ifeq 0a1
      // 088: aload 0
      // 089: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_PROVIDER_NOT_SET Lcom/l7tech/gateway/common/audit/Messages$M;
      // 08c: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 08f: new java/lang/IllegalStateException
      // 092: dup
      // 093: getstatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.h [Ljava/lang/String;
      // 096: bipush 7
      // 098: aaload
      // 099: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      // 09c: athrow
      // 09d: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0a0: athrow
      // 0a1: getstatic com/l7tech/policy/assertion/AssertionStatus.UNDEFINED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0a4: astore 7
      // 0a6: aload 0
      // 0a7: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.getIdentityProvider ()Lcom/l7tech/identity/IdentityProvider;
      // 0aa: astore 8
      // 0ac: goto 0eb
      // 0af: astore 9
      // 0b1: aload 0
      // 0b2: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_PROVIDER_NOT_EXIST Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0b5: bipush 1
      // 0b6: anewarray 368
      // 0b9: dup
      // 0ba: bipush 0
      // 0bb: aload 9
      // 0bd: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 0c0: aastore
      // 0c1: aload 9
      // 0c3: invokestatic com/l7tech/util/ExceptionUtils.getDebugException (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 0c6: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 0c9: getstatic com/l7tech/policy/assertion/AssertionStatus.AUTH_FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0cc: areturn
      // 0cd: astore 9
      // 0cf: aload 0
      // 0d0: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_PROVIDER_NOT_FOUND Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0d3: bipush 1
      // 0d4: anewarray 368
      // 0d7: dup
      // 0d8: bipush 0
      // 0d9: aload 9
      // 0db: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 0de: aastore
      // 0df: aload 9
      // 0e1: invokestatic com/l7tech/util/ExceptionUtils.getDebugException (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 0e4: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 0e7: getstatic com/l7tech/policy/assertion/AssertionStatus.AUTH_FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0ea: areturn
      // 0eb: aload 0
      // 0ec: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 0ef: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 0f2: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.getIdentityTag ()Ljava/lang/String;
      // 0f5: ifnonnull 142
      // 0f8: aload 4
      // 0fa: invokevirtual com/l7tech/server/message/AuthenticationContext.getUntaggedAuthenticationResults ()Ljava/util/List;
      // 0fd: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 102: astore 9
      // 104: aload 9
      // 106: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 10b: ifeq 13f
      // 10e: aload 9
      // 110: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 115: checkcast com/l7tech/server/identity/AuthenticationResult
      // 118: astore 10
      // 11a: aload 0
      // 11b: aload 10
      // 11d: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.checkUser (Lcom/l7tech/server/identity/AuthenticationResult;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 120: astore 7
      // 122: aload 0
      // 123: aload 7
      // 125: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/AssertionStatus;)Z
      // 128: ifeq 13c
      // 12b: aload 4
      // 12d: aload 10
      // 12f: ldc ""
      // 131: invokevirtual com/l7tech/server/message/AuthenticationContext.tagAuthenticationResult (Lcom/l7tech/server/identity/AuthenticationResult;Ljava/lang/String;)Z
      // 134: pop
      // 135: aload 7
      // 137: areturn
      // 138: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 13b: athrow
      // 13c: goto 104
      // 13f: goto 1c8
      // 142: aload 4
      // 144: aload 0
      // 145: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 148: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 14b: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.getIdentityTag ()Ljava/lang/String;
      // 14e: invokevirtual com/l7tech/server/message/AuthenticationContext.getAuthenticationResultForTag (Ljava/lang/String;)Lcom/l7tech/server/identity/AuthenticationResult;
      // 151: astore 9
      // 153: aload 9
      // 155: ifnull 170
      // 158: aload 0
      // 159: aload 9
      // 15b: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.checkUser (Lcom/l7tech/server/identity/AuthenticationResult;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 15e: astore 7
      // 160: aload 0
      // 161: aload 7
      // 163: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/AssertionStatus;)Z
      // 166: ifeq 170
      // 169: aload 7
      // 16b: areturn
      // 16c: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 16f: athrow
      // 170: aload 4
      // 172: invokevirtual com/l7tech/server/message/AuthenticationContext.getUntaggedAuthenticationResults ()Ljava/util/List;
      // 175: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 17a: astore 10
      // 17c: aload 10
      // 17e: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 183: ifeq 1c8
      // 186: aload 10
      // 188: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 18d: checkcast com/l7tech/server/identity/AuthenticationResult
      // 190: astore 11
      // 192: aload 0
      // 193: aload 11
      // 195: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.checkUser (Lcom/l7tech/server/identity/AuthenticationResult;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 198: astore 7
      // 19a: aload 0
      // 19b: aload 7
      // 19d: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/AssertionStatus;)Z
      // 1a0: ifeq 1c5
      // 1a3: aload 4
      // 1a5: aload 11
      // 1a7: aload 0
      // 1a8: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 1ab: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 1ae: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.getIdentityTag ()Ljava/lang/String;
      // 1b1: invokevirtual com/l7tech/server/message/AuthenticationContext.tagAuthenticationResult (Lcom/l7tech/server/identity/AuthenticationResult;Ljava/lang/String;)Z
      // 1b4: ifeq 1c5
      // 1b7: goto 1be
      // 1ba: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1bd: athrow
      // 1be: aload 7
      // 1c0: areturn
      // 1c1: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1c4: athrow
      // 1c5: goto 17c
      // 1c8: aload 6
      // 1ca: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 1cf: astore 9
      // 1d1: aload 9
      // 1d3: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 1d8: ifeq 2d9
      // 1db: aload 9
      // 1dd: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 1e2: checkcast com/l7tech/policy/assertion/credential/LoginCredentials
      // 1e5: astore 10
      // 1e7: aload 4
      // 1e9: aload 10
      // 1eb: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getSecurityToken ()Lcom/l7tech/security/token/SecurityToken;
      // 1ee: aload 0
      // 1ef: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 1f2: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 1f5: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.getIdentityProviderOid ()Lcom/l7tech/objectmodel/Goid;
      // 1f8: invokevirtual com/l7tech/server/message/AuthenticationContext.isSecurityTokenUsed (Lcom/l7tech/security/token/SecurityToken;Lcom/l7tech/objectmodel/Goid;)Z
      // 1fb: ifeq 205
      // 1fe: goto 1d1
      // 201: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 204: athrow
      // 205: aload 0
      // 206: aload 8
      // 208: aload 10
      // 20a: aload 1
      // 20b: aload 4
      // 20d: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.validateCredentials (Lcom/l7tech/identity/IdentityProvider;Lcom/l7tech/policy/assertion/credential/LoginCredentials;Lcom/l7tech/server/message/PolicyEnforcementContext;Lcom/l7tech/server/message/AuthenticationContext;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 210: astore 7
      // 212: aload 0
      // 213: aload 7
      // 215: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/AssertionStatus;)Z
      // 218: ifeq 21e
      // 21b: aload 7
      // 21d: areturn
      // 21e: goto 2d6
      // 221: astore 11
      // 223: aload 0
      // 224: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_INVALID_CERT Lcom/l7tech/gateway/common/audit/Messages$M;
      // 227: bipush 1
      // 228: anewarray 368
      // 22b: dup
      // 22c: bipush 0
      // 22d: aload 10
      // 22f: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getLogin ()Ljava/lang/String;
      // 232: aastore
      // 233: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 236: aload 0
      // 237: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.isRequest ()Z
      // 23a: ifeq 26c
      // 23d: aload 1
      // 23e: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getResponse ()Lcom/l7tech/message/Message; 1
      // 243: ldc com/l7tech/message/HeadersKnob
      // 245: invokevirtual com/l7tech/message/Message.getKnob (Ljava/lang/Class;)Ljava/lang/Object;
      // 248: checkcast com/l7tech/message/HeadersKnob
      // 24b: astore 12
      // 24d: aload 12
      // 24f: ifnull 26c
      // 252: aload 12
      // 254: getstatic com/l7tech/common/protocol/SecureSpanConstants$HttpHeaders.CERT_STATUS Ljava/lang/String;
      // 257: getstatic com/l7tech/common/protocol/SecureSpanConstants.CERT_INVALID Ljava/lang/String;
      // 25a: getstatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.h [Ljava/lang/String;
      // 25d: bipush 12
      // 25f: aaload
      // 260: invokeinterface com/l7tech/message/HeadersKnob.addHeader (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/String;)V 4
      // 265: goto 26c
      // 268: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 26b: athrow
      // 26c: aload 0
      // 26d: aload 10
      // 26f: aload 11
      // 271: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/credential/LoginCredentials;Ljava/lang/Exception;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 274: astore 7
      // 276: goto 2d6
      // 279: astore 11
      // 27b: aload 0
      // 27c: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.isRequest ()Z
      // 27f: ifeq 28f
      // 282: aload 1
      // 283: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setAuthenticationMissing ()V 1
      // 288: goto 28f
      // 28b: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 28e: athrow
      // 28f: aload 0
      // 290: aload 10
      // 292: aload 11
      // 294: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/credential/LoginCredentials;Ljava/lang/Exception;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 297: astore 7
      // 299: goto 2d6
      // 29c: astore 11
      // 29e: aload 0
      // 29f: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_CREDENTIAL_FAILED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 2a2: bipush 2
      // 2a3: anewarray 368
      // 2a6: dup
      // 2a7: bipush 0
      // 2a8: aload 10
      // 2aa: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getLogin ()Ljava/lang/String;
      // 2ad: aastore
      // 2ae: dup
      // 2af: bipush 1
      // 2b0: aload 11
      // 2b2: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 2b5: aastore
      // 2b6: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 2b9: aload 0
      // 2ba: aload 10
      // 2bc: aload 11
      // 2be: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/credential/LoginCredentials;Ljava/lang/Exception;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 2c1: astore 7
      // 2c3: aload 5
      // 2c5: new com/l7tech/util/Pair
      // 2c8: dup
      // 2c9: aload 10
      // 2cb: aload 11
      // 2cd: invokespecial com/l7tech/util/Pair.<init> (Ljava/lang/Object;Ljava/lang/Object;)V
      // 2d0: invokeinterface java/util/List.add (Ljava/lang/Object;)Z 2
      // 2d5: pop
      // 2d6: goto 1d1
      // 2d9: aload 0
      // 2da: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_AUTHENTICATION_FAILED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 2dd: bipush 1
      // 2de: anewarray 368
      // 2e1: dup
      // 2e2: bipush 0
      // 2e3: aload 0
      // 2e4: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 2e7: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 2ea: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.loggingIdentity ()Ljava/lang/String;
      // 2ed: aastore
      // 2ee: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 2f1: aload 0
      // 2f2: aload 1
      // 2f3: aload 5
      // 2f5: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.processAuthFailure (Lcom/l7tech/server/message/PolicyEnforcementContext;Ljava/util/List;)V
      // 2f8: aload 7
      // 2fa: areturn
      // try (54 -> 70): 70 com/l7tech/objectmodel/ObjectNotFoundException
      // try (41 -> 46): 47 com/l7tech/objectmodel/ObjectNotFoundException
      // try (17 -> 39): 39 com/l7tech/objectmodel/ObjectNotFoundException
      // try (11 -> 20): 21 com/l7tech/objectmodel/ObjectNotFoundException
      // try (7 -> 14): 15 com/l7tech/objectmodel/ObjectNotFoundException
      // try (74 -> 77): 78 com/l7tech/objectmodel/ObjectNotFoundException
      // try (74 -> 77): 93 com/l7tech/objectmodel/FindException
      // try (183 -> 196): 196 com/l7tech/objectmodel/ObjectNotFoundException
      // try (179 -> 191): 192 com/l7tech/objectmodel/ObjectNotFoundException
      // try (156 -> 162): 162 com/l7tech/objectmodel/ObjectNotFoundException
      // try (128 -> 139): 139 com/l7tech/objectmodel/ObjectNotFoundException
      // try (209 -> 218): 235 com/l7tech/identity/InvalidClientCertificateException
      // try (221 -> 233): 235 com/l7tech/identity/InvalidClientCertificateException
      // try (209 -> 218): 273 com/l7tech/identity/MissingCredentialsException
      // try (221 -> 233): 273 com/l7tech/identity/MissingCredentialsException
      // try (209 -> 218): 288 com/l7tech/identity/AuthenticationException
      // try (209 -> 219): 219 com/l7tech/objectmodel/ObjectNotFoundException
      // try (221 -> 233): 288 com/l7tech/identity/AuthenticationException
      // try (255 -> 264): 265 com/l7tech/objectmodel/ObjectNotFoundException
      // try (274 -> 279): 280 com/l7tech/objectmodel/ObjectNotFoundException
   }

   protected AssertionStatus validateCredentials(
      IdentityProvider param1, LoginCredentials param2, PolicyEnforcementContext param3, AuthenticationContext param4
   ) throws AuthenticationException {
      // $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: invokestatic com/l7tech/server/identity/AuthCache.getInstance ()Lcom/l7tech/server/identity/AuthCache;
      // 003: aload 2
      // 004: aload 1
      // 005: aload 4
      // 007: invokevirtual com/l7tech/server/message/AuthenticationContext.getAuthSuccessCacheTime ()I
      // 00a: aload 4
      // 00c: invokevirtual com/l7tech/server/message/AuthenticationContext.getAuthFailureCacheTime ()I
      // 00f: invokevirtual com/l7tech/server/identity/AuthCache.getCachedAuthResult (Lcom/l7tech/policy/assertion/credential/LoginCredentials;Lcom/l7tech/identity/IdentityProvider;II)Lcom/l7tech/server/identity/AuthenticationResult;
      // 012: astore 5
      // 014: aload 5
      // 016: ifnull 028
      // 019: aload 5
      // 01b: invokevirtual com/l7tech/server/identity/AuthenticationResult.getUser ()Lcom/l7tech/identity/User;
      // 01e: ifnonnull 04e
      // 021: goto 028
      // 024: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 027: athrow
      // 028: aload 0
      // 029: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_CREDENTIAL_FAILED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 02c: bipush 2
      // 02d: anewarray 368
      // 030: dup
      // 031: bipush 0
      // 032: aload 2
      // 033: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getLogin ()Ljava/lang/String;
      // 036: aastore
      // 037: dup
      // 038: bipush 1
      // 039: getstatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.h [Ljava/lang/String;
      // 03c: bipush 8
      // 03e: aaload
      // 03f: aastore
      // 040: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 043: aload 0
      // 044: aload 2
      // 045: aconst_null
      // 046: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/credential/LoginCredentials;Ljava/lang/Exception;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 049: areturn
      // 04a: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 04d: athrow
      // 04e: aload 5
      // 050: invokevirtual com/l7tech/server/identity/AuthenticationResult.isCertSignedByStaleCA ()Z
      // 053: ifeq 093
      // 056: aload 0
      // 057: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.isRequest ()Z
      // 05a: ifeq 093
      // 05d: goto 064
      // 060: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 063: athrow
      // 064: aload 3
      // 065: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getResponse ()Lcom/l7tech/message/Message; 1
      // 06a: ldc com/l7tech/message/HeadersKnob
      // 06c: invokevirtual com/l7tech/message/Message.getKnob (Ljava/lang/Class;)Ljava/lang/Object;
      // 06f: checkcast com/l7tech/message/HeadersKnob
      // 072: astore 6
      // 074: aload 6
      // 076: ifnull 093
      // 079: aload 6
      // 07b: getstatic com/l7tech/common/protocol/SecureSpanConstants$HttpHeaders.CERT_STATUS Ljava/lang/String;
      // 07e: getstatic com/l7tech/common/protocol/SecureSpanConstants.CERT_STALE Ljava/lang/String;
      // 081: getstatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.h [Ljava/lang/String;
      // 084: bipush 11
      // 086: aaload
      // 087: invokeinterface com/l7tech/message/HeadersKnob.setHeader (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/String;)V 4
      // 08c: goto 093
      // 08f: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 092: athrow
      // 093: aload 5
      // 095: invokevirtual com/l7tech/server/identity/AuthenticationResult.getUser ()Lcom/l7tech/identity/User;
      // 098: astore 6
      // 09a: aload 6
      // 09c: invokeinterface com/l7tech/identity/User.getLogin ()Ljava/lang/String; 1
      // 0a1: astore 7
      // 0a3: aload 7
      // 0a5: ifnonnull 0b1
      // 0a8: aload 6
      // 0aa: invokeinterface com/l7tech/identity/User.getName ()Ljava/lang/String; 1
      // 0af: astore 7
      // 0b1: aload 7
      // 0b3: ifnonnull 0bf
      // 0b6: aload 6
      // 0b8: invokeinterface com/l7tech/identity/User.getSubjectDn ()Ljava/lang/String; 1
      // 0bd: astore 7
      // 0bf: aload 7
      // 0c1: ifnonnull 0cd
      // 0c4: aload 6
      // 0c6: invokeinterface com/l7tech/identity/User.getId ()Ljava/lang/String; 1
      // 0cb: astore 7
      // 0cd: aload 4
      // 0cf: aload 5
      // 0d1: invokevirtual com/l7tech/server/message/AuthenticationContext.addAuthenticationResult (Lcom/l7tech/server/identity/AuthenticationResult;)V
      // 0d4: aload 0
      // 0d5: getstatic com/l7tech/gateway/common/audit/AssertionMessages.IDENTITY_AUTHENTICATED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0d8: bipush 1
      // 0d9: anewarray 368
      // 0dc: dup
      // 0dd: bipush 0
      // 0de: aload 7
      // 0e0: aastore
      // 0e1: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 0e4: aload 0
      // 0e5: aload 5
      // 0e7: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.checkUser (Lcom/l7tech/server/identity/AuthenticationResult;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0ea: astore 8
      // 0ec: aload 0
      // 0ed: aload 8
      // 0ef: invokevirtual com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Lcom/l7tech/policy/assertion/AssertionStatus;)Z
      // 0f2: ifeq 124
      // 0f5: aload 4
      // 0f7: aload 5
      // 0f9: aload 0
      // 0fa: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 0fd: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 100: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.getIdentityTag ()Ljava/lang/String;
      // 103: ifnonnull 116
      // 106: goto 10d
      // 109: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 10c: athrow
      // 10d: ldc ""
      // 10f: goto 120
      // 112: invokestatic com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 115: athrow
      // 116: aload 0
      // 117: getfield com/l7tech/server/policy/assertion/identity/ServerIdentityAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 11a: checkcast com/l7tech/policy/assertion/identity/IdentityAssertion
      // 11d: invokevirtual com/l7tech/policy/assertion/identity/IdentityAssertion.getIdentityTag ()Ljava/lang/String;
      // 120: invokevirtual com/l7tech/server/message/AuthenticationContext.tagAuthenticationResult (Lcom/l7tech/server/identity/AuthenticationResult;Ljava/lang/String;)Z
      // 123: pop
      // 124: aload 8
      // 126: areturn
      // try (9 -> 14): 15 com/l7tech/identity/AuthenticationException
      // try (11 -> 38): 38 com/l7tech/identity/AuthenticationException
      // try (40 -> 46): 47 com/l7tech/identity/AuthenticationException
      // try (55 -> 64): 65 com/l7tech/identity/AuthenticationException
      // try (104 -> 115): 116 com/l7tech/identity/AuthenticationException
      // try (108 -> 120): 120 com/l7tech/identity/AuthenticationException
   }

   private boolean a(AssertionStatus var1) {
      return AssertionStatus.NONE.equals(var1);
   }

   private AssertionStatus a(LoginCredentials var1, Exception var2) {
      String[] var5 = h;
      this.logger.log(Level.FINE, var5[5], var2);
      String var3 = var1.getLogin();

      label45: {
         try {
            if (var3 != null && var3.length() != 0) {
               break label45;
            }
         } catch (IllegalArgumentException var8) {
            throw a(var8);
         }

         X509Certificate var4 = var1.getClientCert();
         if (var4 != null) {
            var3 = var4.getSubjectDN().getName();
         }
      }

      String var9 = this.assertion.loggingIdentity();

      try {
         if (this.assertion instanceof MemberOfGroup) {
            this.logger.info(h[1] + var9 + h[4] + var3);
            return AssertionStatus.AUTH_FAILED;
         }
      } catch (IllegalArgumentException var7) {
         throw a(var7);
      }

      try {
         if (this.assertion instanceof SpecificUser) {
            this.logger.info(h[13] + var9 + h[3] + var3);
            return AssertionStatus.AUTH_FAILED;
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      var5 = h;
      this.logger.info(var5[6] + var9 + var5[3] + var3);
      return AssertionStatus.AUTH_FAILED;
   }

   protected IdentityProvider getIdentityProvider() throws FindException {
      IdentityProvider var1 = this.d.getProvider(this.assertion.getIdentityProviderOid());

      try {
         if (var1 == null) {
            throw new ObjectNotFoundException(h[9]);
         } else {
            return var1;
         }
      } catch (FindException var2) {
         throw a(var2);
      }
   }

   protected abstract AssertionStatus checkUser(AuthenticationResult var1);

   protected void processAuthFailure(PolicyEnforcementContext var1, List<Pair<LoginCredentials, AuthenticationException>> var2) {
   }

   private static Exception a(Exception var0) {
      return var0;
   }

   static {
      String[] var5 = new String[14];
      int var3 = 0;
      String var2 = "JYP:7\u0004CZmG;5\u0004SFOs5 \u0019XQD%@R@8'MYLI\u0015\"&\u001f^ED\u00159&\u0000UFOF<*\u001d\u0017L[\u001531\u0002BS\u001d=qXD!&\u001eC\u0003TFt\"\u0018CKX[ *\u000eVWXQt!\u0018C\u0003OP%6\bDW\u001d]50MYL\u001dy;$\u0004Y`OP0&\u0003CJ\\Y'b\u0017\u0003J\\ +MTQXQ1-\u0019^BQFt%\u001fXN\u001d\u0017\u0003J\\ +MTQXQ1-\u0019^BQFt%\u001fXN\u001d\u001epXG\"&\u001f~GX[ *\u0019NbNF11\u0019^LS\u00152\"\u0004[FY\u0011@R@8'MYLI\u0015\"&\u001f^ED\u0015J`\\[s7MTBQYt \u0005R@Vg12\u0018RPI\u001d}c\u001a_FS\u0015:,MABQ\\0c\u0004SFSA=7\u0014gQRC='\bEdR\\0c\u0005VP\u001dW1&\u0003\u0017PXAu\u001evNP&c\u0003XW\u001dS;6\u0003S\u0003[Z&c\u000eEFYP:7\u0004VONBJY\u001550\u001eRQI\\;-MEF[P&0MCL\u001dT:c\u0004S\u0003MG;5\u0004SFO\u0015#+\u0004TK\u001dQ;&\u001e\u0017MRAt&\u0015^PI\u00155-\u0014ZLOP\u001fbME8*\u000eVWTZ:c.XMIP,7M^P\u001dG12\u0018^QXQ\u000bkia\u0004c%RBYP&";
      int var4 = "JYP:7\u0004CZmG;5\u0004SFOs5 \u0019XQD%@R@8'MYLI\u0015\"&\u001f^ED\u00159&\u0000UFOF<*\u001d\u0017L[\u001531\u0002BS\u001d=qXD!&\u001eC\u0003TFt\"\u0018CKX[ *\u000eVWXQt!\u0018C\u0003OP%6\bDW\u001d]50MYL\u001dy;$\u0004Y`OP0&\u0003CJ\\Y'b\u0017\u0003J\\ +MTQXQ1-\u0019^BQFt%\u001fXN\u001d\u0017\u0003J\\ +MTQXQ1-\u0019^BQFt%\u001fXN\u001d\u001epXG\"&\u001f~GX[ *\u0019NbNF11\u0019^LS\u00152\"\u0004[FY\u0011@R@8'MYLI\u0015\"&\u001f^ED\u0015J`\\[s7MTBQYt \u0005R@Vg12\u0018RPI\u001d}c\u001a_FS\u0015:,MABQ\\0c\u0004SFSA=7\u0014gQRC='\bEdR\\0c\u0005VP\u001dW1&\u0003\u0017PXAu\u001evNP&c\u0003XW\u001dS;6\u0003S\u0003[Z&c\u000eEFYP:7\u0004VONBJY\u001550\u001eRQI\\;-MEF[P&0MCL\u001dT:c\u0004S\u0003MG;5\u0004SFO\u0015#+\u0004TK\u001dQ;&\u001e\u0017MRAt&\u0015^PI\u00155-\u0014ZLOP\u001fbME8*\u000eVWTZ:c.XMIP,7M^P\u001dG12\u0018^QXQ\u000bkia\u0004c%RBYP&"
         .length();
      char var1 = 23;
      int var7 = -1;

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

         while (true) {
            String var8 = c(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     h = var5;
                     return;
                  }

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

                  var2 = "FDL)N\b\u007fot}\u000b\u001am\u007fm\u0015\n`tad8\u000f\u000b2shi8\u0010\n%tzyl\u0000N";
                  var4 = "FDL)N\b\u007fot}\u000b\u001am\u007fm\u0015\n`tad8\u000f\u000b2shi8\u0010\n%tzyl\u0000N".length();
                  var1 = 11;
                  var7 = -1;
            }

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

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

      return var10000;
   }

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

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 120;
            case 1 -> 102;
            case 2 -> 110;
            case 3 -> 15;
            case 4 -> 24;
            case 5 -> 54;
            default -> 108;
         });
      }

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