Share via


VssOAuthCredential Constructor (Uri, String, String, VssOAuthTokenContainer, Action<VssOAuthTokenContainer>)

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

Namespace:  Microsoft.VisualStudio.Services.Client
Assembly:  Microsoft.VisualStudio.Services.Client (in Microsoft.VisualStudio.Services.Client.dll)

Syntax

'Declaration
Public Sub New ( _
    authorizationUri As Uri, _
    clientId As String, _
    clientSecret As String, _
    initialToken As VssOAuthTokenContainer, _
    tokensReceived As Action(Of VssOAuthTokenContainer) _
)
public VssOAuthCredential(
    Uri authorizationUri,
    string clientId,
    string clientSecret,
    VssOAuthTokenContainer initialToken,
    Action<VssOAuthTokenContainer> tokensReceived
)
public:
VssOAuthCredential(
    Uri^ authorizationUri, 
    String^ clientId, 
    String^ clientSecret, 
    VssOAuthTokenContainer^ initialToken, 
    Action<VssOAuthTokenContainer^>^ tokensReceived
)
new : 
        authorizationUri:Uri * 
        clientId:string * 
        clientSecret:string * 
        initialToken:VssOAuthTokenContainer * 
        tokensReceived:Action<VssOAuthTokenContainer> -> VssOAuthCredential
public function VssOAuthCredential(
    authorizationUri : Uri, 
    clientId : String, 
    clientSecret : String, 
    initialToken : VssOAuthTokenContainer, 
    tokensReceived : Action<VssOAuthTokenContainer>
)

Parameters

  • authorizationUri
    Type: System.Uri

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

  • initialToken
    Type: Microsoft.VisualStudio.Services.Client.VssOAuthTokenContainer

    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

.NET Framework Security

See Also

Reference

VssOAuthCredential Class

VssOAuthCredential Overload

Microsoft.VisualStudio.Services.Client Namespace