Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add Identity.External claims sample

  • Loading branch information...
HaoK committed Jan 2, 2018
1 parent a0bbd02 commit 404105bd191f2e973d4befb668f1310d2fd82701
Showing with 26,803 additions and 3 deletions.
  1. +16 −1 AuthSamples.sln
  2. +53 −2 build/dependencies.props
  3. +33 −0 samples/Identity.ExternalClaims/Controllers/AccountController.cs
  4. +25 −0 samples/Identity.ExternalClaims/Data/ApplicationDbContext.cs
  5. +13 −0 samples/Identity.ExternalClaims/Data/ApplicationUser.cs
  6. +216 −0 samples/Identity.ExternalClaims/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs
  7. +219 −0 samples/Identity.ExternalClaims/Data/Migrations/00000000000000_CreateIdentitySchema.cs
  8. +215 −0 samples/Identity.ExternalClaims/Data/Migrations/ApplicationDbContextModelSnapshot.cs
  9. +24 −0 samples/Identity.ExternalClaims/Extensions/EmailSenderExtensions.cs
  10. +38 −0 samples/Identity.ExternalClaims/Extensions/UrlHelperExtensions.cs
  11. +32 −0 samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj
  12. +10 −0 samples/Identity.ExternalClaims/Pages/Account/AccessDenied.cshtml
  13. +16 −0 samples/Identity.ExternalClaims/Pages/Account/AccessDenied.cshtml.cs
  14. +12 −0 samples/Identity.ExternalClaims/Pages/Account/ConfirmEmail.cshtml
  15. +43 −0 samples/Identity.ExternalClaims/Pages/Account/ConfirmEmail.cshtml.cs
  16. +33 −0 samples/Identity.ExternalClaims/Pages/Account/ExternalLogin.cshtml
  17. +145 −0 samples/Identity.ExternalClaims/Pages/Account/ExternalLogin.cshtml.cs
  18. +26 −0 samples/Identity.ExternalClaims/Pages/Account/ForgotPassword.cshtml
  19. +56 −0 samples/Identity.ExternalClaims/Pages/Account/ForgotPassword.cshtml.cs
  20. +10 −0 samples/Identity.ExternalClaims/Pages/Account/ForgotPasswordConfirmation.cshtml
  21. +16 −0 samples/Identity.ExternalClaims/Pages/Account/ForgotPasswordConfirmation.cshtml.cs
  22. +10 −0 samples/Identity.ExternalClaims/Pages/Account/Lockout.cshtml
  23. +16 −0 samples/Identity.ExternalClaims/Pages/Account/Lockout.cshtml.cs
  24. +82 −0 samples/Identity.ExternalClaims/Pages/Account/Login.cshtml
  25. +99 −0 samples/Identity.ExternalClaims/Pages/Account/Login.cshtml.cs
  26. +41 −0 samples/Identity.ExternalClaims/Pages/Account/LoginWith2fa.cshtml
  27. +95 −0 samples/Identity.ExternalClaims/Pages/Account/LoginWith2fa.cshtml.cs
  28. +29 −0 samples/Identity.ExternalClaims/Pages/Account/LoginWithRecoveryCode.cshtml
  29. +88 −0 samples/Identity.ExternalClaims/Pages/Account/LoginWithRecoveryCode.cshtml.cs
  30. +35 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/ChangePassword.cshtml
  31. +102 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/ChangePassword.cshtml.cs
  32. +25 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/Disable2fa.cshtml
  33. +61 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/Disable2fa.cshtml.cs
  34. +53 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/EnableAuthenticator.cshtml
  35. +138 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/EnableAuthenticator.cshtml.cs
  36. +52 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/ExternalLogins.cshtml
  37. +108 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/ExternalLogins.cshtml.cs
  38. +25 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/GenerateRecoveryCodes.cshtml
  39. +49 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/GenerateRecoveryCodes.cshtml.cs
  40. +45 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/Index.cshtml
  41. +128 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/Index.cshtml.cs
  42. +34 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/ManageNavPages.cs
  43. +23 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/ResetAuthenticator.cshtml
  44. +51 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/ResetAuthenticator.cshtml.cs
  45. +35 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/SetPassword.cshtml
  46. +93 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/SetPassword.cshtml.cs
  47. +49 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/TwoFactorAuthentication.cshtml
  48. +53 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/TwoFactorAuthentication.cshtml.cs
  49. +23 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/_Layout.cshtml
  50. +15 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/_ManageNav.cshtml
  51. +10 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/_StatusMessage.cshtml
  52. +1 −0 samples/Identity.ExternalClaims/Pages/Account/Manage/_ViewImports.cshtml
  53. +37 −0 samples/Identity.ExternalClaims/Pages/Account/Register.cshtml
  54. +91 −0 samples/Identity.ExternalClaims/Pages/Account/Register.cshtml.cs
  55. +37 −0 samples/Identity.ExternalClaims/Pages/Account/ResetPassword.cshtml
  56. +87 −0 samples/Identity.ExternalClaims/Pages/Account/ResetPassword.cshtml.cs
  57. +10 −0 samples/Identity.ExternalClaims/Pages/Account/ResetPasswordConfirmation.cshtml
  58. +16 −0 samples/Identity.ExternalClaims/Pages/Account/ResetPasswordConfirmation.cshtml.cs
  59. +10 −0 samples/Identity.ExternalClaims/Pages/Account/SignedOut.cshtml
  60. +20 −0 samples/Identity.ExternalClaims/Pages/Account/SignedOut.cshtml.cs
  61. +1 −0 samples/Identity.ExternalClaims/Pages/Account/_ViewImports.cshtml
  62. +19 −0 samples/Identity.ExternalClaims/Pages/Contact.cshtml
  63. +18 −0 samples/Identity.ExternalClaims/Pages/Contact.cshtml.cs
  64. +23 −0 samples/Identity.ExternalClaims/Pages/Error.cshtml
  65. +21 −0 samples/Identity.ExternalClaims/Pages/Error.cshtml.cs
  66. +108 −0 samples/Identity.ExternalClaims/Pages/Index.cshtml
  67. +17 −0 samples/Identity.ExternalClaims/Pages/Index.cshtml.cs
  68. +26 −0 samples/Identity.ExternalClaims/Pages/MyClaims.cshtml
  69. +18 −0 samples/Identity.ExternalClaims/Pages/MyClaims.cshtml.cs
  70. +72 −0 samples/Identity.ExternalClaims/Pages/_Layout.cshtml
  71. +25 −0 samples/Identity.ExternalClaims/Pages/_LoginPartial.cshtml
  72. +18 −0 samples/Identity.ExternalClaims/Pages/_ValidationScriptsPartial.cshtml
  73. +5 −0 samples/Identity.ExternalClaims/Pages/_ViewImports.cshtml
  74. +3 −0 samples/Identity.ExternalClaims/Pages/_ViewStart.cshtml
  75. +25 −0 samples/Identity.ExternalClaims/Program.cs
  76. +17 −0 samples/Identity.ExternalClaims/README.md
  77. +17 −0 samples/Identity.ExternalClaims/Services/EmailSender.cs
  78. +12 −0 samples/Identity.ExternalClaims/Services/IEmailSender.cs
  79. +93 −0 samples/Identity.ExternalClaims/Startup.cs
  80. +10 −0 samples/Identity.ExternalClaims/appsettings.Development.json
  81. +11 −0 samples/Identity.ExternalClaims/appsettings.json
  82. +24 −0 samples/Identity.ExternalClaims/bundleconfig.json
  83. +35 −0 samples/Identity.ExternalClaims/wwwroot/css/site.css
  84. +1 −0 samples/Identity.ExternalClaims/wwwroot/css/site.min.css
  85. BIN samples/Identity.ExternalClaims/wwwroot/favicon.ico
  86. +1 −0 samples/Identity.ExternalClaims/wwwroot/images/banner1.svg
  87. +1 −0 samples/Identity.ExternalClaims/wwwroot/images/banner2.svg
  88. +1 −0 samples/Identity.ExternalClaims/wwwroot/images/banner3.svg
  89. +1 −0 samples/Identity.ExternalClaims/wwwroot/images/banner4.svg
  90. +1 −0 samples/Identity.ExternalClaims/wwwroot/js/site.js
  91. 0 samples/Identity.ExternalClaims/wwwroot/js/site.min.js
  92. +45 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/.bower.json
  93. +21 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/LICENSE
  94. +587 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css
  95. +1 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map
  96. +1 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map
  97. +6,757 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/css/bootstrap.css
  98. +1 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
  99. +1 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
  100. BIN samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot
  101. +288 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg
  102. BIN samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf
  103. BIN samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff
  104. BIN samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2
  105. +2,377 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/js/bootstrap.js
  106. +13 −0 samples/Identity.ExternalClaims/wwwroot/lib/bootstrap/dist/js/npm.js
  107. +44 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation-unobtrusive/.bower.json
  108. +416 −0 .../Identity.ExternalClaims/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
  109. +5 −0 ...ntity.ExternalClaims/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
  110. +40 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json
  111. +22 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/LICENSE.md
  112. +998 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js
  113. +1,398 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js
  114. +25 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery/.bower.json
  115. +36 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery/LICENSE.txt
  116. +9,831 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery/dist/jquery.js
  117. +1 −0 samples/Identity.ExternalClaims/wwwroot/lib/jquery/dist/jquery.min.map
  118. +1 −0 test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj
  119. +43 −0 test/AuthSamples.FunctionalTests/IdentityExternalClaimsTests.cs
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26823.1
VisualStudioVersion = 15.0.27130.2003
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{CA4538F5-9DA8-4139-B891-A13279889F79}"
EndProject
@@ -20,6 +20,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthSamples.FunctionalTests
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VirtualSchemes.PathSchemeSelection", "samples\VirtualSchemes.PathSchemeSelection\VirtualSchemes.PathSchemeSelection.csproj", "{4E91BD2A-616F-45EE-9647-2F1608D17FB9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Identity.ExternalClaims", "samples\Identity.ExternalClaims\Identity.ExternalClaims.csproj", "{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -70,6 +72,18 @@ Global
{4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|x64.Build.0 = Release|Any CPU
{4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|x86.ActiveCfg = Release|Any CPU
{4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|x86.Build.0 = Release|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x64.ActiveCfg = Debug|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x64.Build.0 = Debug|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x86.ActiveCfg = Debug|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x86.Build.0 = Debug|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|Any CPU.Build.0 = Release|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x64.ActiveCfg = Release|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x64.Build.0 = Release|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x86.ActiveCfg = Release|Any CPU
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -79,6 +93,7 @@ Global
{526BE3AE-3DD3-4AB6-BC81-AC34ED735482} = {CA4538F5-9DA8-4139-B891-A13279889F79}
{B5C26BE6-655E-4D7F-B756-F286750EF172} = {15E42EAC-5CBB-49EC-91FB-53743882CF2B}
{4E91BD2A-616F-45EE-9647-2F1608D17FB9} = {CA4538F5-9DA8-4139-B891-A13279889F79}
{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28} = {CA4538F5-9DA8-4139-B891-A13279889F79}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {39E3AF62-B1FD-4156-92AA-F4FA99B5AD89}
@@ -5,17 +5,68 @@
<PropertyGroup Label="Package Versions">
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15651</InternalAspNetCoreSdkPackageVersion>
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
<MicrosoftAspNetCoreAuthenticationFacebookPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreAuthenticationFacebookPackageVersion>
<MicrosoftAspNetCoreAuthenticationGooglePackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreAuthenticationGooglePackageVersion>
<MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>
<MicrosoftAspNetCoreAuthenticationTwitterPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreAuthenticationTwitterPackageVersion>
<MicrosoftAspNetCoreAuthorizationPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreAuthorizationPackageVersion>
<MicrosoftAspNetCoreCertificatesConfigurationSourcesPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreCertificatesConfigurationSourcesPackageVersion>
<MicrosoftAspNetCoreCryptographyKeyDerivationPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreCryptographyKeyDerivationPackageVersion>
<MicrosoftAspNetCoreDataProtectionExtensionsPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreDataProtectionExtensionsPackageVersion>
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
<MicrosoftAspNetCoreDiagnosticsPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreDiagnosticsPackageVersion>
<MicrosoftAspNetCoreHostingAbstractionsPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreHostingAbstractionsPackageVersion>
<MicrosoftAspNetCoreHostingPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreHostingPackageVersion>
<MicrosoftAspNetCoreHttpAbstractionsPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreHttpAbstractionsPackageVersion>
<MicrosoftAspNetCoreHttpPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreHttpPackageVersion>
<MicrosoftAspNetCoreIdentityPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreIdentityPackageVersion>
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
<MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreMvcPackageVersion>
<MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>
<MicrosoftAspNetCoreMvcTestingPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreMvcTestingPackageVersion>
<MicrosoftAspNetCorePackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCorePackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.5.0-preview1-27942</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
<MicrosoftAspNetCorePackageVersion>2.1.0-preview1-27849</MicrosoftAspNetCorePackageVersion>
<MicrosoftAspNetCoreRewritePackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreRewritePackageVersion>
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.5.0-preview1-27849</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
<MicrosoftAspNetCoreServerKestrelHttpsPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreServerKestrelHttpsPackageVersion>
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreServerKestrelPackageVersion>
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreStaticFilesPackageVersion>
<MicrosoftAspNetCoreTestHostPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreTestHostPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-27942</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftAspNetIdentityEntityFrameworkPackageVersion>2.2.1</MicrosoftAspNetIdentityEntityFrameworkPackageVersion>
<MicrosoftAzureKeyVaultPackageVersion>2.3.2</MicrosoftAzureKeyVaultPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>2.1.0-preview1-27942</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>2.1.0-preview1-27942</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>2.1.0-preview1-27942</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>2.1.0-preview1-27942</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsRazorViewsSourcesPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsRazorViewsSourcesPackageVersion>
<MicrosoftExtensionsSecurityHelperSourcesPackageVersion>2.1.0-preview1-27942</MicrosoftExtensionsSecurityHelperSourcesPackageVersion>
<MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>3.14.1</MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>
<MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>5.2.0-preview2-41113220915</MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
<MicrosoftNETCoreApp21PackageVersion>2.1.0-preview1-26016-05</MicrosoftNETCoreApp21PackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
<MicrosoftOwinSecurityCookiesPackageVersion>3.0.1</MicrosoftOwinSecurityCookiesPackageVersion>
<MicrosoftOwinSecurityInteropPackageVersion>2.1.0-preview1-27942</MicrosoftOwinSecurityInteropPackageVersion>
<MoqPackageVersion>4.7.49</MoqPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>4.5.0-preview1-26016-05</SystemComponentModelAnnotationsPackageVersion>
<XunitAnalyzersPackageVersion>0.8.0</XunitAnalyzersPackageVersion>
<XunitPackageVersion>2.3.1</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.3.1</XunitRunnerVisualStudioPackageVersion>
</PropertyGroup>
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Identity.ExternalClaims.Data;

namespace Identity.ExternalClaims.Controllers
{
[Route("[controller]/[action]")]
public class AccountController : Controller
{
private readonly SignInManager<ApplicationUser> _signInManager;
private readonly ILogger _logger;

public AccountController(SignInManager<ApplicationUser> signInManager, ILogger<AccountController> logger)
{
_signInManager = signInManager;
_logger = logger;
}

[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Logout()
{
await _signInManager.SignOutAsync();
_logger.LogInformation("User logged out.");
return RedirectToPage("/Index");
}
}
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;

namespace Identity.ExternalClaims.Data
{
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}

protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
// Customize the ASP.NET Identity model and override the defaults if needed.
// For example, you can rename the ASP.NET Identity table names and more.
// Add your customizations after calling base.OnModelCreating(builder);
}
}
}
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;

namespace Identity.ExternalClaims.Data
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser
{
}
}

0 comments on commit 404105b

Please sign in to comment.
You can’t perform that action at this time.