Show / Hide Table of Contents

Interface IDeviceOAuth2Stepwise

Interface for device based OAuth2 flow that does not use event callbacks.

Inherited Members
IDeviceOAuthInfo.WaitingForConfirmation
IDeviceOAuthInfo.EndPoint
IDeviceOAuthInfo.Scope
IDeviceOAuthInfo.ClientId
IDeviceOAuthInfo.CheckToken(TokenInfo)
IDeviceOAuthInfo.CheckToken(TokenInfo, CancellationToken)
IDeviceOAuthInfo.GetProfile(TokenInfo)
IDeviceOAuthInfo.GetProfile(TokenInfo, CancellationToken)
Namespace: DeviceOAuth2
Assembly: DeviceOAuth2.dll
Syntax
public interface IDeviceOAuth2Stepwise : IDeviceOAuthInfo

Methods

| Improve this Doc View Source

RefreshAccessToken(TokenInfo)

Refreshes an access token if supported.

Declaration
Task<TokenInfo> RefreshAccessToken(TokenInfo token)
Parameters
Type Name Description
TokenInfo token

The token to refresh

Returns
Type Description
Task<TokenInfo>

Refreshed token

| Improve this Doc View Source

RefreshAccessToken(TokenInfo, CancellationToken)

Refreshes an access token if supported.

Declaration
Task<TokenInfo> RefreshAccessToken(TokenInfo token, CancellationToken cancelToken)
Parameters
Type Name Description
TokenInfo token

The token to refresh

CancellationToken cancelToken

A CancellationToken

Returns
Type Description
Task<TokenInfo>

Refreshed token

| Improve this Doc View Source

StartAuthorization()

Begins the authorization workflow by getting a device and user code from the endpoint.

Declaration
Task<AuthInfo> StartAuthorization()
Returns
Type Description
Task<AuthInfo>

An AuthInfo. The user should be presented the VerificationUri and UserCode as well as instruction on what to do with them. This object should then be passed to WaitForUserConsent(AuthInfo).

| Improve this Doc View Source

StartAuthorization(CancellationToken)

Begins the authorization workflow by getting a device and user code from the endpoint.

Declaration
Task<AuthInfo> StartAuthorization(CancellationToken cancelToken)
Parameters
Type Name Description
CancellationToken cancelToken

A CancellationToken

Returns
Type Description
Task<AuthInfo>

An AuthInfo. The user should be presented the VerificationUri and UserCode as well as instruction on what to do with them. This object should then be passed to WaitForUserConsent(AuthInfo, CancellationToken)

| Improve this Doc View Source

WaitForUserConsent(AuthInfo)

Polls the oauth endpoint until: 1) The user authorizes access 2) The user denies access 3) The authorization times out (endpoint specific)

Declaration
Task<TokenInfo> WaitForUserConsent(AuthInfo info)
Parameters
Type Name Description
AuthInfo info

The AuthInfo returned from StartAuthorization()

Returns
Type Description
Task<TokenInfo>

A TokenInfo that contains the Access Token

| Improve this Doc View Source

WaitForUserConsent(AuthInfo, CancellationToken)

Polls the oauth endpoint until: 1) The user authorizes access 2) The user denies access 3) The authorization times out (endpoint specific)

Declaration
Task<TokenInfo> WaitForUserConsent(AuthInfo info, CancellationToken cancelToken)
Parameters
Type Name Description
AuthInfo info

The AuthInfo returned from StartAuthorization(CancellationToken)

CancellationToken cancelToken

A CancellationToken

Returns
Type Description
Task<TokenInfo>

A TokenInfo that contains the Access Token

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX