Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SecurityTokenService::ValidateRequest Method (RequestSecurityToken^)

.NET Framework (current version)
 

Validates the security token request (RST) encapsulated by this instance.

Namespace:   System.IdentityModel
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

protected:
virtual void ValidateRequest(
	RequestSecurityToken^ request
)

Parameters

request
Type: System.IdentityModel.Protocols.WSTrust::RequestSecurityToken^

A RequestSecurityToken that represents the request.

Exception Condition
InvalidRequestException

request is null.

-or-

The RequestType property of the request is not set to RequestTypes::Issue.

-or-

The KeyType property of the request is not null or one of the constants defined in the System.IdentityModel.Protocols.WSTrust::KeyTypes class.

-or-

The KeyType of the request is Bearer and the KeySize element is present, but its value is not equal to zero.

UnsupportedTokenTypeBadRequestException

The STS does not support the request token type (based on the value of the TokenType property of the request).

The ValidateRequest method is called from the token issuance pipeline (the Issue method) to validate the incoming RST. The RST is validated against the requirements (policy) of the STS and an appropriate exception is thrown if it is not valid.

The default implementation of the SecurityTokenService class supports only the RST-RSTR pattern and only the Issue binding of the WS-Trust specification (the RequestType property of the request must be set to RequestTypes::Issue). The default implementation of this method enforces these requirements (and others noted in the exceptions section). You can override this method if you must enforce different validation requirements for your custom STS.

.NET Framework
Available since 4.5
Return to top
Show:
© 2017 Microsoft