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.TokenCredentialpublic 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.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.