Interface IDeviceOAuthInfo
Basic details of a device OAuth instance
Namespace: DeviceOAuth2
Assembly: DeviceOAuth2.dll
Syntax
public interface IDeviceOAuthInfo
Properties
| Improve this Doc View SourceClientId
The ClientId of the app requesting authorization
Declaration
string ClientId { get; }
Property Value
Type | Description |
---|---|
String |
EndPoint
Details describing the endpoint of the OAuth2 instance
Declaration
EndPointInfo EndPoint { get; }
Property Value
Type | Description |
---|---|
EndPointInfo |
Scope
The scope(s) being authorized
Declaration
string Scope { get; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceCheckToken(TokenInfo)
Checks the validity of an auth token against the auth endpoint. It does this by making a get request to the token's ProfileUri. This is useful for ensuring that the user hasn't revoked authorization for a stored token and that it hasn't expired.
Declaration
Task<bool> CheckToken(TokenInfo token)
Parameters
Type | Name | Description |
---|---|---|
TokenInfo | token | The auth token to check |
Returns
Type | Description |
---|---|
Task<Boolean> | True if the user profile is return without error |
CheckToken(TokenInfo, CancellationToken)
Checks the validity of an auth token against the auth endpoint. It does this by making a get request to the token's ProfileUri. This is useful for ensuring that the user hasn't revoked authorization for a stored token and that it hasn't expired.
Declaration
Task<bool> CheckToken(TokenInfo token, CancellationToken cancelToken)
Parameters
Type | Name | Description |
---|---|---|
TokenInfo | token | The auth token to check |
CancellationToken | cancelToken | A cancellation token |
Returns
Type | Description |
---|---|
Task<Boolean> | True if the user profile is return without error |
GetProfile(TokenInfo)
Returns the user's endpoint profile using ProfileUri.
Declaration
Task<dynamic> GetProfile(TokenInfo token)
Parameters
Type | Name | Description |
---|---|---|
TokenInfo | token | An auth token |
Returns
Type | Description |
---|---|
Task<Object> | User's profile |
GetProfile(TokenInfo, CancellationToken)
Returns the user's endpoint profile using ProfileUri.
Declaration
Task<dynamic> GetProfile(TokenInfo token, CancellationToken cancelToken)
Parameters
Type | Name | Description |
---|---|---|
TokenInfo | token | An auth token |
CancellationToken | cancelToken | A cancellation token |
Returns
Type | Description |
---|---|
Task<Object> | User's profile |
Events
| Improve this Doc View SourceWaitingForConfirmation
Status event raised each time confirmation is checked for. Int32 argument is the number of seconds until the authorization request times out.
Declaration
event EventHandler<int> WaitingForConfirmation
Event Type
Type | Description |
---|---|
EventHandler<Int32> |