Επεξεργασία

Κοινή χρήση μέσω


WSFederationAuthenticationModule.SecurityTokenValidated Event

Definition

Occurs after a security token that was received from the security token service (STS) has been validated but before the session security token is created.

public:
 event EventHandler<System::IdentityModel::Services::SecurityTokenValidatedEventArgs ^> ^ SecurityTokenValidated;
public event EventHandler<System.IdentityModel.Services.SecurityTokenValidatedEventArgs> SecurityTokenValidated;
member this.SecurityTokenValidated : EventHandler<System.IdentityModel.Services.SecurityTokenValidatedEventArgs> 
Public Custom Event SecurityTokenValidated As EventHandler(Of SecurityTokenValidatedEventArgs) 
Public Event SecurityTokenValidated As EventHandler(Of SecurityTokenValidatedEventArgs) 

Event Type

Examples

void WSFederationAuthenticationModule_SecurityTokenValidated(object sender, SecurityTokenValidatedEventArgs e)
{
    //All vlidation SecurityTokenHandler checks are successful
    System.Diagnostics.Trace.WriteLine("Handling SecurityTokenValidated event");
}

Remarks

You can add an event handler to modify the principal created while processing a WS-Federation sign-in response message from a security token service (STS) before it is used to create the session token. In the event handler, you can access the principal through the ClaimsPrincipal property. The SecurityTokenValidated event is a cancelable event, you can set the Cancel property to true in an event handler to terminate processing of the WS-Federation sign-in response message.

This event is raised from inside the OnAuthenticateRequest event-handler delegate when processing a WS-Federation sign-in response message ("wsignin1.0") received from the security token service (STS). It is raised just after the security token that was deserialized from the wresult or the wresultptr parameter in the sign-in response message has been validated, and before the session security token is created.

Applies to