{"id":15625717,"url":"https://github.com/daniel15/simpleidentity","last_synced_at":"2025-03-29T17:15:05.625Z","repository":{"id":36117411,"uuid":"40419846","full_name":"Daniel15/SimpleIdentity","owner":"Daniel15","description":"Simple ASP.NET Core authentication and identity provider. Valid users are specified in a simple configuration file.","archived":false,"fork":false,"pushed_at":"2023-10-07T05:23:18.000Z","size":53,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T23:08:09.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daniel15.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2015-08-08T23:57:57.000Z","updated_at":"2023-10-07T05:08:12.000Z","dependencies_parsed_at":"2024-06-11T18:55:42.584Z","dependency_job_id":"09954054-e9df-4371-a86f-e55bc4c3c270","html_url":"https://github.com/Daniel15/SimpleIdentity","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FSimpleIdentity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FSimpleIdentity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FSimpleIdentity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FSimpleIdentity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daniel15","download_url":"https://codeload.github.com/Daniel15/SimpleIdentity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246215828,"owners_count":20741894,"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":[],"created_at":"2024-10-03T10:02:09.970Z","updated_at":"2025-03-29T17:15:05.596Z","avatar_url":"https://github.com/Daniel15.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"ASP.NET SimpleIdentity\n======================\n\nA simple ASP.NET Core authentication and identity provider, ideal for smaller websites. Valid users are specified in a simple configuration file rather than a database.\n\nBug reports and feature requests are welcome!\n\nInstallation\n============\n\nIf you are creating a brand new ASP.NET Core web application, ensure you select \"No Authentication\" when creating it.\n\nInstall NuGet package:\n```\nInstall-Package Daniel15.SimpleIdentity\n```\n\nCreate configuration. SimpleIdentity uses the [standard ASP.NET configuration library](http://docs.asp.net/en/latest/fundamentals/configuration.html). Running `Daniel15.SimpleIdentity.Setup` will allow you to enter a email address and password, and output the required config section. An example using `user@example.com` as the email address and `password` as the password:\n\n```js\n    \"Auth\": {\n        \"Users\": {\n            \"USER@EXAMPLE.COM\": {\n                \"Email\": \"user@example.com\",\n                \"NormalizedUserName\": \"USER@EXAMPLE.COM\",\n                \"PasswordHash\": \"AQAAAAEAACcQAAAAEJOYL0MGZ5CNnERvqzI2Wl9eJLXMsuchKP1EIWGQneZ1GuNCjheC4pD1AWgVy+decQ==\"\n            }\n        }\n    }\n```\n\nPlace this in any config file (for example, `config.json`). In a production scenario, you will want to store this in a separate config file that's not checked in to source control.\n\nConfigure SimpleIdentity in `Startup.cs`:\n\n```csharp\npublic void ConfigureServices(IServiceCollection services)\n{\n    // Add Identity services to the services container.\n    services.AddIdentity\u003cSimpleIdentityUser, SimpleIdentityRole\u003e()\n        .AddSimpleIdentity\u003cSimpleIdentityUser\u003e(Configuration.GetConfigurationSection(\"Auth\"))\n        .AddDefaultTokenProviders();\n```\n\nEnable identity services by adding this before `app.UseMvc`:\n```csharp\n// Add cookie-based authentication to the request pipeline.\napp.UseAuthentication();\n```\n\nCreate login form. Some example files are included, based off the regular ASP.NET authentication:\n - [ViewModels/LoginViewModel.cs](https://github.com/Daniel15/SimpleIdentity/blob/master/src/Daniel15.SimpleIdentity.Sample/ViewModels/LoginViewModel.cs)\n - [Controllers/AccountController.cs](https://github.com/Daniel15/SimpleIdentity/blob/master/src/Daniel15.SimpleIdentity.Sample/Controllers/AccountController.cs)\n - [Views/Account/Login.cshtml](https://github.com/Daniel15/SimpleIdentity/blob/master/src/Daniel15.SimpleIdentity.Sample/Views/Account/Login.cshtml)\n - [Views/Shared/_LoginPartial.cshtml](https://github.com/Daniel15/SimpleIdentity/blob/master/src/Daniel15.SimpleIdentity.Sample/Views/Shared/_LoginPartial.cshtml)\n\nHit `/Account/Login` and it should work :)\n\nFor a full example, see the included [sample project](https://github.com/Daniel15/SimpleIdentity/blob/master/src/Daniel15.SimpleIdentity.Sample/).\n\nChangelog\n=========\n3.0.0 - 6th October 2023\n------------------------\n - Upgrade to ASP.NET Core 7.0. Note that if you are upgrading from an older version, you will need to re-hash the passwords by running `Daniel15.SimpleIdentity.Setup` again.\n\n2.0.0 - 17th October 2017\n-------------------------\n - Upgrade to ASP.NET Core 2.0\n - Throw better error message when config is missing\n \n1.2.0 - 21st August 2016\n------------------------\n - Upgrade to ASP.NET Core RTM\n\n1.1.0 - 27th May 2016\n---------------------\n - Upgrade to ASP.NET Core RC 2\n\n1.0.1 - 20th November 2015\n--------------------------\n - Upgrade to ASP.NET 5 RC 1\n\n1.0 - 8th August 2015\n-------------------------\n - Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel15%2Fsimpleidentity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel15%2Fsimpleidentity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel15%2Fsimpleidentity/lists"}