class com.mongodb.internal.connection.X509Authenticator extends com.mongodb.internal.connection.Authenticator
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.mongodb.internal.connection.X509Authenticator
super_class: com.mongodb.internal.connection.Authenticator
{
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 start local 1 0: aload 0
aload 1
invokespecial com.mongodb.internal.connection.Authenticator.<init>:(Lcom/mongodb/internal/connection/MongoCredentialWithCache;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/X509Authenticator;
0 2 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=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokevirtual com.mongodb.internal.connection.X509Authenticator.validateUserName:(Lcom/mongodb/connection/ConnectionDescription;)V
1: aload 0
aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
invokevirtual com.mongodb.MongoCredential.getUserName:()Ljava/lang/String;
invokevirtual com.mongodb.internal.connection.X509Authenticator.getAuthCommand:(Ljava/lang/String;)Lorg/bson/BsonDocument;
astore 3
start local 3 2: aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
invokevirtual com.mongodb.MongoCredential.getSource:()Ljava/lang/String;
aload 3
aload 1
invokestatic com.mongodb.internal.connection.CommandHelper.executeCommand:(Ljava/lang/String;Lorg/bson/BsonDocument;Lcom/mongodb/internal/connection/InternalConnection;)Lorg/bson/BsonDocument;
pop
end local 3 3: goto 6
StackMap locals:
StackMap stack: com.mongodb.MongoCommandException
4: astore 3
start local 3 5: new com.mongodb.MongoSecurityException
dup
aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
ldc "Exception authenticating"
aload 3
invokespecial com.mongodb.MongoSecurityException.<init>:(Lcom/mongodb/MongoCredential;Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 6: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/connection/X509Authenticator;
0 7 1 connection Lcom/mongodb/internal/connection/InternalConnection;
0 7 2 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
2 3 3 authCommand Lorg/bson/BsonDocument;
5 6 3 e Lcom/mongodb/MongoCommandException;
Exception table:
from to target type
0 3 4 Class com.mongodb.MongoCommandException
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=7, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 2
invokevirtual com.mongodb.internal.connection.X509Authenticator.validateUserName:(Lcom/mongodb/connection/ConnectionDescription;)V
1: aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
invokevirtual com.mongodb.MongoCredential.getSource:()Ljava/lang/String;
aload 0
aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
invokevirtual com.mongodb.MongoCredential.getUserName:()Ljava/lang/String;
invokevirtual com.mongodb.internal.connection.X509Authenticator.getAuthCommand:(Ljava/lang/String;)Lorg/bson/BsonDocument;
aload 1
2: new com.mongodb.internal.connection.X509Authenticator$1
dup
aload 0
aload 3
invokespecial com.mongodb.internal.connection.X509Authenticator$1.<init>:(Lcom/mongodb/internal/connection/X509Authenticator;Lcom/mongodb/async/SingleResultCallback;)V
3: invokestatic com.mongodb.internal.connection.CommandHelper.executeCommandAsync:(Ljava/lang/String;Lorg/bson/BsonDocument;Lcom/mongodb/internal/connection/InternalConnection;Lcom/mongodb/async/SingleResultCallback;)V
4: goto 7
StackMap locals:
StackMap stack: java.lang.Throwable
5: astore 4
start local 4 6: aload 3
aconst_null
aload 4
invokeinterface com.mongodb.async.SingleResultCallback.onResult:(Ljava/lang/Object;Ljava/lang/Throwable;)V
end local 4 7: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/mongodb/internal/connection/X509Authenticator;
0 8 1 connection Lcom/mongodb/internal/connection/InternalConnection;
0 8 2 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
0 8 3 callback Lcom/mongodb/async/SingleResultCallback<Ljava/lang/Void;>;
6 7 4 t Ljava/lang/Throwable;
Exception table:
from to target type
0 4 5 Class java.lang.Throwable
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
private org.bson.BsonDocument getAuthCommand(java.lang.String);
descriptor: (Ljava/lang/String;)Lorg/bson/BsonDocument;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: new org.bson.BsonDocument
dup
invokespecial org.bson.BsonDocument.<init>:()V
astore 2
start local 2 1: aload 2
ldc "authenticate"
new org.bson.BsonInt32
dup
iconst_1
invokespecial org.bson.BsonInt32.<init>:(I)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
2: aload 1
ifnull 4
3: aload 2
ldc "user"
new org.bson.BsonString
dup
aload 1
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
4: StackMap locals: org.bson.BsonDocument
StackMap stack:
aload 2
ldc "mechanism"
new org.bson.BsonString
dup
getstatic com.mongodb.AuthenticationMechanism.MONGODB_X509:Lcom/mongodb/AuthenticationMechanism;
invokevirtual com.mongodb.AuthenticationMechanism.getMechanismName:()Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
5: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/internal/connection/X509Authenticator;
0 6 1 userName Ljava/lang/String;
1 6 2 cmd Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
userName final
private java.lang.Throwable translateThrowable(java.lang.Throwable);
descriptor: (Ljava/lang/Throwable;)Ljava/lang/Throwable;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 1
instanceof com.mongodb.MongoCommandException
ifeq 2
1: new com.mongodb.MongoSecurityException
dup
aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
ldc "Exception authenticating"
aload 1
invokespecial com.mongodb.MongoSecurityException.<init>:(Lcom/mongodb/MongoCredential;Ljava/lang/String;Ljava/lang/Throwable;)V
areturn
2: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/X509Authenticator;
0 3 1 t Ljava/lang/Throwable;
MethodParameters:
Name Flags
t final
private void validateUserName(com.mongodb.connection.ConnectionDescription);
descriptor: (Lcom/mongodb/connection/ConnectionDescription;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
invokevirtual com.mongodb.MongoCredential.getUserName:()Ljava/lang/String;
ifnonnull 2
aload 1
invokestatic com.mongodb.internal.operation.ServerVersionHelper.serverIsLessThanVersionThreeDotFour:(Lcom/mongodb/connection/ConnectionDescription;)Z
ifeq 2
1: new com.mongodb.MongoSecurityException
dup
aload 0
invokevirtual com.mongodb.internal.connection.X509Authenticator.getMongoCredential:()Lcom/mongodb/MongoCredential;
ldc "User name is required for the MONGODB-X509 authentication mechanism on server versions less than 3.4"
invokespecial com.mongodb.MongoSecurityException.<init>:(Lcom/mongodb/MongoCredential;Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/X509Authenticator;
0 3 1 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
MethodParameters:
Name Flags
connectionDescription final
}
SourceFile: "X509Authenticator.java"
NestMembers:
com.mongodb.internal.connection.X509Authenticator$1
InnerClasses:
com.mongodb.internal.connection.X509Authenticator$1