public class ClientSecretCredential extends Object implements TokenCredential
Sample: Construct a simple ClientSecretCredential
ClientSecretCredential
credential1 = newClientSecretCredentialBuilder
() .tenantId(tenantId) .clientId(clientId) .clientSecret(clientSecret) .build();
Sample: Construct a ClientSecretCredential behind a proxy
ClientSecretCredential
credential2 = newClientSecretCredentialBuilder
() .tenantId(tenantId) .clientId(clientId) .clientSecret(clientSecret) .proxyOptions(newProxyOptions
(ProxyOptions.Type
.HTTP, newInetSocketAddress
("10.21.32.43", 5465))) .build();
Modifier and Type | Method and Description |
---|---|
Mono<AccessToken> |
getToken(TokenRequestContext request) |
public Mono<AccessToken> getToken(TokenRequestContext request)
getToken
in interface TokenCredential
Copyright © 2019 Microsoft Corporation. All rights reserved.