「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicrosofttech.osscons.jp/]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。 -戻る --[[ASP.NET Core]] --[[ASP.NET Identity]] * 目次 [#n9d7262b] #contents *概要 [#d3c67788] -[[ASP.NET Identity(Identity 2.0)>ASP.NET Identity]](net45)はメンテナンス・フェーズ~ -新規採用時は、[[ASP.NET Core Identity(Identity 3.0)>https://github.com/aspnet/Identity/]](netcore)の使用を検討。 *詳細 [#w7230143] [[ASP.NET Identity(Identity 2.0)>ASP.NET Identity]](net45)が分かっていれば差分の知識で済む。 *その他 [#k4c67d35] **基本的な画面の追加方法 [#eeb59cab] ***2.0まで [#ha9cc793] -従来通り、MVCのビューが追加される。 -ただしRazorではなく[[Tagヘルパー>ASP.NET Core MVC#o6d55285]]を使用する。 ***2.1から [#lb006613] -従来通り、MVCのビューが追加されなくなっている。 -[[Razor Class Library>#r941c0e7]]によるスキャフォで追加できる模様。 **管理画面の追加方法 [#u64f6ec7] -[[ASP.NET Identity(Identity 2.0)>ASP.NET Identity]](net45)のUsersAdmin、RolesAdmin的な。 -[[ASP.NET Core Identity(Identity 3.0)>https://github.com/aspnet/Identity/]](netcore)に発見できず。 **マイグレーション(移行) [#f09595aa] -[[ASP.NET Identity(Identity 2.0)>ASP.NET Identity]](net45)から、~ [[ASP.NET Core Identity(Identity 3.0)>https://github.com/aspnet/Identity/]](netcore)は、~ マイグレーション(移行)というより再構築に近い。~ --ASP.NET Core Identityは、~ [[.NET Standard]]レイヤではなく[[.NET Core]]レイヤなので互換性が低い。 --以下のような情報もあるが、IUserインタフェースの廃止などがあり、~ ApplicationUser、ApplicationRoleが継承するクラスが異なる。 -[[参考>#f4b12d88]] *参考 [#c1a82a76] -ASP.NET Identity - CodePlex Archive~ https://archive.codeplex.com/?p=aspnetidentity --Identity 2.0 is no longer under primary development. No new features will be added, only bugs will be considered. --If Identity 3.0 does not have the feature you require then feel free to log a bug there. -aspnet/Identity:~ ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data.~ https://github.com/aspnet/Identity -aspnet/Docs:~ Docs/aspnetcore/security/authentication/identity/sample/src/ASPNETCore-IdentityDemoComplete at master~ https://github.com/aspnet/Docs/tree/master/aspnetcore/security/authentication/identity/sample/src/ASPNETCore-IdentityDemoComplete **Microsoft Docs [#b7ddd0a0] -ASP.NET Core Security の概要~ https://docs.microsoft.com/ja-jp/aspnet/core/security/ ***認証 [#scbc320a] -[[Entity Framework>Entity Framework Core]]前提 --ASP.NET core Identity の概要~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/identity --ASP.NET Core での id モデルのカスタマイズ~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/customize-identity-model -[[Entity Framework前提の解除>#eff7023d]] -構成 --ASP.NET Core Identity を構成します。~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/identity-configuration --アカウントの確認と ASP.NET Core でのパスワードの回復~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/accconfirm --ASP.NET Core で TOTP authenticator アプリの QR コード生成を有効にします。~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/identity-enable-qrcodes -外部ログイン --ASP.NET Core では、Ws-federation でユーザーを認証します。~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/ --Facebook、Google、ASP.NET Core での外部プロバイダーの認証~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/social/ ---ASP.NET Core での Facebook 外部ログインのセットアップ~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/social/facebook-logins ---ASP.NET Core での twitter 外部ログインのセットアップ~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/social/twitter-logins ---ASP.NET Core での Google 外部ログインのセットアップ~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/social/google-logins ---ASP.NET Core での Microsoft アカウントの外部ログインのセットアップ~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/social/microsoft-logins ---外部の OAuth 認証プロバイダー~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/social/other-logins ---その他の要求と ASP.NET Core での外部プロバイダーからのトークンを保存します。~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/social/additional-claims -その他 --ASP.NET Core での Windows 認証を構成します。~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/windowsauth --ASP.NET Core Identity なしでの cookie 認証を使用します。~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/cookie ***承認 [#p656adec] -ASP.NET Core での承認の概要~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authorization/introduction -ASP.NET Core 2.0: Getting Started With Identity And Role Management - TechNet Articles - TechNet Wiki~ https://social.technet.microsoft.com/wiki/contents/articles/51333.asp-net-core-2-0-getting-started-with-identity-and-role-management.aspx **[[Razor Class Library>ASP.NET Web Pages#e6ff0d5d]] [#r941c0e7] -asp.net identity - Where are the Login and Register pages in an AspNet Core scafolded app? - Stack Overflow~ https://stackoverflow.com/questions/50802781/where-are-the-login-and-register-pages-in-an-aspnet-core-scafolded-app -ASP.NET Core 2.1.0-preview1: Introducing Identity UI as a library | ASP.NET Blog~ https://blogs.msdn.microsoft.com/webdev/2018/03/02/aspnetcore-2-1-identity-ui/ -Scaffold Identity in ASP.NET Core projects | Microsoft Docs~ https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity **[[Entity Framework>Entity Framework Core]]前提の解除 [#eff7023d] 上級者は基本[[EF>Entity Framework Core]]キャンセル(RDB ⇔ NoSQL、LDAP切り替え等が必要な場合の考慮)。 -Writing an ASP.NET Core Identity Storage Provider from Scratch with RavenDB - Elemar JR~ http://www.elemarjr.com/en/2017/05/writing-an-asp-net-core-identity-storage-provider-from-scratch-with-ravendb/ ***Microsoft Docs [#ha371d82] -ASP.NET Core Identity 用のカスタム ストレージ プロバイダー~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/identity-custom-storage-providers -ASP.NET Core のコミュニティ OSS 認証オプション~ https://docs.microsoft.com/ja-jp/aspnet/core/security/authentication/community ***時が癒す [#h5322942] -Identity カテゴリーの記事一覧~ http://mrgchr.hatenablog.com/archive/category/Identity --ASP.NET Core MVC にて、Entity Frameworkを使わずにASP.NET Identityを利用する Part.0(準備編) --ASP.NET Core MVC にて、Entity Frameworkを使わずにASP.NET Identityを利用する Part.1 --ASP.NET Core MVC にて、Entity Frameworkを使わずにASP.NET Identityを利用する Part.2 ***ネスケラボ [#ab920ee7] -ASP.NET Core Identity をテンプレートからカスタマイズ~ https://blog.nextscape.net/archives/Date/2017/12/aspnetidentity1 -ASP.NET Core Identity をゼロから構築する~ https://blog.nextscape.net/archives/Date/2017/12/aspnetcoreidentity2 **マイグレーション(移行) [#f4b12d88] -ASP.NET Identity から ASP.NET Core Identity へ移行してみた - しばやん雑記~ https://blog.shibayan.jp/entry/20180710/1531150250 -Microsoft Docs --ASP.NET Core への認証と Id を移行します。~ https://docs.microsoft.com/ja-jp/aspnet/core/migration/identity --Migrate Authentication and Identity to ASP.NET Core~ https://docs.microsoft.com/en-us/aspnet/core/migration/identity **その他 [#t90ddfe1] ***present [#sc0a7312] -ASP.NET Core MVC で JWT を使った認証を実装する~ https://tnakamura.hatenablog.com/entry/2017/08/04/jwt-bearer-authentication -ASP.NET Core 2.0 で JWT を使った認証を実装する~ https://tnakamura.hatenablog.com/entry/2017/08/31/use-jwt-bearer-authentication-on-aspnetcore2 ***ONE-RUN [#icdd0988] -ユーザー認証機能の実装~ https://st40.xyz/one-run/article/333/ -UseInMemoryDatabaseを使う際の注意点~ https://st40.xyz/one-run/article/334/ -AuthorizeのRolesに複数のロールを設定する~ https://st40.xyz/one-run/article/526/ -パスワードのハッシュ化(PasswordHasher、Bcrypt)~ https://st40.xyz/one-run/article/527/ ---- Tags: [[:.NET開発]], [[:.NET Core]], [[:ASP.NET]], [[:ASP.NET MVC]], [[:ASP.NET SPA]], [[ASP.NET Web API]], [[:ASP.NET Identity]], [[:認証基盤]], [[:セキュリティ]]