Skip to content

GetAuthenticationTicket

Generates a login ticket for the specified user.

1
$Membership.GetAuthenticationTicket(identity: ( string | Identity ), service?: string):( string | null )

Parameters

( string | Identity ) identity
    The user identity for whom to generate the login ticket.

string service optional
    Optional service selection. When provided user only allowed to register with selected service.

Returns

The login ticket, or null when the identity is not found.

Examples

1
2
var ticket = $Membership.GetAuthenticationTicket($Xml.Evaluate('User'));
var link = $Domain.Url + '/app/addlogin?auth=' + encodeURIComponent(ticket);