WSFederationAuthenticationModule.SetPrincipalAndWriteSessionToken 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.
Sets the thread principal and optionally writes the session cookie.
public:
void SetPrincipalAndWriteSessionToken(System::IdentityModel::Tokens::SessionSecurityToken ^ sessionToken, bool isSession);
public void SetPrincipalAndWriteSessionToken (System.IdentityModel.Tokens.SessionSecurityToken sessionToken, bool isSession);
member this.SetPrincipalAndWriteSessionToken : System.IdentityModel.Tokens.SessionSecurityToken * bool -> unit
Public Sub SetPrincipalAndWriteSessionToken (sessionToken As SessionSecurityToken, isSession As Boolean)
Parameters
- sessionToken
- SessionSecurityToken
The session security token that was created from the WS-Federation sign-in response message from the STS.
- isSession
- Boolean
true
to write a cookie that represents the session included with the response; otherwise, false
.
Exceptions
sessionToken
is null
.
Remarks
Called from the request processing pipeline implemented in the OnAuthenticateRequest event-handler delegate. This method does the following:
Invokes the OnSessionSecurityTokenCreated method to raise the SessionSecurityTokenCreated event. You can use this event to modify the session token before it is used to set the thread principal and written to the session cookie and to specify whether the session cookie should be written.
Invokes the AuthenticateSessionSecurityToken method on the configured session authentication module (SessionAuthenticationModule) to set the thread principal and optionally write the session cookie.