Metoda TeamFoundationOAuthService.CreateToken — (TeamFoundationRequestContext, TeamFoundationIdentity, String, OAuthTokenType, String)
CreateToken spowoduje utworzenie nowego tokenu dostępu określono tożsamości.Będzie ona zapisana z tożsamością, opis, który został dostarczony.
Przestrzeń nazw: Microsoft.TeamFoundation.Framework.Server
Zestaw: Microsoft.TeamFoundation.Framework.Server (w Microsoft.TeamFoundation.Framework.Server.dll)
Składnia
'Deklaracja
Public Function CreateToken ( _
requestContext As TeamFoundationRequestContext, _
identity As TeamFoundationIdentity, _
clientId As String, _
tokenType As OAuthTokenType, _
redirectUri As String _
) As OAuthToken
public OAuthToken CreateToken(
TeamFoundationRequestContext requestContext,
TeamFoundationIdentity identity,
string clientId,
OAuthTokenType tokenType,
string redirectUri
)
Parametry
- requestContext
Typ: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext
Kontekst żądania mogą być dowolnego typu host.
- identity
Typ: Microsoft.TeamFoundation.Framework.Server.TeamFoundationIdentity
Tożsamość wygenerować token dostępu.
- clientId
Typ: System.String
Definiuje to której token jest generowany dla aplikacji.
- tokenType
Typ: Microsoft.TeamFoundation.Framework.Server.OAuthTokenType
Typ tokenu wymagane.Zobacz typy klasy OAuthTokenType.
- redirectUri
Typ: System.String
Przekierowania Uri skojarzonych z tokenem.
Wartość zwracana
Typ: Microsoft.TeamFoundation.Framework.Server.OAuthToken
Zabezpieczenia programu .NET Framework
- Pełne zaufanie do bezpośredniego wywołującego. Tego elementu członkowskiego nie można używać w kodzie częściowo zaufanym. Aby uzyskać więcej informacji, zobacz Przy użyciu bibliotek z częściowo zaufanego kodu..