public class UsernamePasswordCredential extends Object implements com.azure.core.credential.TokenCredential
DeviceCodeCredential
or InteractiveBrowserCredential
instead, or create a service principal if you want to authenticate silently.Modifier and Type | Method and Description |
---|---|
Mono<AuthenticationRecord> |
authenticate()
Authenticates the user using the specified username and password.
|
Mono<AuthenticationRecord> |
authenticate(com.azure.core.credential.TokenRequestContext request)
Authenticates the user using the specified username and password.
|
Mono<com.azure.core.credential.AccessToken> |
getToken(com.azure.core.credential.TokenRequestContext request) |
public Mono<com.azure.core.credential.AccessToken> getToken(com.azure.core.credential.TokenRequestContext request)
getToken
in interface com.azure.core.credential.TokenCredential
public Mono<AuthenticationRecord> authenticate(com.azure.core.credential.TokenRequestContext request)
request
- The details of the authentication request.AuthenticationRecord
of the authenticated account.public Mono<AuthenticationRecord> authenticate()
AuthenticationRecord
of the authenticated account.Copyright © 2021 Microsoft Corporation. All rights reserved.