IMobileAppTokenHandler.CreateTokenInfo Method (IEnumerable<Claim>, Nullable<TimeSpan>, String)
Creates a TokenInfo containing a security token to be used as part of the Mobile Service authentication process.
Namespace: Microsoft.Azure.Mobile.Server.Authentication
Assembly: Microsoft.Azure.Mobile.Server.Authentication (in Microsoft.Azure.Mobile.Server.Authentication.dll)
Syntax
TokenInfo CreateTokenInfo(
IEnumerable<Claim> claims,
Nullable<TimeSpan> lifetime,
string secretKey
)
TokenInfo^ CreateTokenInfo(
IEnumerable<Claim^>^ claims,
Nullable<TimeSpan> lifetime,
String^ secretKey
)
abstract CreateTokenInfo :
claims:IEnumerable<Claim> *
lifetime:Nullable<TimeSpan> *
secretKey:string -> TokenInfo
Function CreateTokenInfo (
claims As IEnumerable(Of Claim),
lifetime As Nullable(Of TimeSpan),
secretKey As String
) As TokenInfo
Parameters
claims
Type: System.Collections.Generic.IEnumerable<Claim>The set of claims to include in the token.
lifetime
Type: System.Nullable<TimeSpan>A TimeSpan indicating how long the token is valid for. To create a token with no expiry, use null.
secretKey
Type: System.StringThe secret key to sign the token with.
Return Value
Type: Microsoft.Azure.Mobile.Server.Authentication.TokenInfo
A TokenInfo containing a security token.
See Also
IMobileAppTokenHandler Interface
Microsoft.Azure.Mobile.Server.Authentication Namespace
Return to top