Interface IDeviceOAuth2
Interface for device based OAuth2 flow
Inherited Members
Namespace: DeviceOAuth2
Assembly: DeviceOAuth2.dll
Syntax
public interface IDeviceOAuth2 : IDeviceOAuthInfo
Methods
| Improve this Doc View SourceAuthorize(TokenInfo)
Starts the authorization flow.
Declaration
Task<TokenInfo> Authorize(TokenInfo token)
Parameters
Type | Name | Description |
---|---|---|
TokenInfo | token | An existing token that can be checked for needing to be refreshed. Pass null if the app has never been authorized. |
Returns
Type | Description |
---|---|
Task<TokenInfo> | An auth token. If the token parameter is still valid it will be returned |
Authorize(TokenInfo, CancellationToken)
Starts the authorization flow.
Declaration
Task<TokenInfo> Authorize(TokenInfo token, CancellationToken cancelToken)
Parameters
Type | Name | Description |
---|---|---|
TokenInfo | token | An existing token that can be checked for needing to be refreshed. Pass null if the app has never been authorized. |
CancellationToken | cancelToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<TokenInfo> | An auth token. If the token parameter is still valid it will be returned |
Events
| Improve this Doc View SourcePromptUser
Event raised when the auth confirmation url and code are known. Display these to the user and tell them to enter the code at the referenced web address.
Declaration
event EventHandler<AuthInfo> PromptUser
Event Type
Type | Description |
---|---|
EventHandler<AuthInfo> |