public ActionResult Save(Bam.Net.CoreServices.ApplicationRegistration.Data.Dao.Client[] values) { try { ClientCollection saver = new ClientCollection(); saver.AddRange(values); saver.Save(); return(Json(new { Success = true, Message = "", Dao = "" })); } catch (Exception ex) { return(GetErrorResult(ex)); } }
public static void AddClients(ClientCollection clients) { clients.AddRange( new Client { ClientId = "client_id", ClientSecrets = { new Secret("client_secret".ToSha256()) }, AllowedGrantTypes = GrantTypes.CodeAndClientCredentials, AlwaysIncludeUserClaimsInIdToken = true, // where to redirect to after login RedirectUris = { "https://localhost:44369/signin-oidc" }, RequireConsent = false, // where to redirect to after logout PostLogoutRedirectUris = { "https://localhost:44369/signout-callback-oidc" }, AllowedScopes = new List <string> { "openid", "profile", "custom.profile", "role", } }); }