class com.mongodb.internal.connection.DefaultAuthenticator extends com.mongodb.internal.connection.Authenticator
  minor version: 0
  major version: 59
  flags: flags: (0x0020) ACC_SUPER
  this_class: com.mongodb.internal.connection.DefaultAuthenticator
  super_class: com.mongodb.internal.connection.Authenticator
{
  static final int USER_NOT_FOUND_CODE;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 11

  private static final com.mongodb.connection.ServerVersion FOUR_ZERO;
    descriptor: Lcom/mongodb/connection/ServerVersion;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  private static final com.mongodb.connection.ServerVersion THREE_ZERO;
    descriptor: Lcom/mongodb/connection/ServerVersion;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  private static final org.bson.BsonString DEFAULT_MECHANISM_NAME;
    descriptor: Lorg/bson/BsonString;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=0, args_size=0
         0: .line 41
            new com.mongodb.connection.ServerVersion
            dup
            iconst_4
            iconst_0
            invokespecial com.mongodb.connection.ServerVersion.<init>:(II)V
            putstatic com.mongodb.internal.connection.DefaultAuthenticator.FOUR_ZERO:Lcom/mongodb/connection/ServerVersion;
         1: .line 42
            new com.mongodb.connection.ServerVersion
            dup
            iconst_3
            iconst_0
            invokespecial com.mongodb.connection.ServerVersion.<init>:(II)V
            putstatic com.mongodb.internal.connection.DefaultAuthenticator.THREE_ZERO:Lcom/mongodb/connection/ServerVersion;
         2: .line 43
            new org.bson.BsonString
            dup
            getstatic com.mongodb.AuthenticationMechanism.SCRAM_SHA_256:Lcom/mongodb/AuthenticationMechanism;
            invokevirtual com.mongodb.AuthenticationMechanism.getMechanismName:()Ljava/lang/String;
            invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
            putstatic com.mongodb.internal.connection.DefaultAuthenticator.DEFAULT_MECHANISM_NAME:Lorg/bson/BsonString;
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  void <init>(com.mongodb.internal.connection.MongoCredentialWithCache);
    descriptor: (Lcom/mongodb/internal/connection/MongoCredentialWithCache;)V
    flags: (0x0000) 
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
        start local 1 // com.mongodb.internal.connection.MongoCredentialWithCache credential
         0: .line 46
            aload 0 /* this */
            aload 1 /* credential */
            invokespecial com.mongodb.internal.connection.Authenticator.<init>:(Lcom/mongodb/internal/connection/MongoCredentialWithCache;)V
         1: .line 47
            ldc "unspecified authentication mechanism"
            aload 1 /* credential */
            invokevirtual com.mongodb.internal.connection.MongoCredentialWithCache.getAuthenticationMechanism:()Lcom/mongodb/AuthenticationMechanism;
            ifnonnull 2
            iconst_1
            goto 3
      StackMap locals: com.mongodb.internal.connection.DefaultAuthenticator com.mongodb.internal.connection.MongoCredentialWithCache
      StackMap stack: java.lang.String
         2: iconst_0
      StackMap locals: com.mongodb.internal.connection.DefaultAuthenticator com.mongodb.internal.connection.MongoCredentialWithCache
      StackMap stack: java.lang.String int
         3: invokestatic com.mongodb.assertions.Assertions.isTrueArgument:(Ljava/lang/String;Z)V
         4: .line 48
            return
        end local 1 // com.mongodb.internal.connection.MongoCredentialWithCache credential
        end local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
      LocalVariableTable:
        Start  End  Slot        Name  Signature
            0    5     0        this  Lcom/mongodb/internal/connection/DefaultAuthenticator;
            0    5     1  credential  Lcom/mongodb/internal/connection/MongoCredentialWithCache;
    MethodParameters:
            Name  Flags
      credential  final

  void authenticate(com.mongodb.internal.connection.InternalConnection, com.mongodb.connection.ConnectionDescription);
    descriptor: (Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/connection/ConnectionDescription;)V
    flags: (0x0000) 
    Code:
      stack=3, locals=4, args_size=3
        start local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
        start local 1 // com.mongodb.internal.connection.InternalConnection connection
        start local 2 // com.mongodb.connection.ConnectionDescription connectionDescription
         0: .line 52
            aload 2 /* connectionDescription */
            invokestatic com.mongodb.internal.operation.ServerVersionHelper.serverIsLessThanVersionFourDotZero:(Lcom/mongodb/connection/ConnectionDescription;)Z
            ifeq 4
         1: .line 53
            aload 0 /* this */
            aload 2 /* connectionDescription */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getLegacyDefaultAuthenticator:(Lcom/mongodb/connection/ConnectionDescription;)Lcom/mongodb/internal/connection/Authenticator;
         2: .line 54
            aload 1 /* connection */
            aload 2 /* connectionDescription */
            invokevirtual com.mongodb.internal.connection.Authenticator.authenticate:(Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/connection/ConnectionDescription;)V
         3: .line 55
            goto 10
         4: .line 57
      StackMap locals:
      StackMap stack:
            ldc "admin"
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.createIsMasterCommand:()Lorg/bson/BsonDocument;
            aload 1 /* connection */
            invokestatic com.mongodb.internal.connection.CommandHelper.executeCommand:(Ljava/lang/String;Lorg/bson/BsonDocument;Lcom/mongodb/internal/connection/InternalConnection;)Lorg/bson/BsonDocument;
            astore 3 /* isMasterResult */
        start local 3 // org.bson.BsonDocument isMasterResult
         5: .line 58
            aload 0 /* this */
            aload 3 /* isMasterResult */
            aload 2 /* connectionDescription */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getAuthenticatorFromIsMasterResult:(Lorg/bson/BsonDocument;Lcom/mongodb/connection/ConnectionDescription;)Lcom/mongodb/internal/connection/Authenticator;
         6: .line 59
            aload 1 /* connection */
            aload 2 /* connectionDescription */
            invokevirtual com.mongodb.internal.connection.Authenticator.authenticate:(Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/connection/ConnectionDescription;)V
        end local 3 // org.bson.BsonDocument isMasterResult
         7: .line 60
            goto 10
      StackMap locals:
      StackMap stack: java.lang.Exception
         8: astore 3 /* e */
        start local 3 // java.lang.Exception e
         9: .line 61
            aload 0 /* this */
            aload 3 /* e */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.wrapException:(Ljava/lang/Throwable;)Lcom/mongodb/MongoException;
            athrow
        end local 3 // java.lang.Exception e
        10: .line 64
      StackMap locals:
      StackMap stack:
            return
        end local 2 // com.mongodb.connection.ConnectionDescription connectionDescription
        end local 1 // com.mongodb.internal.connection.InternalConnection connection
        end local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
      LocalVariableTable:
        Start  End  Slot                   Name  Signature
            0   11     0                   this  Lcom/mongodb/internal/connection/DefaultAuthenticator;
            0   11     1             connection  Lcom/mongodb/internal/connection/InternalConnection;
            0   11     2  connectionDescription  Lcom/mongodb/connection/ConnectionDescription;
            5    7     3         isMasterResult  Lorg/bson/BsonDocument;
            9   10     3                      e  Ljava/lang/Exception;
      Exception table:
        from    to  target  type
           4     7       8  Class java.lang.Exception
    MethodParameters:
                       Name  Flags
      connection             final
      connectionDescription  final

  void authenticateAsync(com.mongodb.internal.connection.InternalConnection, com.mongodb.connection.ConnectionDescription, com.mongodb.async.SingleResultCallback<java.lang.Void>);
    descriptor: (Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/connection/ConnectionDescription;Lcom/mongodb/async/SingleResultCallback;)V
    flags: (0x0000) 
    Code:
      stack=9, locals=4, args_size=4
        start local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
        start local 1 // com.mongodb.internal.connection.InternalConnection connection
        start local 2 // com.mongodb.connection.ConnectionDescription connectionDescription
        start local 3 // com.mongodb.async.SingleResultCallback callback
         0: .line 69
            aload 2 /* connectionDescription */
            invokestatic com.mongodb.internal.operation.ServerVersionHelper.serverIsLessThanVersionFourDotZero:(Lcom/mongodb/connection/ConnectionDescription;)Z
            ifeq 4
         1: .line 70
            aload 0 /* this */
            aload 2 /* connectionDescription */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getLegacyDefaultAuthenticator:(Lcom/mongodb/connection/ConnectionDescription;)Lcom/mongodb/internal/connection/Authenticator;
         2: .line 71
            aload 1 /* connection */
            aload 2 /* connectionDescription */
            aload 3 /* callback */
            invokevirtual com.mongodb.internal.connection.Authenticator.authenticateAsync:(Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/connection/ConnectionDescription;Lcom/mongodb/async/SingleResultCallback;)V
         3: .line 72
            goto 5
         4: .line 73
      StackMap locals:
      StackMap stack:
            ldc "admin"
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.createIsMasterCommand:()Lorg/bson/BsonDocument;
            aload 1 /* connection */
            new com.mongodb.internal.connection.DefaultAuthenticator$1
            dup
            aload 0 /* this */
            aload 3 /* callback */
            aload 2 /* connectionDescription */
            aload 1 /* connection */
            invokespecial com.mongodb.internal.connection.DefaultAuthenticator$1.<init>:(Lcom/mongodb/internal/connection/DefaultAuthenticator;Lcom/mongodb/async/SingleResultCallback;Lcom/mongodb/connection/ConnectionDescription;Lcom/mongodb/internal/connection/InternalConnection;)V
            invokestatic com.mongodb.internal.connection.CommandHelper.executeCommandAsync:(Ljava/lang/String;Lorg/bson/BsonDocument;Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/async/SingleResultCallback;)V
         5: .line 85
      StackMap locals:
      StackMap stack:
            return
        end local 3 // com.mongodb.async.SingleResultCallback callback
        end local 2 // com.mongodb.connection.ConnectionDescription connectionDescription
        end local 1 // com.mongodb.internal.connection.InternalConnection connection
        end local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
      LocalVariableTable:
        Start  End  Slot                   Name  Signature
            0    6     0                   this  Lcom/mongodb/internal/connection/DefaultAuthenticator;
            0    6     1             connection  Lcom/mongodb/internal/connection/InternalConnection;
            0    6     2  connectionDescription  Lcom/mongodb/connection/ConnectionDescription;
            0    6     3               callback  Lcom/mongodb/async/SingleResultCallback<Ljava/lang/Void;>;
    Signature: (Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/connection/ConnectionDescription;Lcom/mongodb/async/SingleResultCallback<Ljava/lang/Void;>;)V
    MethodParameters:
                       Name  Flags
      connection             final
      connectionDescription  final
      callback               final

  com.mongodb.internal.connection.Authenticator getAuthenticatorFromIsMasterResult(org.bson.BsonDocument, com.mongodb.connection.ConnectionDescription);
    descriptor: (Lorg/bson/BsonDocument;Lcom/mongodb/connection/ConnectionDescription;)Lcom/mongodb/internal/connection/Authenticator;
    flags: (0x0000) 
    Code:
      stack=4, locals=5, args_size=3
        start local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
        start local 1 // org.bson.BsonDocument isMasterResult
        start local 2 // com.mongodb.connection.ConnectionDescription connectionDescription
         0: .line 88
            aload 1 /* isMasterResult */
            ldc "saslSupportedMechs"
            invokevirtual org.bson.BsonDocument.containsKey:(Ljava/lang/Object;)Z
            ifeq 6
         1: .line 89
            aload 1 /* isMasterResult */
            ldc "saslSupportedMechs"
            invokevirtual org.bson.BsonDocument.getArray:(Ljava/lang/Object;)Lorg/bson/BsonArray;
            astore 3 /* saslSupportedMechs */
        start local 3 // org.bson.BsonArray saslSupportedMechs
         2: .line 90
            aload 3 /* saslSupportedMechs */
            getstatic com.mongodb.internal.connection.DefaultAuthenticator.DEFAULT_MECHANISM_NAME:Lorg/bson/BsonString;
            invokevirtual org.bson.BsonArray.contains:(Ljava/lang/Object;)Z
            ifeq 3
            getstatic com.mongodb.AuthenticationMechanism.SCRAM_SHA_256:Lcom/mongodb/AuthenticationMechanism;
            goto 4
      StackMap locals: org.bson.BsonArray
      StackMap stack:
         3: getstatic com.mongodb.AuthenticationMechanism.SCRAM_SHA_1:Lcom/mongodb/AuthenticationMechanism;
      StackMap locals:
      StackMap stack: com.mongodb.AuthenticationMechanism
         4: astore 4 /* mechanism */
        start local 4 // com.mongodb.AuthenticationMechanism mechanism
         5: .line 91
            new com.mongodb.internal.connection.ScramShaAuthenticator
            dup
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getMongoCredentialWithCache:()Lcom/mongodb/internal/connection/MongoCredentialWithCache;
            aload 4 /* mechanism */
            invokevirtual com.mongodb.internal.connection.MongoCredentialWithCache.withMechanism:(Lcom/mongodb/AuthenticationMechanism;)Lcom/mongodb/internal/connection/MongoCredentialWithCache;
            invokespecial com.mongodb.internal.connection.ScramShaAuthenticator.<init>:(Lcom/mongodb/internal/connection/MongoCredentialWithCache;)V
            areturn
        end local 4 // com.mongodb.AuthenticationMechanism mechanism
        end local 3 // org.bson.BsonArray saslSupportedMechs
         6: .line 93
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 2 /* connectionDescription */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getLegacyDefaultAuthenticator:(Lcom/mongodb/connection/ConnectionDescription;)Lcom/mongodb/internal/connection/Authenticator;
            areturn
        end local 2 // com.mongodb.connection.ConnectionDescription connectionDescription
        end local 1 // org.bson.BsonDocument isMasterResult
        end local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
      LocalVariableTable:
        Start  End  Slot                   Name  Signature
            0    7     0                   this  Lcom/mongodb/internal/connection/DefaultAuthenticator;
            0    7     1         isMasterResult  Lorg/bson/BsonDocument;
            0    7     2  connectionDescription  Lcom/mongodb/connection/ConnectionDescription;
            2    6     3     saslSupportedMechs  Lorg/bson/BsonArray;
            5    6     4              mechanism  Lcom/mongodb/AuthenticationMechanism;
    MethodParameters:
                       Name  Flags
      isMasterResult         final
      connectionDescription  final

  private com.mongodb.internal.connection.Authenticator getLegacyDefaultAuthenticator(com.mongodb.connection.ConnectionDescription);
    descriptor: (Lcom/mongodb/connection/ConnectionDescription;)Lcom/mongodb/internal/connection/Authenticator;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
        start local 1 // com.mongodb.connection.ConnectionDescription connectionDescription
         0: .line 98
            aload 1 /* connectionDescription */
            invokestatic com.mongodb.internal.operation.ServerVersionHelper.serverIsAtLeastVersionThreeDotZero:(Lcom/mongodb/connection/ConnectionDescription;)Z
            ifeq 2
         1: .line 99
            new com.mongodb.internal.connection.ScramShaAuthenticator
            dup
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getMongoCredentialWithCache:()Lcom/mongodb/internal/connection/MongoCredentialWithCache;
            getstatic com.mongodb.AuthenticationMechanism.SCRAM_SHA_1:Lcom/mongodb/AuthenticationMechanism;
            invokevirtual com.mongodb.internal.connection.MongoCredentialWithCache.withMechanism:(Lcom/mongodb/AuthenticationMechanism;)Lcom/mongodb/internal/connection/MongoCredentialWithCache;
            invokespecial com.mongodb.internal.connection.ScramShaAuthenticator.<init>:(Lcom/mongodb/internal/connection/MongoCredentialWithCache;)V
            areturn
         2: .line 101
      StackMap locals:
      StackMap stack:
            new com.mongodb.internal.connection.NativeAuthenticator
            dup
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getMongoCredentialWithCache:()Lcom/mongodb/internal/connection/MongoCredentialWithCache;
            invokespecial com.mongodb.internal.connection.NativeAuthenticator.<init>:(Lcom/mongodb/internal/connection/MongoCredentialWithCache;)V
            areturn
        end local 1 // com.mongodb.connection.ConnectionDescription connectionDescription
        end local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
      LocalVariableTable:
        Start  End  Slot                   Name  Signature
            0    3     0                   this  Lcom/mongodb/internal/connection/DefaultAuthenticator;
            0    3     1  connectionDescription  Lcom/mongodb/connection/ConnectionDescription;
    MethodParameters:
                       Name  Flags
      connectionDescription  final

  private org.bson.BsonDocument createIsMasterCommand();
    descriptor: ()Lorg/bson/BsonDocument;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=9, locals=2, args_size=1
        start local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
         0: .line 106
            new org.bson.BsonDocument
            dup
            ldc "ismaster"
            new org.bson.BsonInt32
            dup
            iconst_1
            invokespecial org.bson.BsonInt32.<init>:(I)V
            invokespecial org.bson.BsonDocument.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
            astore 1 /* isMasterCommandDocument */
        start local 1 // org.bson.BsonDocument isMasterCommandDocument
         1: .line 107
            aload 1 /* isMasterCommandDocument */
            ldc "saslSupportedMechs"
         2: .line 108
            new org.bson.BsonString
            dup
            ldc "%s.%s"
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
            invokevirtual com.mongodb.MongoCredential.getSource:()Ljava/lang/String;
            aastore
            dup
            iconst_1
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
            invokevirtual com.mongodb.MongoCredential.getUserName:()Ljava/lang/String;
            aastore
            invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
            invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
         3: .line 107
            invokevirtual org.bson.BsonDocument.append:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonDocument;
            pop
         4: .line 109
            aload 1 /* isMasterCommandDocument */
            areturn
        end local 1 // org.bson.BsonDocument isMasterCommandDocument
        end local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
      LocalVariableTable:
        Start  End  Slot                     Name  Signature
            0    5     0                     this  Lcom/mongodb/internal/connection/DefaultAuthenticator;
            1    5     1  isMasterCommandDocument  Lorg/bson/BsonDocument;

  private com.mongodb.MongoException wrapException(java.lang.Throwable);
    descriptor: (Ljava/lang/Throwable;)Lcom/mongodb/MongoException;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=8, locals=2, args_size=2
        start local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
        start local 1 // java.lang.Throwable t
         0: .line 113
            aload 1 /* t */
            instanceof com.mongodb.MongoSecurityException
            ifeq 2
         1: .line 114
            aload 1 /* t */
            checkcast com.mongodb.MongoSecurityException
            areturn
         2: .line 115
      StackMap locals:
      StackMap stack:
            aload 1 /* t */
            instanceof com.mongodb.MongoException
            ifeq 4
            aload 1 /* t */
            checkcast com.mongodb.MongoException
            invokevirtual com.mongodb.MongoException.getCode:()I
            bipush 11
            if_icmpne 4
         3: .line 116
            new com.mongodb.MongoSecurityException
            dup
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
            ldc "Exception authenticating %s"
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
            aload 0 /* this */
            invokevirtual com.mongodb.internal.connection.DefaultAuthenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
            aastore
            invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
            aload 1 /* t */
            invokespecial com.mongodb.MongoSecurityException.<init>:(Lcom/mongodb/MongoCredential;Ljava/lang/String;Ljava/lang/Throwable;)V
            areturn
         4: .line 118
      StackMap locals:
      StackMap stack:
            aload 1 /* t */
            invokestatic com.mongodb.MongoException.fromThrowable:(Ljava/lang/Throwable;)Lcom/mongodb/MongoException;
            areturn
        end local 1 // java.lang.Throwable t
        end local 0 // com.mongodb.internal.connection.DefaultAuthenticator this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    5     0  this  Lcom/mongodb/internal/connection/DefaultAuthenticator;
            0    5     1     t  Ljava/lang/Throwable;
    MethodParameters:
      Name  Flags
      t     final
}
SourceFile: "DefaultAuthenticator.java"
NestMembers:
  com.mongodb.internal.connection.DefaultAuthenticator$1
InnerClasses:
  com.mongodb.internal.connection.DefaultAuthenticator$1