public ConsentActionResult(IViewService viewSvc, IDictionary<string, object> env, ConsentViewModel model) : base(async () => await viewSvc.Consent(env, model)) { if (viewSvc == null) throw new ArgumentNullException("viewSvc"); if (env == null) throw new ArgumentNullException("env"); if (model == null) throw new ArgumentNullException("model"); }
public ConsentActionResult(IViewService viewSvc, IDictionary <string, object> env, ConsentViewModel model) : base(async() => await viewSvc.Consent(env, model)) { if (viewSvc == null) { throw new ArgumentNullException("viewSvc"); } if (env == null) { throw new ArgumentNullException("env"); } if (model == null) { throw new ArgumentNullException("model"); } }
private IHttpActionResult CreateConsentResult( ValidatedAuthorizeRequest validatedRequest, UserConsent consent, NameValueCollection requestParameters, string errorMessage) { var env = Request.GetOwinEnvironment(); var consentModel = new ConsentViewModel() { SiteName = _options.SiteName, SiteUrl = env.GetIdentityServerBaseUrl(), ErrorMessage = errorMessage, CurrentUser = User.GetName(), ClientName = validatedRequest.Client.ClientName, ClientUrl = validatedRequest.Client.ClientUri, ClientLogoUrl = validatedRequest.Client.LogoUri.AbsoluteUri, IdentityScopes = validatedRequest.GetIdentityScopes(), ApplicationScopes = validatedRequest.GetApplicationScopes(), AllowRememberConsent = validatedRequest.Client.AllowRememberConsent, RememberConsent = consent != null ? consent.RememberConsent : true, LoginWithDifferentAccountUrl = Url.Route(Constants.RouteNames.Oidc.SwitchUser, null) + "?" + requestParameters.ToQueryString(), LogoutUrl = Url.Route(Constants.RouteNames.Oidc.EndSession, null), ConsentUrl = Url.Route(Constants.RouteNames.Oidc.Consent, null) + "?" + requestParameters.ToQueryString() }; return new ConsentActionResult(_viewService, env, consentModel); }
public virtual Task<System.IO.Stream> Consent(IDictionary<string, object> env, ConsentViewModel model) { return Render(model, "consent"); }