Show / Hide Table of Contents

Interface IDeviceOAuthInfo

Basic details of a device OAuth instance

Namespace: DeviceOAuth2
Assembly: DeviceOAuth2.dll
Syntax
public interface IDeviceOAuthInfo

Properties

| Improve this Doc View Source

ClientId

The ClientId of the app requesting authorization

Declaration
string ClientId { get; }
Property Value
Type Description
String
| Improve this Doc View Source

EndPoint

Details describing the endpoint of the OAuth2 instance

Declaration
EndPointInfo EndPoint { get; }
Property Value
Type Description
EndPointInfo
| Improve this Doc View Source

Scope

The scope(s) being authorized

Declaration
string Scope { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

CheckToken(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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 Source

WaitingForConfirmation

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>
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX