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

import com.l7tech.common.http.GenericHttpClientFactory;
import com.l7tech.common.http.SimpleHttpClient;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.credential.WsTrustCredentialExchange;
import com.l7tech.security.xml.SecurityTokenResolver;
import com.l7tech.security.xml.processor.WssProcessor;
import com.l7tech.security.xml.processor.WssProcessorImpl;
import com.l7tech.server.message.PolicyEnforcementContext;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import org.springframework.context.ApplicationContext;

public class ServerWsTrustCredentialExchange extends AbstractServerCachedSecurityTokenAssertion<WsTrustCredentialExchange> {
   private static final String g;
   private final SimpleHttpClient h;
   private final URL i;
   private final WssProcessor j = new WssProcessorImpl();
   private final SecurityTokenResolver k;
   private static final String[] l;

   public ServerWsTrustCredentialExchange(WsTrustCredentialExchange var1, ApplicationContext var2) {
      super(var1, g);
      String[] var4 = l;
      this.h = new SimpleHttpClient(((GenericHttpClientFactory)var2.getBean(var4[3], GenericHttpClientFactory.class)).createHttpClient());

      try {
         if (var1.getTokenServiceUrl() != null) {
            this.i = new URL(var1.getTokenServiceUrl());
         } else {
            this.i = null;
            var4 = l;
            this.logger.warning(var4[4]);
         }
      } catch (MalformedURLException var5) {
         var4 = l;
         throw (IllegalArgumentException)new IllegalArgumentException(var4[1]).initCause(var5);
      }

      this.k = (SecurityTokenResolver)var2.getBean(l[5]);
   }

