Ejemplo n.º 1
0
        public async Task ReturnResponse(IOwinContext context, IIdentityServerRecaptchaOptions options, IOpenIdConnectRequest openIdConnectRequest)
        {
            var identityServerChallengeResource = new IdentityServerBadRequestChallengeResource
            {
                Message       = CreateResponseMessage(),
                ChallengeHtml = _recaptchaPage.CreateHtmlBody(openIdConnectRequest)
            };

            await context.ReturnResponse(HttpStatusCode.BadRequest, identityServerChallengeResource);
        }
Ejemplo n.º 2
0
 public async Task ReturnResponse(IOwinContext context, IIdentityServerRecaptchaOptions options, IOpenIdConnectRequest openIdConnectRequest)
 {
     await context.ReturnResponse(HttpStatusCode.Unauthorized,
                                  new IdentityServerUnauthorizedChallengeResource
     {
         ChallengeHtml   = _recaptchaPage.CreateHtmlBody(openIdConnectRequest),
         LinkToChallenge = options.LinkToChallenge,
         Description     = CreateResponseMessage()
     }, $@"recaptcha url=""{options.LinkToChallenge}""");
 }