Package com.azure.identity
Class ClientSecretCredential
- java.lang.Object
-
- com.azure.identity.ClientSecretCredential
-
- All Implemented Interfaces:
com.azure.core.credential.TokenCredential
public class ClientSecretCredential extends Object implements com.azure.core.credential.TokenCredential
An AAD credential that acquires a token with a client secret for an AAD application.Sample: Construct a simple ClientSecretCredential
ClientSecretCredential credential1 = new ClientSecretCredentialBuilder() .tenantId(tenantId) .clientId(clientId) .clientSecret(clientSecret) .build();
Sample: Construct a ClientSecretCredential behind a proxy
ClientSecretCredential credential2 = new ClientSecretCredentialBuilder() .tenantId(tenantId) .clientId(clientId) .clientSecret(clientSecret) .proxyOptions(new ProxyOptions(Type.HTTP, new InetSocketAddress("10.21.32.43", 5465))) .build();
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<com.azure.core.credential.AccessToken>
getToken(com.azure.core.credential.TokenRequestContext request)
-
-
-
Method Detail
-
getToken
public Mono<com.azure.core.credential.AccessToken> getToken(com.azure.core.credential.TokenRequestContext request)
- Specified by:
getToken
in interfacecom.azure.core.credential.TokenCredential
-
-