Freigeben über


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

Initializes a new OAuthTokenCredential instance with the specified client id and secret and either an authorization code or a refresh 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, _
    authCodeOrRefreshToken As String, _
    tokensReceived As OAuthTokensReceivedCallback _
)
public OAuthTokenCredential(
    Uri authorizationUri,
    string clientId,
    string clientSecret,
    string authCodeOrRefreshToken,
    OAuthTokensReceivedCallback tokensReceived
)
public:
OAuthTokenCredential(
    Uri^ authorizationUri, 
    String^ clientId, 
    String^ clientSecret, 
    String^ authCodeOrRefreshToken, 
    OAuthTokensReceivedCallback^ tokensReceived
)
new : 
        authorizationUri:Uri * 
        clientId:string * 
        clientSecret:string * 
        authCodeOrRefreshToken:string * 
        tokensReceived:OAuthTokensReceivedCallback -> OAuthTokenCredential
public function OAuthTokenCredential(
    authorizationUri : Uri, 
    clientId : String, 
    clientSecret : String, 
    authCodeOrRefreshToken : String, 
    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

  • authCodeOrRefreshToken
    Type: System.String

    Either an authorization code or a refresh token which can be used to obtain an access token (and a new refresh token)

.NET Framework Security

See Also

Reference

OAuthTokenCredential Class

OAuthTokenCredential Overload

Microsoft.TeamFoundation.Client Namespace