SetAuthTicket Method (String, Boolean, Int32)
Sets an encrypted MSCSAuth ticket for a registered user with the authorization time set to the specified time window.
Namespace: Microsoft.CommerceServer.Runtime
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Sub SetAuthTicket ( _
userID As String, _
cookieSupport As Boolean, _
timeWindow As Integer _
)
'Usage
Dim instance As AuthManager
Dim userID As String
Dim cookieSupport As Boolean
Dim timeWindow As Integer
instance.SetAuthTicket(userID, cookieSupport, _
timeWindow)
public void SetAuthTicket(
string userID,
bool cookieSupport,
int timeWindow
)
public:
void SetAuthTicket(
String^ userID,
bool cookieSupport,
int timeWindow
)
public function SetAuthTicket(
userID : String,
cookieSupport : boolean,
timeWindow : int
)
Parameters
- userID
Type: System..::.String
The user identifier. This parameter should be set to an empty string when the user logs off.
- cookieSupport
Type: System..::.Boolean
A value indicating whether the client supports cookies. true if the user supports cookies; otherwise, false.
- timeWindow
Type: System..::.Int32
The time period in minutes.
Exceptions
Exception | Condition |
---|---|
CommerceAuthenticationException | The ticket could not be set. |
Remarks
Use this method to set an encrypted MSCSAuth ticket for a registered user with the specified time window.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.