public final class com.microsoft.azure.credentials.AzureCliCredentials extends com.microsoft.azure.credentials.AzureTokenCredentials
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.microsoft.azure.credentials.AzureCliCredentials
super_class: com.microsoft.azure.credentials.AzureTokenCredentials
{
private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER;
descriptor: Lcom/fasterxml/jackson/databind/ObjectMapper;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private java.util.Map<java.lang.String, com.microsoft.azure.credentials.AzureCliSubscription> subscriptions;
descriptor: Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Map<Ljava/lang/String;Lcom/microsoft/azure/credentials/AzureCliSubscription;>;
private java.io.File azureProfile;
descriptor: Ljava/io/File;
flags: (0x0002) ACC_PRIVATE
private java.io.File accessTokens;
descriptor: Ljava/io/File;
flags: (0x0002) ACC_PRIVATE
private java.util.concurrent.locks.Lock lock;
descriptor: Ljava/util/concurrent/locks/Lock;
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: new com.microsoft.rest.serializer.JacksonAdapter
dup
invokespecial com.microsoft.rest.serializer.JacksonAdapter.<init>:()V
invokevirtual com.microsoft.rest.serializer.JacksonAdapter.serializer:()Lcom/fasterxml/jackson/databind/ObjectMapper;
new java.text.SimpleDateFormat
dup
ldc "yyyy-MM-dd hh:mm:ssssss"
invokespecial java.text.SimpleDateFormat.<init>:(Ljava/lang/String;)V
invokevirtual com.fasterxml.jackson.databind.ObjectMapper.setDateFormat:(Ljava/text/DateFormat;)Lcom/fasterxml/jackson/databind/ObjectMapper;
putstatic com.microsoft.azure.credentials.AzureCliCredentials.MAPPER:Lcom/fasterxml/jackson/databind/ObjectMapper;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
aconst_null
invokespecial com.microsoft.azure.credentials.AzureTokenCredentials.<init>:(Lcom/microsoft/azure/AzureEnvironment;Ljava/lang/String;)V
1: aload 0
new java.util.concurrent.locks.ReentrantLock
dup
invokespecial java.util.concurrent.locks.ReentrantLock.<init>:()V
putfield com.microsoft.azure.credentials.AzureCliCredentials.lock:Ljava/util/concurrent/locks/Lock;
2: aload 0
new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
putfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/microsoft/azure/credentials/AzureCliCredentials;
private synchronized void loadAccessTokens();
descriptor: ()V
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=6, locals=7, args_size=1
start local 0 0: getstatic com.microsoft.azure.credentials.AzureCliCredentials.MAPPER:Lcom/fasterxml/jackson/databind/ObjectMapper;
aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.azureProfile:Ljava/io/File;
ldc Lcom/microsoft/azure/credentials/AzureCliSubscription$Wrapper;
invokevirtual com.fasterxml.jackson.databind.ObjectMapper.readValue:(Ljava/io/File;Ljava/lang/Class;)Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription$Wrapper
astore 1
start local 1 1: getstatic com.microsoft.azure.credentials.AzureCliCredentials.MAPPER:Lcom/fasterxml/jackson/databind/ObjectMapper;
aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.accessTokens:Ljava/io/File;
new com.microsoft.azure.credentials.AzureCliCredentials$1
dup
aload 0
invokespecial com.microsoft.azure.credentials.AzureCliCredentials$1.<init>:(Lcom/microsoft/azure/credentials/AzureCliCredentials;)V
invokevirtual com.fasterxml.jackson.databind.ObjectMapper.readValue:(Ljava/io/File;Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/lang/Object;
checkcast java.util.List
astore 2
start local 2 2: goto 7
3: StackMap locals: com.microsoft.azure.credentials.AzureCliSubscription$Wrapper java.util.List
StackMap stack:
getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Please login in Azure CLI and press any key to continue after you've successfully logged in."
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
4: getstatic java.lang.System.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.read:()I
pop
5: getstatic com.microsoft.azure.credentials.AzureCliCredentials.MAPPER:Lcom/fasterxml/jackson/databind/ObjectMapper;
aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.azureProfile:Ljava/io/File;
ldc Lcom/microsoft/azure/credentials/AzureCliSubscription$Wrapper;
invokevirtual com.fasterxml.jackson.databind.ObjectMapper.readValue:(Ljava/io/File;Ljava/lang/Class;)Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription$Wrapper
astore 1
6: getstatic com.microsoft.azure.credentials.AzureCliCredentials.MAPPER:Lcom/fasterxml/jackson/databind/ObjectMapper;
aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.accessTokens:Ljava/io/File;
new com.microsoft.azure.credentials.AzureCliCredentials$2
dup
aload 0
invokespecial com.microsoft.azure.credentials.AzureCliCredentials$2.<init>:(Lcom/microsoft/azure/credentials/AzureCliCredentials;)V
invokevirtual com.fasterxml.jackson.databind.ObjectMapper.readValue:(Ljava/io/File;Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/lang/Object;
checkcast java.util.List
astore 2
7: StackMap locals:
StackMap stack:
aload 1
ifnull 3
aload 2
ifnull 3
aload 2
invokeinterface java.util.List.isEmpty:()Z
ifne 3
aload 1
getfield com.microsoft.azure.credentials.AzureCliSubscription$Wrapper.subscriptions:Ljava/util/List;
ifnull 3
aload 1
getfield com.microsoft.azure.credentials.AzureCliSubscription$Wrapper.subscriptions:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifne 3
8: aload 1
getfield com.microsoft.azure.credentials.AzureCliSubscription$Wrapper.subscriptions:Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 19
StackMap locals: com.microsoft.azure.credentials.AzureCliCredentials com.microsoft.azure.credentials.AzureCliSubscription$Wrapper java.util.List top java.util.Iterator
StackMap stack:
9: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription
astore 3
start local 3 10: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
goto 18
StackMap locals: com.microsoft.azure.credentials.AzureCliCredentials com.microsoft.azure.credentials.AzureCliSubscription$Wrapper java.util.List com.microsoft.azure.credentials.AzureCliSubscription java.util.Iterator top java.util.Iterator
StackMap stack:
11: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliToken
astore 5
start local 5 12: aload 3
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.isServicePrincipal:()Z
aload 5
invokevirtual com.microsoft.azure.credentials.AzureCliToken.isServicePrincipal:()Z
if_icmpne 18
13: aload 3
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.userName:()Ljava/lang/String;
aload 5
invokevirtual com.microsoft.azure.credentials.AzureCliToken.user:()Ljava/lang/String;
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 18
14: aload 3
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.tenant:()Ljava/lang/String;
aload 5
invokevirtual com.microsoft.azure.credentials.AzureCliToken.tenant:()Ljava/lang/String;
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 18
15: aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
aload 3
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.id:()Ljava/lang/String;
aload 3
aload 5
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.withToken:(Lcom/microsoft/azure/credentials/AzureCliToken;)Lcom/microsoft/azure/credentials/AzureCliSubscription;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
16: aload 3
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.isDefault:()Z
ifeq 18
17: aload 0
aload 3
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.id:()Ljava/lang/String;
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.withDefaultSubscriptionId:(Ljava/lang/String;)Lcom/microsoft/azure/credentials/AzureTokenCredentials;
pop
end local 5 18: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 11
end local 3 19: StackMap locals: com.microsoft.azure.credentials.AzureCliCredentials com.microsoft.azure.credentials.AzureCliSubscription$Wrapper java.util.List top java.util.Iterator
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 9
end local 2 end local 1 20: goto 24
StackMap locals: com.microsoft.azure.credentials.AzureCliCredentials
StackMap stack: java.io.IOException
21: astore 1
start local 1 22: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Cannot read files %s and %s. Are you logged in Azure CLI?"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.azureProfile:Ljava/io/File;
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
dup
iconst_1
aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.accessTokens:Ljava/io/File;
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
23: aload 1
athrow
end local 1 24: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lcom/microsoft/azure/credentials/AzureCliCredentials;
1 20 1 wrapper Lcom/microsoft/azure/credentials/AzureCliSubscription$Wrapper;
2 20 2 tokens Ljava/util/List<Lcom/microsoft/azure/credentials/AzureCliToken;>;
10 19 3 subscription Lcom/microsoft/azure/credentials/AzureCliSubscription;
12 18 5 token Lcom/microsoft/azure/credentials/AzureCliToken;
22 24 1 e Ljava/io/IOException;
Exception table:
from to target type
0 20 21 Class java.io.IOException
Exceptions:
throws java.io.IOException
public static com.microsoft.azure.credentials.AzureCliCredentials create();
descriptor: ()Lcom/microsoft/azure/credentials/AzureCliCredentials;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=0, args_size=0
0: ldc "user.home"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
iconst_2
anewarray java.lang.String
dup
iconst_0
ldc ".azure"
aastore
dup
iconst_1
ldc "azureProfile.json"
aastore
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
1: ldc "user.home"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
iconst_2
anewarray java.lang.String
dup
iconst_0
ldc ".azure"
aastore
dup
iconst_1
ldc "accessTokens.json"
aastore
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
2: invokestatic com.microsoft.azure.credentials.AzureCliCredentials.create:(Ljava/io/File;Ljava/io/File;)Lcom/microsoft/azure/credentials/AzureCliCredentials;
areturn
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.io.IOException
public static com.microsoft.azure.credentials.AzureCliCredentials create(java.io.File, java.io.File);
descriptor: (Ljava/io/File;Ljava/io/File;)Lcom/microsoft/azure/credentials/AzureCliCredentials;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: new com.microsoft.azure.credentials.AzureCliCredentials
dup
invokespecial com.microsoft.azure.credentials.AzureCliCredentials.<init>:()V
astore 2
start local 2 1: aload 2
aload 0
putfield com.microsoft.azure.credentials.AzureCliCredentials.azureProfile:Ljava/io/File;
2: aload 2
aload 1
putfield com.microsoft.azure.credentials.AzureCliCredentials.accessTokens:Ljava/io/File;
3: aload 2
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.loadAccessTokens:()V
4: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 azureProfile Ljava/io/File;
0 5 1 accessTokens Ljava/io/File;
1 5 2 credentials Lcom/microsoft/azure/credentials/AzureCliCredentials;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
azureProfile
accessTokens
public java.lang.String clientId();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
aload 0
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.defaultSubscriptionId:()Ljava/lang/String;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.clientId:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/microsoft/azure/credentials/AzureCliCredentials;
public java.lang.String domain();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
aload 0
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.defaultSubscriptionId:()Ljava/lang/String;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.tenant:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/microsoft/azure/credentials/AzureCliCredentials;
public com.microsoft.azure.AzureEnvironment environment();
descriptor: ()Lcom/microsoft/azure/AzureEnvironment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
aload 0
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.defaultSubscriptionId:()Ljava/lang/String;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.environment:()Lcom/microsoft/azure/AzureEnvironment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/microsoft/azure/credentials/AzureCliCredentials;
public java.util.Map<java.lang.String, com.microsoft.azure.credentials.AzureCliSubscription> subscriptions();
descriptor: ()Ljava/util/Map;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
invokestatic java.util.Collections.unmodifiableMap:(Ljava/util/Map;)Ljava/util/Map;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/microsoft/azure/credentials/AzureCliCredentials;
Signature: ()Ljava/util/Map<Ljava/lang/String;Lcom/microsoft/azure/credentials/AzureCliSubscription;>;
public synchronized java.lang.String getToken(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
aload 0
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.defaultSubscriptionId:()Ljava/lang/String;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.credentialInstance:()Lcom/microsoft/azure/credentials/AzureTokenCredentials;
aload 1
invokevirtual com.microsoft.azure.credentials.AzureTokenCredentials.getToken:(Ljava/lang/String;)Ljava/lang/String;
astore 2
start local 2 1: aload 2
ifnonnull 6
2: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Please login in Azure CLI and press any key to continue after you've successfully logged in."
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
3: getstatic java.lang.System.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.read:()I
pop
4: aload 0
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.loadAccessTokens:()V
5: aload 0
getfield com.microsoft.azure.credentials.AzureCliCredentials.subscriptions:Ljava/util/Map;
aload 0
invokevirtual com.microsoft.azure.credentials.AzureCliCredentials.defaultSubscriptionId:()Ljava/lang/String;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.microsoft.azure.credentials.AzureCliSubscription
invokevirtual com.microsoft.azure.credentials.AzureCliSubscription.credentialInstance:()Lcom/microsoft/azure/credentials/AzureTokenCredentials;
aload 1
invokevirtual com.microsoft.azure.credentials.AzureTokenCredentials.getToken:(Ljava/lang/String;)Ljava/lang/String;
astore 2
6: StackMap locals: java.lang.String
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/microsoft/azure/credentials/AzureCliCredentials;
0 7 1 resource Ljava/lang/String;
1 7 2 token Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
resource
}
SourceFile: "AzureCliCredentials.java"
NestMembers:
com.microsoft.azure.credentials.AzureCliCredentials$1 com.microsoft.azure.credentials.AzureCliCredentials$2
InnerClasses:
com.microsoft.azure.credentials.AzureCliCredentials$1
com.microsoft.azure.credentials.AzureCliCredentials$2
Wrapper = com.microsoft.azure.credentials.AzureCliSubscription$Wrapper of com.microsoft.azure.credentials.AzureCliSubscription
RuntimeInvisibleAnnotations:
com.microsoft.azure.management.apigeneration.Beta()