DeviceCodeCredential Class
- java.lang.Object
- com.azure.identity.DeviceCodeCredential
Implements
public class DeviceCodeCredential
implements TokenCredential
An AAD credential that acquires a token with a device code for an AAD application.
Method Summary
Modifier and Type | Method and Description |
---|---|
authenticate()
Authenticates a user via the device code flow. |
|
authenticate(TokenRequestContext request)
Authenticates a user via the device code flow. |
|
getToken(TokenRequestContext request) | |
AccessToken | getTokenSync(TokenRequestContext request) |
Methods inherited from java.lang.Object
Method Details
authenticate
public Mono
Authenticates a user via the device code flow.
The credential acquires a verification URL and code from the Azure Active Directory. The user must browse to the URL, enter the code, and authenticate with Azure Active Directory. If the user authenticates successfully, the credential receives an access token.
Returns:
authenticate
public Mono
Authenticates a user via the device code flow.
The credential acquires a verification URL and code from the Azure Active Directory. The user must browse to the URL, enter the code, and authenticate with Azure Active Directory. If the user authenticates successfully, the credential receives an access token.
Parameters:
Returns:
getToken
public Mono
Parameters:
getTokenSync
public AccessToken getTokenSync(TokenRequestContext request)
Parameters: