WSFederationAuthenticationModule.SecurityTokenValidated 이벤트
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
STS(보안 토큰 서비스)에서 받은 보안 토큰의 유효성을 검사한 후 세션 보안 토큰이 생성되기 전에 발생합니다.
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)
이벤트 유형
예제
void WSFederationAuthenticationModule_SecurityTokenValidated(object sender, SecurityTokenValidatedEventArgs e)
{
//All vlidation SecurityTokenHandler checks are successful
System.Diagnostics.Trace.WriteLine("Handling SecurityTokenValidated event");
}
설명
이벤트 처리기를 추가하여 세션 토큰을 만드는 데 사용되기 전에 STS(보안 토큰 서비스)에서 WS-Federation 로그인 응답 메시지를 처리하는 동안 생성된 보안 주체를 수정할 수 있습니다. 이벤트 처리기에서 속성을 통해 보안 주체에 ClaimsPrincipal 액세스할 수 있습니다. 이벤트는 SecurityTokenValidated 취소할 수 있는 이벤트이며, 이벤트 처리기에서 속성을 true 설정 Cancel 하여 WS-Federation 로그인 응답 메시지의 처리를 종료할 수 있습니다.
이 이벤트는 STS(보안 토큰 서비스)에서 받은 WS-Federation 로그인 응답 메시지("wsignin1.0")를 처리할 때 이벤트 처리기 대리자 내부에서 OnAuthenticateRequest 발생합니다. 이는 wresult 또는 로그인 응답 메시지의 wresultptr 매개 변수에서 역직렬화된 보안 토큰의 유효성을 검사한 후 세션 보안 토큰이 생성되기 직전에 발생합니다.