   @Override
   public AssertionStatus checkRequest(PolicyEnforcementContext param1) throws IOException, PolicyAssertionException {
      // $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: aload 1
      // 001: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 006: ldc com/l7tech/message/XmlKnob
      // 008: invokevirtual com/l7tech/message/Message.getKnob (Ljava/lang/Class;)Ljava/lang/Object;
      // 00b: checkcast com/l7tech/message/XmlKnob
      // 00e: astore 2
      // 00f: aload 2
      // 010: ifnonnull 022
      // 013: aload 0
      // 014: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_NON_XML_MESSAGE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 017: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 01a: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 01d: areturn
      // 01e: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 021: athrow
      // 022: aload 1
      // 023: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 028: ldc com/l7tech/message/SecurityKnob
      // 02a: invokevirtual com/l7tech/message/Message.getKnob (Ljava/lang/Class;)Ljava/lang/Object;
      // 02d: checkcast com/l7tech/message/SecurityKnob
      // 030: astore 3
      // 031: aconst_null
      // 032: astore 4
      // 034: aconst_null
      // 035: astore 5
      // 037: aload 3
      // 038: ifnull 0af
      // 03b: aload 3
      // 03c: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 041: astore 6
      // 043: aload 6
      // 045: ifnull 0af
      // 048: aload 6
      // 04a: invokeinterface com/l7tech/security/xml/processor/ProcessorResult.getXmlSecurityTokens ()[Lcom/l7tech/security/token/XmlSecurityToken; 1
      // 04f: astore 7
      // 051: aload 7
      // 053: astore 8
      // 055: aload 8
      // 057: arraylength
      // 058: istore 9
      // 05a: bipush 0
      // 05b: istore 10
      // 05d: iload 10
      // 05f: iload 9
      // 061: if_icmpge 0af
      // 064: aload 8
      // 066: iload 10
      // 068: aaload
      // 069: astore 11
      // 06b: aload 11
      // 06d: instanceof com/l7tech/xml/saml/SamlAssertion
      // 070: ifne 082
      // 073: aload 11
      // 075: instanceof com/l7tech/security/token/UsernameToken
      // 078: ifeq 0a9
      // 07b: goto 082
      // 07e: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 081: athrow
      // 082: aload 4
      // 084: ifnonnull 09e
      // 087: goto 08e
      // 08a: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 08d: athrow
      // 08e: aload 11
      // 090: astore 4
      // 092: aload 11
      // 094: invokeinterface com/l7tech/security/token/XmlSecurityToken.asElement ()Lorg/w3c/dom/Element; 1
      // 099: astore 5
      // 09b: goto 0a9
      // 09e: aload 0
      // 09f: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_MULTI_TOKENS Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0a2: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 0a5: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0a8: areturn
      // 0a9: iinc 10 1
      // 0ac: goto 05d
      // 0af: aload 4
      // 0b1: ifnonnull 101
      // 0b4: aload 1
      // 0b5: aload 1
      // 0b6: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 0bb: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getAuthenticationContext (Lcom/l7tech/message/Message;)Lcom/l7tech/server/message/AuthenticationContext; 2
      // 0c0: invokevirtual com/l7tech/server/message/AuthenticationContext.getLastCredentials ()Lcom/l7tech/policy/assertion/credential/LoginCredentials;
      // 0c3: astore 6
      // 0c5: aload 6
      // 0c7: ifnull 101
      // 0ca: aload 6
      // 0cc: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getPayload ()Ljava/lang/Object;
      // 0cf: astore 7
      // 0d1: aload 7
      // 0d3: instanceof com/l7tech/security/token/XmlSecurityToken
      // 0d6: ifeq 0e3
      // 0d9: aload 7
      // 0db: checkcast com/l7tech/security/token/XmlSecurityToken
      // 0de: astore 4
      // 0e0: goto 101
      // 0e3: aload 6
      // 0e5: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getFormat ()Lcom/l7tech/policy/assertion/credential/CredentialFormat;
      // 0e8: getstatic com/l7tech/policy/assertion/credential/CredentialFormat.CLEARTEXT Lcom/l7tech/policy/assertion/credential/CredentialFormat;
      // 0eb: if_acmpne 101
      // 0ee: new com/l7tech/security/token/UsernameTokenImpl
      // 0f1: dup
      // 0f2: aload 6
      // 0f4: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getLogin ()Ljava/lang/String;
      // 0f7: aload 6
      // 0f9: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getCredentials ()[C
      // 0fc: invokespecial com/l7tech/security/token/UsernameTokenImpl.<init> (Ljava/lang/String;[C)V
      // 0ff: astore 4
      // 101: aload 4
      // 103: ifnonnull 115
      // 106: aload 0
      // 107: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_NO_SUITABLE_CREDENTIALS Lcom/l7tech/gateway/common/audit/Messages$M;
      // 10a: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 10d: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 110: areturn
      // 111: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 114: athrow
      // 115: aload 0
      // 116: aload 1
      // 117: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getCache ()Lcom/l7tech/server/message/PolicyContextCache; 1
      // 11c: invokespecial com/l7tech/server/policy/assertion/credential/AbstractServerCachedSecurityTokenAssertion.getCachedSecurityToken (Lcom/l7tech/server/message/PolicyContextCache;)Lcom/l7tech/security/token/SecurityToken;
      // 11f: astore 6
      // 121: aload 6
      // 123: ifnonnull 1f4
      // 126: aload 0
      // 127: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 12a: checkcast com/l7tech/policy/assertion/credential/WsTrustCredentialExchange
      // 12d: invokevirtual com/l7tech/policy/assertion/credential/WsTrustCredentialExchange.getWsTrustNamespace ()Ljava/lang/String;
      // 130: ifnonnull 144
      // 133: goto 13a
      // 136: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 139: athrow
      // 13a: invokestatic com/l7tech/security/wstrust/WsTrustConfigFactory.getDefaultWsTrustConfig ()Lcom/l7tech/security/wstrust/WsTrustConfig;
      // 13d: goto 151
      // 140: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 143: athrow
      // 144: aload 0
      // 145: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 148: checkcast com/l7tech/policy/assertion/credential/WsTrustCredentialExchange
      // 14b: invokevirtual com/l7tech/policy/assertion/credential/WsTrustCredentialExchange.getWsTrustNamespace ()Ljava/lang/String;
      // 14e: invokestatic com/l7tech/security/wstrust/WsTrustConfigFactory.getWsTrustConfigForNamespaceUri (Ljava/lang/String;)Lcom/l7tech/security/wstrust/WsTrustConfig;
      // 151: astore 10
      // 153: new com/l7tech/security/wstrust/TokenServiceClient
      // 156: dup
      // 157: aload 10
      // 159: invokespecial com/l7tech/security/wstrust/TokenServiceClient.<init> (Lcom/l7tech/security/wstrust/WsTrustConfig;)V
      // 15c: astore 11
      // 15e: aload 11
      // 160: aconst_null
      // 161: aload 0
      // 162: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 165: checkcast com/l7tech/policy/assertion/credential/WsTrustCredentialExchange
      // 168: invokevirtual com/l7tech/policy/assertion/credential/WsTrustCredentialExchange.getRequestType ()Lcom/l7tech/xml/WsTrustRequestType;
      // 16b: aload 4
      // 16d: aload 0
      // 16e: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 171: checkcast com/l7tech/policy/assertion/credential/WsTrustCredentialExchange
      // 174: invokevirtual com/l7tech/policy/assertion/credential/WsTrustCredentialExchange.getAppliesTo ()Ljava/lang/String;
      // 177: aload 0
      // 178: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 17b: checkcast com/l7tech/policy/assertion/credential/WsTrustCredentialExchange
      // 17e: invokevirtual com/l7tech/policy/assertion/credential/WsTrustCredentialExchange.getIssuer ()Ljava/lang/String;
      // 181: invokevirtual com/l7tech/security/wstrust/TokenServiceClient.createRequestSecurityTokenMessage (Lcom/l7tech/security/token/SecurityTokenType;Lcom/l7tech/xml/WsTrustRequestType;Lcom/l7tech/security/token/XmlSecurityToken;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Document;
      // 184: astore 8
      // 186: new com/l7tech/common/http/GenericHttpRequestParams
      // 189: dup
      // 18a: aload 0
      // 18b: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.i Ljava/net/URL;
      // 18e: invokespecial com/l7tech/common/http/GenericHttpRequestParams.<init> (Ljava/net/URL;)V
      // 191: astore 9
      // 193: aload 9
      // 195: getstatic com/l7tech/common/mime/ContentTypeHeader.XML_DEFAULT Lcom/l7tech/common/mime/ContentTypeHeader;
      // 198: invokevirtual com/l7tech/common/http/GenericHttpRequestParams.setContentType (Lcom/l7tech/common/mime/ContentTypeHeader;)V
      // 19b: aload 9
      // 19d: bipush 1
      // 19e: anewarray 436
      // 1a1: dup
      // 1a2: bipush 0
      // 1a3: new com/l7tech/common/http/GenericHttpHeader
      // 1a6: dup
      // 1a7: getstatic com/l7tech/util/SoapConstants.SOAPACTION Ljava/lang/String;
      // 1aa: getstatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.l [Ljava/lang/String;
      // 1ad: bipush 2
      // 1ae: aaload
      // 1af: invokespecial com/l7tech/common/http/GenericHttpHeader.<init> (Ljava/lang/String;Ljava/lang/String;)V
      // 1b2: aastore
      // 1b3: invokevirtual com/l7tech/common/http/GenericHttpRequestParams.setExtraHeaders ([Lcom/l7tech/common/http/HttpHeader;)V
      // 1b6: aload 0
      // 1b7: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.h Lcom/l7tech/common/http/SimpleHttpClient;
      // 1ba: aload 9
      // 1bc: aload 8
      // 1be: invokevirtual com/l7tech/common/http/SimpleHttpClient.postXml (Lcom/l7tech/common/http/GenericHttpRequestParams;Lorg/w3c/dom/Document;)Lcom/l7tech/common/http/SimpleHttpClient$SimpleXmlResponse;
      // 1c1: astore 12
      // 1c3: aload 12
      // 1c5: invokeinterface com/l7tech/common/http/SimpleHttpClient$SimpleXmlResponse.getStatus ()I 1
      // 1ca: istore 13
      // 1cc: iload 13
      // 1ce: sipush 200
      // 1d1: if_icmpeq 1df
      // 1d4: aload 0
      // 1d5: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_RSTR_STATUS_NON_200 Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1d8: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 1db: getstatic com/l7tech/policy/assertion/AssertionStatus.AUTH_REQUIRED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 1de: areturn
      // 1df: aload 12
      // 1e1: invokeinterface com/l7tech/common/http/SimpleHttpClient$SimpleXmlResponse.getDocument ()Lorg/w3c/dom/Document; 1
      // 1e6: astore 14
      // 1e8: aload 11
      // 1ea: aload 14
      // 1ec: invokevirtual com/l7tech/security/wstrust/TokenServiceClient.parseUnsignedRequestSecurityTokenResponse (Lorg/w3c/dom/Document;)Ljava/lang/Object;
      // 1ef: astore 7
      // 1f1: goto 1f8
      // 1f4: aload 6
      // 1f6: astore 7
      // 1f8: aload 2
      // 1f9: invokeinterface com/l7tech/message/XmlKnob.getDocumentWritable ()Lorg/w3c/dom/Document; 1
      // 1fe: astore 8
      // 200: aload 5
      // 202: ifnonnull 213
      // 205: aload 0
      // 206: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_ORIGINAL_TOKEN_NOT_XML Lcom/l7tech/gateway/common/audit/Messages$M;
      // 209: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 20c: goto 246
      // 20f: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 212: athrow
      // 213: aload 5
      // 215: invokeinterface org/w3c/dom/Element.getParentNode ()Lorg/w3c/dom/Node; 1
      // 21a: astore 9
      // 21c: aload 9
      // 21e: aload 5
      // 220: invokeinterface org/w3c/dom/Node.removeChild (Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node; 2
      // 225: pop
      // 226: aload 9
      // 228: invokeinterface org/w3c/dom/Node.getFirstChild ()Lorg/w3c/dom/Node; 1
      // 22d: ifnonnull 246
      // 230: aload 9
      // 232: invokeinterface org/w3c/dom/Node.getParentNode ()Lorg/w3c/dom/Node; 1
      // 237: aload 9
      // 239: invokeinterface org/w3c/dom/Node.removeChild (Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node; 2
      // 23e: pop
      // 23f: goto 246
      // 242: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 245: athrow
      // 246: new com/l7tech/security/xml/decorator/DecorationRequirements
      // 249: dup
      // 24a: invokespecial com/l7tech/security/xml/decorator/DecorationRequirements.<init> ()V
      // 24d: astore 9
      // 24f: new com/l7tech/security/xml/decorator/WssDecoratorImpl
      // 252: dup
      // 253: invokespecial com/l7tech/security/xml/decorator/WssDecoratorImpl.<init> ()V
      // 256: astore 10
      // 258: aload 9
      // 25a: bipush 1
      // 25b: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setSecurityHeaderReusable (Z)V
      // 25e: aload 3
      // 25f: ifnull 28d
      // 262: aload 3
      // 263: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 268: astore 11
      // 26a: aload 11
      // 26c: ifnull 28d
      // 26f: aload 11
      // 271: invokeinterface com/l7tech/security/xml/processor/ProcessorResult.getTimestamp ()Lcom/l7tech/security/xml/processor/WssTimestamp; 1
      // 276: ifnull 28d
      // 279: goto 280
      // 27c: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 27f: athrow
      // 280: aload 9
      // 282: bipush 0
      // 283: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setIncludeTimestamp (Z)V
      // 286: goto 28d
      // 289: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 28c: athrow
      // 28d: aload 7
      // 28f: instanceof com/l7tech/xml/saml/SamlAssertion
      // 292: ifeq 2d7
      // 295: aload 7
      // 297: checkcast com/l7tech/xml/saml/SamlAssertion
      // 29a: astore 11
      // 29c: aload 0
      // 29d: aload 1
      // 29e: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getCache ()Lcom/l7tech/server/message/PolicyContextCache; 1
      // 2a3: aload 11
      // 2a5: aload 0
      // 2a6: aload 11
      // 2a8: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.getSamlAssertionExpiry (Lcom/l7tech/xml/saml/SamlAssertion;)J
      // 2ab: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.setCachedSecurityToken (Lcom/l7tech/server/message/PolicyContextCache;Lcom/l7tech/security/token/SecurityToken;J)V
      // 2ae: aload 1
      // 2af: aload 1
      // 2b0: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 2b5: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getAuthenticationContext (Lcom/l7tech/message/Message;)Lcom/l7tech/server/message/AuthenticationContext; 2
      // 2ba: aload 11
      // 2bc: aload 0
      // 2bd: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 2c0: checkcast com/l7tech/policy/assertion/credential/WsTrustCredentialExchange
      // 2c3: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 2c6: invokestatic com/l7tech/policy/assertion/credential/LoginCredentials.makeLoginCredentials (Lcom/l7tech/security/token/SecurityToken;Ljava/lang/Class;)Lcom/l7tech/policy/assertion/credential/LoginCredentials;
      // 2c9: invokevirtual com/l7tech/server/message/AuthenticationContext.addCredentials (Lcom/l7tech/policy/assertion/credential/LoginCredentials;)V
      // 2cc: aload 9
      // 2ce: aload 11
      // 2d0: bipush 0
      // 2d1: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setSenderSamlToken (Lcom/l7tech/xml/saml/SamlAssertion;Z)V
      // 2d4: goto 320
      // 2d7: aload 7
      // 2d9: instanceof com/l7tech/security/token/UsernameToken
      // 2dc: ifeq 315
      // 2df: aload 7
      // 2e1: checkcast com/l7tech/security/token/UsernameToken
      // 2e4: astore 11
      // 2e6: aload 0
      // 2e7: aload 1
      // 2e8: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getCache ()Lcom/l7tech/server/message/PolicyContextCache; 1
      // 2ed: aload 11
      // 2ef: aload 0
      // 2f0: aload 11
      // 2f2: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.getUsernameTokenExpiry (Lcom/l7tech/security/token/UsernameToken;)J
      // 2f5: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.setCachedSecurityToken (Lcom/l7tech/server/message/PolicyContextCache;Lcom/l7tech/security/token/SecurityToken;J)V
      // 2f8: aload 9
      // 2fa: new com/l7tech/security/token/UsernameTokenImpl
      // 2fd: dup
      // 2fe: aload 11
      // 300: invokeinterface com/l7tech/security/token/UsernameToken.getUsername ()Ljava/lang/String; 1
      // 305: aload 11
      // 307: invokeinterface com/l7tech/security/token/UsernameToken.getPassword ()[C 1
      // 30c: invokespecial com/l7tech/security/token/UsernameTokenImpl.<init> (Ljava/lang/String;[C)V
      // 30f: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setUsernameTokenCredentials (Lcom/l7tech/security/token/UsernameToken;)V
      // 312: goto 320
      // 315: aload 0
      // 316: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_RSTR_BAD_TYPE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 319: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 31c: getstatic com/l7tech/policy/assertion/AssertionStatus.AUTH_REQUIRED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 31f: areturn
      // 320: aload 0
      // 321: aload 1
      // 322: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.addCacheInvalidator (Lcom/l7tech/server/message/PolicyEnforcementContext;)V
      // 325: aload 10
      // 327: new com/l7tech/message/Message
      // 32a: dup
      // 32b: aload 8
      // 32d: invokespecial com/l7tech/message/Message.<init> (Lorg/w3c/dom/Document;)V
      // 330: aload 9
      // 332: invokeinterface com/l7tech/security/xml/decorator/WssDecorator.decorateMessage (Lcom/l7tech/message/Message;Lcom/l7tech/security/xml/decorator/DecorationRequirements;)Lcom/l7tech/security/xml/decorator/WssDecorator$DecorationResult; 3
      // 337: pop
      // 338: aload 2
      // 339: aload 8
      // 33b: invokeinterface com/l7tech/message/XmlKnob.setDocument (Lorg/w3c/dom/Document;)V 2
      // 340: aload 1
      // 341: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 346: astore 11
      // 348: aload 3
      // 349: ifnull 354
      // 34c: aload 3
      // 34d: goto 359
      // 350: invokestatic com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 353: athrow
      // 354: aload 11
      // 356: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 359: astore 12
      // 35b: aload 12
      // 35d: aload 0
      // 35e: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.j Lcom/l7tech/security/xml/processor/WssProcessor;
      // 361: aload 11
      // 363: aconst_null
      // 364: aload 0
      // 365: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.k Lcom/l7tech/security/xml/SecurityTokenResolver;
      // 368: invokeinterface com/l7tech/security/xml/processor/WssProcessor.undecorateMessage (Lcom/l7tech/message/Message;Lcom/l7tech/security/xml/processor/SecurityContextFinder;Lcom/l7tech/security/xml/SecurityTokenResolver;)Lcom/l7tech/security/xml/processor/ProcessorResult; 4
      // 36d: invokeinterface com/l7tech/message/SecurityKnob.setProcessorResult (Lcom/l7tech/security/xml/processor/ProcessorResult;)V 2
      // 372: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 375: areturn
      // 376: astore 11
      // 378: aload 0
      // 379: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_DECORATION_FAILED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 37c: aconst_null
      // 37d: aload 11
      // 37f: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 382: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 385: areturn
      // 386: astore 7
      // 388: aload 0
      // 389: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_SERVER_HTTP_FAILED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 38c: aconst_null
      // 38d: aload 7
      // 38f: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 392: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 395: areturn
      // 396: astore 7
      // 398: aload 0
      // 399: getstatic com/l7tech/gateway/common/audit/AssertionMessages.HTTPROUTE_ERROR_READING_RESPONSE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 39c: aconst_null
      // 39d: aload 7
      // 39f: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 3a2: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 3a5: areturn
      // 3a6: astore 7
      // 3a8: aload 0
      // 3a9: getstatic com/l7tech/gateway/common/audit/AssertionMessages.HTTPROUTE_ERROR_READING_RESPONSE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 3ac: aconst_null
      // 3ad: aload 7
      // 3af: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 3b2: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 3b5: areturn
      // 3b6: astore 7
      // 3b8: aload 0
      // 3b9: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSTRUST_NOT_SUPPORTED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 3bc: bipush 1
      // 3bd: anewarray 339
      // 3c0: dup
      // 3c1: bipush 0
      // 3c2: aload 0
      // 3c3: getfield com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 3c6: checkcast com/l7tech/policy/assertion/credential/WsTrustCredentialExchange
      // 3c9: invokevirtual com/l7tech/policy/assertion/credential/WsTrustCredentialExchange.getWsTrustNamespace ()Ljava/lang/String;
      // 3cc: aastore
      // 3cd: invokevirtual com/l7tech/server/policy/assertion/credential/ServerWsTrustCredentialExchange.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 3d0: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 3d3: areturn
      // try (349 -> 353): 353 java/lang/Exception
      // try (124 -> 134): 134 java/lang/Exception
      // try (122 -> 129): 130 java/lang/Exception
      // try (108 -> 115): 115 java/lang/Exception
      // try (52 -> 60): 61 java/lang/Exception
      // try (49 -> 55): 56 java/lang/Exception
      // try (6 -> 13): 13 java/lang/Exception
      // try (335 -> 368): 369 java/lang/Exception
      // try (122 -> 203): 377 com/l7tech/common/http/GenericHttpException
      // try (261 -> 270): 271 java/lang/Exception
      // try (259 -> 264): 265 java/lang/Exception
      // try (228 -> 240): 241 java/lang/Exception
      // try (217 -> 223): 223 java/lang/Exception
      // try (204 -> 331): 377 com/l7tech/common/http/GenericHttpException
      // try (332 -> 368): 377 com/l7tech/common/http/GenericHttpException
      // try (369 -> 376): 377 com/l7tech/common/http/GenericHttpException
      // try (122 -> 203): 385 org/xml/sax/SAXException
      // try (204 -> 331): 385 org/xml/sax/SAXException
      // try (332 -> 368): 385 org/xml/sax/SAXException
      // try (369 -> 376): 385 org/xml/sax/SAXException
      // try (122 -> 203): 393 com/l7tech/util/InvalidDocumentFormatException
      // try (204 -> 331): 393 com/l7tech/util/InvalidDocumentFormatException
      // try (332 -> 368): 393 com/l7tech/util/InvalidDocumentFormatException
      // try (369 -> 376): 393 com/l7tech/util/InvalidDocumentFormatException
      // try (122 -> 203): 401 com/l7tech/security/wstrust/WsTrustConfigException
      // try (204 -> 331): 401 com/l7tech/security/wstrust/WsTrustConfigException
      // try (332 -> 368): 401 com/l7tech/security/wstrust/WsTrustConfigException
      // try (369 -> 376): 401 com/l7tech/security/wstrust/WsTrustConfigException
   }

