{"id":22881392,"url":"https://github.com/nicogis/recoverypasswordxaf","last_synced_at":"2025-03-31T15:51:05.826Z","repository":{"id":80808363,"uuid":"532887497","full_name":"nicogis/RecoveryPasswordXAF","owner":"nicogis","description":"RecoveryPasswordXAF","archived":false,"fork":false,"pushed_at":"2022-09-07T06:34:38.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T21:31:33.695Z","etag":null,"topics":["devexpress","recovery-password","webforms","xaf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicogis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-05T12:18:46.000Z","updated_at":"2022-09-05T14:29:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"852000cb-8856-4093-8287-8bb670b6d87d","html_url":"https://github.com/nicogis/RecoveryPasswordXAF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FRecoveryPasswordXAF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FRecoveryPasswordXAF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FRecoveryPasswordXAF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicogis%2FRecoveryPasswordXAF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicogis","download_url":"https://codeload.github.com/nicogis/RecoveryPasswordXAF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246491593,"owners_count":20786214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devexpress","recovery-password","webforms","xaf"],"created_at":"2024-12-13T17:33:34.718Z","updated_at":"2025-03-31T15:51:05.797Z","avatar_url":"https://github.com/nicogis.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"### This topic demonstrates how to extend your ASP.NET Web Forms application with recovery password\n\nUsers recovery password setting email.\nIf email exists, the system sends email with link to reset password.\nThis link expires after 10 minutes.\n\n#### Follow these steps:\n\nIn agnostic module:\n\n- Copy in image RestorePassword.png and ***Set a build action*** embedded resource\n\n- In ApplicationUser.cs add property Email\n\n```csharp\n        private string email;\n        public string Email\n        {\n            get { return email; }\n            set { SetPropertyValue(nameof(Email), ref email, value); }\n        }\n\n```\n\n- Add class ChangePassword. Here I pasted script SQL Server\n\n```xml\n\nUSE [YourDB]\nGO\n\nSET ANSI_NULLS ON\nGO\n\nSET QUOTED_IDENTIFIER ON\nGO\n\nCREATE TABLE [dbo].[ChangePassword](\n\t[Token] [uniqueidentifier] ROWGUIDCOL  NOT NULL,\n\t[DateRequest] [datetime] NOT NULL,\n\t[User] [nvarchar](100) NOT NULL,\n CONSTRAINT [PK_ChangePassword] PRIMARY KEY CLUSTERED \n(\n\t[Token] ASC\n)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]\n) ON [PRIMARY]\nGO\n\nALTER TABLE [dbo].[ChangePassword] ADD  CONSTRAINT [DF_ChangePassword_DateRequest]  DEFAULT (getdate()) FOR [DateRequest]\nGO\n```\n\n- Add class ManageUsersOnLogonController.cs and RestorePasswordParameters.cs\n\n****In RestorePasswordParameters you need set\n    \u003cbr\u003e- urlApp variable \n    \u003cbr\u003e- SendMail method\n    \u003cbr\u003e- body email (optional)****\n\n\n- In module.cs\n```csharp\n        public override void Setup(XafApplication application) {\n            base.Setup(application);\n            // Manage various aspects of the application UI and behavior at the module level.\n            application.CreateCustomLogonWindowControllers += Application_CreateCustomLogonWindowControllers; ;\n        }\n\n        private void Application_CreateCustomLogonWindowControllers(object sender, CreateCustomLogonWindowControllersEventArgs e)\n        {\n            XafApplication app = (XafApplication)sender;\n            e.Controllers.Add(app.CreateController\u003cManageUsersOnLogonController\u003e());\n        }\n```\n\n- Add ChangePassword.aspx in web project\n   ****\u003cbr\u003e- change x minutes expire (optional)****\n\n- Add web.config in configuration section:\n\n```xml\n                     \n    \u003clocation path=\"ChangePassword.aspx\"\u003e\n\t\t\u003csystem.web\u003e\n\t\t\t\u003cauthorization\u003e\n\t\t\t\t\u003callow users=\"?\"/\u003e\n\t\t\t\u003c/authorization\u003e\n\t\t\u003c/system.web\u003e\n\t\u003c/location\u003e\n \n```\n\n- Run application\n\n![](images/Login.png)\n\n![](images/Email.png)\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicogis%2Frecoverypasswordxaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicogis%2Frecoverypasswordxaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicogis%2Frecoverypasswordxaf/lists"}