IAppServiceTokenHandler.TryValidateLoginToken Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Validates a string representation of a mobile service authentication token used to authenticate a user request.
public bool TryValidateLoginToken (string token, string signingKey, System.Collections.Generic.IEnumerable<string> validAudiences, System.Collections.Generic.IEnumerable<string> validIssuers, out System.Security.Claims.ClaimsPrincipal claimsPrincipal);
abstract member TryValidateLoginToken : string * string * seq<string> * seq<string> * ClaimsPrincipal -> bool
Public Function TryValidateLoginToken (token As String, signingKey As String, validAudiences As IEnumerable(Of String), validIssuers As IEnumerable(Of String), ByRef claimsPrincipal As ClaimsPrincipal) As Boolean
Parameters
- signingKey
- String
The secret key with which the token has been signed.
- validAudiences
- IEnumerable<String>
The valid audiences to accept in token validation.
- validIssuers
- IEnumerable<String>
The valid issuers to accept in token validation.
- claimsPrincipal
- ClaimsPrincipal
The resulting ClaimsPrincipal if the token is valid; null otherwise.
Returns
true
if token
is valid; otherwise false
/
Applies to
Azure SDK for .NET