@Test void testResolveCredentials() throws IOException { var account = new AzureAccount(); account.setClientId("my-client-id"); account.setClientSecret("secret"); account.setTenantId("my-tenant-id"); account.setAutoDiscovered(false); var credentials = account.resolveCredentials(); assertNotNull(credentials); assertEquals("my-client-id", ((ApplicationTokenCredentials) credentials).clientId()); }
public AzureTokenCredentials resolveCredentials() throws IOException { if (this.isAutoDiscovered()) { return AzureAccount.defaultCredentialProviderChain(); } else { return new ApplicationTokenCredentials( clientId, tenantId, clientSecret, AzureEnvironment.AZURE); } }
AzureAccount extends CloudAccount<AzureTokenCredentials> { public AzureTokenCredentials resolveCredentials() throws IOException { if (this.isAutoDiscovered()) { return AzureAccount.defaultCredentialProviderChain(); } else { return new ApplicationTokenCredentials( clientId, tenantId, clientSecret, AzureEnvironment.AZURE); } } }
AzureAccount extends CloudAccount<AzureTokenCredentials> { public AzureTokenCredentials resolveCredentials() throws IOException { if (this.isAutoDiscovered()) { return AzureAccount.defaultCredentialProviderChain(); } else { return new ApplicationTokenCredentials( clientId, tenantId, clientSecret, AzureEnvironment.AZURE); } }  }
AzureAccount extends CloudAccount<AzureTokenCredentials> { public AzureTokenCredentials resolveCredentials() throws IOException { if (this.isAutoDiscovered()) { return AzureAccount.defaultCredentialProviderChain(); } else { return new ApplicationTokenCredentials( clientId, tenantId, clientSecret, AzureEnvironment.AZURE); } }  static AzureAccount discover(); @Override void validate(); AzureTokenCredentials resolveCredentials(); void setClientId(String clientId); void setTenantId(String tenantId); void setClientSecret(String clientSecret); @JsonProperty String getAuthFile(); void setDomain(String domain); }
AzureAccount extends CloudAccount<AzureTokenCredentials> { public AzureTokenCredentials resolveCredentials() throws IOException { if (this.isAutoDiscovered()) { return AzureAccount.defaultCredentialProviderChain(); } else { return new ApplicationTokenCredentials( clientId, tenantId, clientSecret, AzureEnvironment.AZURE); } }  static AzureAccount discover(); @Override void validate(); AzureTokenCredentials resolveCredentials(); void setClientId(String clientId); void setTenantId(String tenantId); void setClientSecret(String clientSecret); @JsonProperty String getAuthFile(); void setDomain(String domain);  }