다음을 통해 공유


TeamFoundationOAuthService.CreateToken Method (TeamFoundationRequestContext, OAuthToken)

CreateAccessToken from a sourceToken allows the caller to take an existing authorization or refresh token and create an access token.

Note: If the input token is an authorization token the return tokens will have an initial accesstoken as array index [0], and a refresh token in array index [1]. If an access token is given it will be returned in array index [0].

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Function CreateToken ( _
    requestContext As TeamFoundationRequestContext, _
    oauthSourceToken As OAuthToken _
) As OAuthToken()
public OAuthToken[] CreateToken(
    TeamFoundationRequestContext requestContext,
    OAuthToken oauthSourceToken
)
public:
array<OAuthToken^>^ CreateToken(
    TeamFoundationRequestContext^ requestContext, 
    OAuthToken^ oauthSourceToken
)
member CreateToken : 
        requestContext:TeamFoundationRequestContext * 
        oauthSourceToken:OAuthToken -> OAuthToken[] 
public function CreateToken(
    requestContext : TeamFoundationRequestContext, 
    oauthSourceToken : OAuthToken
) : OAuthToken[]

Parameters

Return Value

Type: array<Microsoft.TeamFoundation.Framework.Server.OAuthToken[]
Returns the requested tokens based on the input type token

.NET Framework Security

See Also

Reference

TeamFoundationOAuthService Class

CreateToken Overload

Microsoft.TeamFoundation.Framework.Server Namespace