ConnectedDevicesAccessTokenRequest Class
- java.
lang. Object - NativeBase
- com.
microsoft. connecteddevices. ConnectedDevicesAccessTokenRequest
- com.
public class ConnectedDevicesAccessTokenRequest
Request for an access token for the contained ConnectedDevicesAccount which satisfies the contained scopes. This request needs to completed by calling either completeWithAccessToken(@NonNull final String token) or completeWithErrorMessage(@NonNull final String error).
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
completeWithAccessToken(@NonNull final String token)
If a token with the requested scopes was successfully generated, call this method with the token to complete the request. |
void |
completeWithErrorMessage(@NonNull final String error)
If a token with the requested scopes was not successfully generated for any reason, call this method with a message to be used for logging. |
Connected |
getAccount()
Gets the Account associated with this ConnectedDevicesAccessTokenRequest. |
List<String> |
getScopes()
Get the list of scopes for which the token must cover when generated. |
Method Details
completeWithAccessToken
public void completeWithAccessToken(@NonNull final String token)
If a token with the requested scopes was successfully generated, call this method with the token to complete the request.
Parameters:
completeWithErrorMessage
public void completeWithErrorMessage(@NonNull final String error)
If a token with the requested scopes was not successfully generated for any reason, call this method with a message to be used for logging.
Parameters:
getAccount
public ConnectedDevicesAccount getAccount()
Gets the Account associated with this ConnectedDevicesAccessTokenRequest.
Returns:
getScopes
public List
Get the list of scopes for which the token must cover when generated.
Returns: