This documentation is archived and is not being maintained.

OAuthTokenCredential Constructor (Uri, String, String, OAuthTokenContainer, OAuthTokensReceivedCallback)

Visual Studio 2013

Initializes a new OAuthTokenCredential instance with the specified client id and secret and an initial token

Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

public:
OAuthTokenCredential(
	Uri^ authorizationUri, 
	String^ clientId, 
	String^ clientSecret, 
	OAuthTokenContainer^ initialToken, 
	OAuthTokensReceivedCallback^ tokensReceived
)

Parameters

authorizationUri
Type: System::Uri

The base URI of the authorization server. This is usually the same as the URI of the TFS server

clientId
Type: System::String

The client id

clientSecret
Type: System::String

The client secret

initialToken
Type: Microsoft.TeamFoundation.Client::OAuthTokenContainer

The initial token to use on the resource server before attempting to contact the authorization server (for another grant or new access token). Usually this token will have been persisted by the caller and is used here to resume the session

tokensReceived
Type: Microsoft.TeamFoundation.Client::OAuthTokensReceivedCallback

Allow API consumers to obtain the received access token and refresh token in case they need to be persisted for future access

Show: