public ClientPermissionsActionResult(IViewService viewSvc, IDictionary<string, object> env, ClientPermissionsViewModel model)
     : base(async () => await viewSvc.ClientPermissions(model))
 {
     if (viewSvc == null) throw new ArgumentNullException("viewSvc");
     if (env == null) throw new ArgumentNullException("env");
     if (model == null) throw new ArgumentNullException("model");
 }
Пример #2
0
		public async Task<Stream> ClientPermissions (ClientPermissionsViewModel model)
		{
			return await Render (model, "ClientPermissions");
		}
		public Task<Stream> ClientPermissions(ClientPermissionsViewModel model)
		{
			return Task.FromResult(RunTemplate("permission", model));
		}
Пример #4
0
 /// <summary>
 /// Loads the HTML for the client permissions page.
 /// </summary>
 /// <param name="model">The model.</param>
 /// <returns>
 /// Stream for the HTML
 /// </returns>
 public Task<Stream> ClientPermissions(ClientPermissionsViewModel model)
 {
     return Render(model, ClientPermissionsView);
 }
 private async Task<IHttpActionResult> RenderPermissionsPage(string error = null)
 {
     var env = Request.GetOwinEnvironment();
     var clients = await this.clientPermissionsService.GetClientPermissionsAsync(User.GetSubjectId());
     var vm = new ClientPermissionsViewModel
     {
         RequestId = env.GetRequestId(),
         SiteName = options.SiteName,
         SiteUrl = env.GetIdentityServerBaseUrl(),
         CurrentUser = env.GetCurrentUserDisplayName(),
         LogoutUrl = env.GetIdentityServerLogoutUrl(),
         RevokePermissionUrl = Request.GetOwinContext().GetPermissionsPageUrl(),
         AntiForgery = antiForgeryToken.GetAntiForgeryToken(),
         Clients = clients,
         ErrorMessage = error
     };
     return new ClientPermissionsActionResult(this.viewSvc, Request.GetOwinEnvironment(), vm);
 }
Пример #6
0
 public Task<Stream> ClientPermissions(ClientPermissionsViewModel model)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Loads the HTML for the client permissions page.
 /// </summary>
 /// <param name="model">
 /// The model.
 /// </param>
 /// <returns>
 /// The <see cref="ActionResult"/>.
 /// </returns>
 public ActionResult Permissions(ClientPermissionsViewModel model)
 {
     return this.View(model);
 }