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
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextRequest Context may be any host type.
oauthSourceToken
Type: Microsoft.TeamFoundation.Framework.Server.OAuthTokenA token can be created from a source token (either Authorization, or Refresh Token).
Return Value
Type: array<Microsoft.TeamFoundation.Framework.Server.OAuthToken[]
Returns the requested tokens based on the input type token
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.