Пример #1
0
        public static IActionResult InvalidAuthorization(this ControllerBase controller, AuthorizationRequestError error)
        {
            switch (error.ResponseMode)
            {
            case OpenIdConnectResponseMode.FormPost:
                return(controller.FormPost(error));

            case OpenIdConnectResponseMode.Fragment:
                return(controller.Fragment(error));

            case OpenIdConnectResponseMode.Query:
                return(controller.Query(error));

            default:
                return(new BadRequestResult());
            }
        }
Пример #2
0
 public static IActionResult Query(this ControllerBase controller, AuthorizationRequestError error)
 {
     return(new QueryResult(error.RedirectUri, error.Message.Parameters));
 }