Поделиться через


TeamFoundationOAuthService.CreateToken Method (TeamFoundationRequestContext, Identity, String, OAuthTokenType, String)

CreateToken will create a new access token for the identity specified. It will be saved with the identity with the description that was supplied.

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

Syntax

'Declaration
Public Function CreateToken ( _
    requestContext As TeamFoundationRequestContext, _
    identity As Identity, _
    clientId As String, _
    tokenType As OAuthTokenType, _
    redirectUri As String _
) As OAuthToken
public OAuthToken CreateToken(
    TeamFoundationRequestContext requestContext,
    Identity identity,
    string clientId,
    OAuthTokenType tokenType,
    string redirectUri
)
public:
OAuthToken^ CreateToken(
    TeamFoundationRequestContext^ requestContext, 
    Identity^ identity, 
    String^ clientId, 
    OAuthTokenType tokenType, 
    String^ redirectUri
)
member CreateToken : 
        requestContext:TeamFoundationRequestContext * 
        identity:Identity * 
        clientId:string * 
        tokenType:OAuthTokenType * 
        redirectUri:string -> OAuthToken
public function CreateToken(
    requestContext : TeamFoundationRequestContext, 
    identity : Identity, 
    clientId : String, 
    tokenType : OAuthTokenType, 
    redirectUri : String
) : OAuthToken

Parameters

  • clientId
    Type: System.String

    This defines which application the token is being generated for.

  • redirectUri
    Type: System.String

    Redirection Uri associated with the token.

Return Value

Type: Microsoft.TeamFoundation.Framework.Server.OAuthToken
Returns OAuthToken.

.NET Framework Security

See Also

Reference

TeamFoundationOAuthService Class

CreateToken Overload

Microsoft.TeamFoundation.Framework.Server Namespace