다음을 통해 공유


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

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)

Syntax

'Declaration
Public Sub New ( _
    authorizationUri As Uri, _
    clientId As String, _
    clientSecret As String, _
    initialToken As OAuthTokenContainer, _
    tokensReceived As OAuthTokensReceivedCallback _
)
public OAuthTokenCredential(
    Uri authorizationUri,
    string clientId,
    string clientSecret,
    OAuthTokenContainer initialToken,
    OAuthTokensReceivedCallback tokensReceived
)
public:
OAuthTokenCredential(
    Uri^ authorizationUri, 
    String^ clientId, 
    String^ clientSecret, 
    OAuthTokenContainer^ initialToken, 
    OAuthTokensReceivedCallback^ tokensReceived
)
new : 
        authorizationUri:Uri * 
        clientId:string * 
        clientSecret:string * 
        initialToken:OAuthTokenContainer * 
        tokensReceived:OAuthTokensReceivedCallback -> OAuthTokenCredential
public function OAuthTokenCredential(
    authorizationUri : Uri, 
    clientId : String, 
    clientSecret : String, 
    initialToken : OAuthTokenContainer, 
    tokensReceived : OAuthTokensReceivedCallback
)

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.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

.NET Framework Security

See Also

Reference

OAuthTokenCredential Class

OAuthTokenCredential Overload

Microsoft.TeamFoundation.Client Namespace