   static {
      String[] var5 = new String[6];
      int var3 = 0;
      String var2 = "Maw_km\u001c6[YvBF\"\u0017Z\u0018dOQq\u0006\u0015oG\u0003wp\u0016FL4{qN\u0002A\u0017\u0018\u0002[Wz{Qn+ALdmOk\u0006[LRO@v\fGA";
      int var4 = "Maw_km\u001c6[YvBF\"\u0017Z\u0018dOQq\u0006\u0015oG\u0003wp\u0016FL4{qN\u0002A\u0017\u0018\u0002[Wz{Qn+ALdmOk\u0006[LRO@v\fGA".length();
      char var1 = 6;
      int var7 = -1;

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

         while (true) {
            String var8 = c(var10000, b(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     l = var5;
                     g = ServerWsTrustCredentialExchange.class.getName() + l[0];
                     return;
                  }

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

                  var2 = "V;2\u0010!b0g&/\u001c,'CW\u0006\u0015U&1Cl!5\u0019tb\u0002q'<\u0007;+\flt0\u0006o,\fly?\u0000!!\u0017k;7\u0014#\u0015q1:\u0000=+\u0017{\u00006\u001e*,1g'6\u00199'\u0011";
                  var4 = "V;2\u0010!b0g&/\u001c,'CW\u0006\u0015U&1Cl!5\u0019tb\u0002q'<\u0007;+\flt0\u0006o,\fly?\u0000!!\u0017k;7\u0014#\u0015q1:\u0000=+\u0017{\u00006\u001e*,1g'6\u00199'\u0011"
                     .length();
                  var1 = '6';
                  var7 = -1;
            }

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

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

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

      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 -> 50;
            case 1 -> 100;
            case 2 -> 105;
            case 3 -> 69;
            case 4 -> 127;
            case 5 -> 114;
            default -> 83;
         });
      }

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