ClientSecretCredential Class
- java.lang.Object
- com.azure.identity.ClientSecretCredential
Implements
public class ClientSecretCredential
implements 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
Modifier and Type | Method and Description |
---|---|
getToken(TokenRequestContext request) | |
AccessToken | getTokenSync(TokenRequestContext request) |
Methods inherited from java.lang.Object
Method Details
getToken
public Mono
Parameters:
request
getTokenSync
public AccessToken getTokenSync(TokenRequestContext request)
Parameters:
request