Created
January 7, 2017 23:38
-
-
Save bradbrowne/580c17c17c4839a80bba9bbedc22a96d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SampleRequestValidator : RequestValidator | |
{ | |
protected override bool IsValidRequestString( HttpContext context, string value, RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex ) | |
{ | |
validationFailureIndex = 0; | |
if ( requestValidationSource == RequestValidationSource.Form | |
&& collectionKey.Equals( WSFederationConstants.Parameters.Result, StringComparison.Ordinal ) ) | |
{ | |
SignInResponseMessage message = WSFederationMessage.CreateFromFormPost( context.Request ) as SignInResponseMessage; | |
if ( message != null ) | |
{ | |
return true; | |
} | |
} | |
return base.IsValidRequestString( context, value, requestValidationSource, collectionKey, out validationFailureIndex ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment