diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props
index 1830293e0d..9bdbb3ec7b 100644
--- a/eng/ProjectReferences.props
+++ b/eng/ProjectReferences.props
@@ -5,6 +5,7 @@
-->
+
@@ -44,7 +45,6 @@
-
diff --git a/eng/Versions.props b/eng/Versions.props
index 71b66d08a9..648fe409f8 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -222,11 +222,11 @@
4.2.1
3.8.0
0.1.22-pre3
- 3.0.0-preview3.4
- 3.0.0-preview3.4
- 3.0.0-preview3.4
- 3.0.0-preview3.4
- 3.0.0-preview3.4
+ 3.0.0-preview7.33
+ 3.0.0-preview7.33
+ 3.0.0-preview7.33
+ 3.0.0-preview7.33
+ 3.0.0-preview7.33
1.7.3.7
4.10.0
0.10.1
diff --git a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj b/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj
deleted file mode 100644
index ee37205aff..0000000000
--- a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- netcoreapp3.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.netcoreapp3.0.cs b/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.netcoreapp3.0.cs
deleted file mode 100644
index 63439f559a..0000000000
--- a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.netcoreapp3.0.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
-{
- public partial class ApiAuthorizationDbContext : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext, System.IDisposable where TUser : Microsoft.AspNetCore.Identity.IdentityUser
- {
- public ApiAuthorizationDbContext(Microsoft.EntityFrameworkCore.DbContextOptions options, Microsoft.Extensions.Options.IOptions operationalStoreOptions) { }
- public Microsoft.EntityFrameworkCore.DbSet DeviceFlowCodes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public Microsoft.EntityFrameworkCore.DbSet PersistedGrants { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- System.Threading.Tasks.Task IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext.SaveChangesAsync() { throw null; }
- protected override void OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder builder) { }
- }
- public partial class ApiAuthorizationOptions
- {
- public ApiAuthorizationOptions() { }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection ApiResources { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection Clients { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection IdentityResources { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public Microsoft.IdentityModel.Tokens.SigningCredentials SigningCredential { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- }
- public partial class ApiResourceBuilder
- {
- public ApiResourceBuilder() { }
- public ApiResourceBuilder(IdentityServer4.Models.ApiResource resource) { }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder AllowAllClients() { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder ApiResource(string name) { throw null; }
- public IdentityServer4.Models.ApiResource Build() { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder IdentityServerJwt(string name) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder ReplaceScopes(params string[] resourceScopes) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder WithApplicationProfile(string profile) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder WithScopes(params string[] resourceScopes) { throw null; }
- }
- public partial class ApiResourceCollection : System.Collections.ObjectModel.Collection
- {
- public ApiResourceCollection() { }
- public ApiResourceCollection(System.Collections.Generic.IList list) { }
- public IdentityServer4.Models.ApiResource this[string key] { get { throw null; } }
- public void AddApiResource(string name, System.Action configure) { }
- public void AddIdentityServerJwt(string name, System.Action configure) { }
- public void AddRange(params IdentityServer4.Models.ApiResource[] resources) { }
- }
- public static partial class ApplicationProfiles
- {
- public const string API = "API";
- public const string IdentityServerJwt = "IdentityServerJwt";
- public const string IdentityServerSPA = "IdentityServerSPA";
- public const string NativeApp = "NativeApp";
- public const string SPA = "SPA";
- }
- public static partial class ApplicationProfilesPropertyNames
- {
- public const string Clients = "Clients";
- public const string Profile = "Profile";
- public const string Source = "Source";
- }
- public static partial class ApplicationProfilesPropertyValues
- {
- public const string AllowAllApplications = "*";
- public const string Configuration = "Configuration";
- public const string Default = "Default";
- }
- public partial class ClientBuilder
- {
- public ClientBuilder() { }
- public ClientBuilder(IdentityServer4.Models.Client client) { }
- public IdentityServer4.Models.Client Build() { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder IdentityServerSPA(string clientId) { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder NativeApp(string clientId) { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder SPA(string clientId) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithApplicationProfile(string profile) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithClientId(string clientId) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithLogoutRedirectUri(string logoutUri) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithoutClientSecrets() { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithRedirectUri(string redirectUri) { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithScopes(params string[] scopes) { throw null; }
- }
- public partial class ClientCollection : System.Collections.ObjectModel.Collection
- {
- public ClientCollection() { }
- public ClientCollection(System.Collections.Generic.IList list) { }
- public IdentityServer4.Models.Client this[string key] { get { throw null; } }
- public void AddIdentityServerSPA(string clientId, System.Action configure) { }
- public void AddNativeApp(string clientId, System.Action configure) { }
- public void AddRange(params IdentityServer4.Models.Client[] clients) { }
- public void AddSPA(string clientId, System.Action configure) { }
- }
- [Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute("*", Attributes="[asp-apiauth-parameters]")]
- public partial class ClientParametersTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
- {
- public ClientParametersTagHelper(Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IClientRequestParametersProvider clientRequestParametersProvider) { }
- [Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute("asp-apiauth-parameters")]
- public string ClientId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- [Microsoft.AspNetCore.Mvc.ViewFeatures.ViewContextAttribute]
- public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) { }
- }
- public partial interface IClientRequestParametersProvider
- {
- System.Collections.Generic.IDictionary GetClientParameters(Microsoft.AspNetCore.Http.HttpContext context, string clientId);
- }
- public partial class IdentityResourceBuilder
- {
- public IdentityResourceBuilder() { }
- public IdentityResourceBuilder(IdentityServer4.Models.IdentityResource resource) { }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Address() { throw null; }
- public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder AllowAllClients() { throw null; }
- public IdentityServer4.Models.IdentityResource Build() { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Email() { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder OpenId() { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Phone() { throw null; }
- public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Profile() { throw null; }
- }
- public partial class IdentityResourceCollection : System.Collections.ObjectModel.Collection
- {
- public IdentityResourceCollection() { }
- public IdentityResourceCollection(System.Collections.Generic.IList list) { }
- public IdentityServer4.Models.IdentityResource this[string key] { get { throw null; } }
- public void AddAddress() { }
- public void AddAddress(System.Action configure) { }
- public void AddEmail() { }
- public void AddEmail(System.Action configure) { }
- public void AddOpenId() { }
- public void AddOpenId(System.Action configure) { }
- public void AddPhone() { }
- public void AddPhone(System.Action configure) { }
- public void AddProfile() { }
- public void AddProfile(System.Action configure) { }
- public void AddRange(params IdentityServer4.Models.IdentityResource[] identityResources) { }
- }
- public partial class IdentityServerJwtConstants
- {
- public const string IdentityServerJwtBearerScheme = "IdentityServerJwtBearer";
- public const string IdentityServerJwtScheme = "IdentityServerJwt";
- public IdentityServerJwtConstants() { }
- }
-}
-namespace Microsoft.AspNetCore.Authentication
-{
- public static partial class AuthenticationBuilderExtensions
- {
- public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddIdentityServerJwt(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) { throw null; }
- }
-}
-namespace Microsoft.Extensions.DependencyInjection
-{
- public static partial class IdentityServerBuilderConfigurationExtensions
- {
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, System.Action configure) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddClients(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddClients(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddIdentityResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddIdentityResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddSigningCredentials(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; }
- public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddSigningCredentials(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; }
- }
-}
diff --git a/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj b/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj
index df96819c67..c9883821b4 100644
--- a/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj
+++ b/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj
@@ -3,9 +3,14 @@
netcoreapp3.0
aspnet-ApiAuthSample-12ED8ECC-9EF1-4D31-87B4-1405B3198E5E
+
+ false
+
+
diff --git a/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj b/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj
index b6489a710a..7c09a6e368 100644
--- a/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj
+++ b/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj
@@ -5,19 +5,29 @@
ASP.NET Core API Authorization package powered by Identity Server.
true
aspnetcore;apiauth;identity
+ false
true
+ false
+
+ false
+
+
-
+
+
+
+
diff --git a/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj b/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj
index 27c97dc746..e2030d5620 100644
--- a/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj
+++ b/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj
@@ -2,9 +2,15 @@
netcoreapp3.0
+
+ false
+
+
+
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in
index bd29440fcf..09d68a25ee 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in
@@ -20,6 +20,7 @@
+
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj
index 27759899a0..28df34bc4f 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj
@@ -12,6 +12,7 @@
MicrosoftEntityFrameworkCoreSqlitePackageVersion=$(MicrosoftEntityFrameworkCoreSqlitePackageVersion);
+ MicrosoftEntityFrameworkCoreRelationalPackageVersion=$(MicrosoftEntityFrameworkCoreRelationalPackageVersion);
MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion);
MicrosoftEntityFrameworkCoreToolsPackageVersion=$(MicrosoftEntityFrameworkCoreToolsPackageVersion);
MicrosoftExtensionsHostingPackageVersion=$(MicrosoftExtensionsHostingPackageVersion);
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in b/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in
index dc4897f498..8e4a8b80e4 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in
@@ -17,6 +17,7 @@
+
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json
index 80523dc4fd..1318c47924 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json
@@ -1701,8 +1701,7 @@
"base64-js": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
- "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
- "dev": true
+ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="
},
"base64id": {
"version": "1.0.0",
@@ -2747,6 +2746,11 @@
"randomfill": "^1.0.3"
}
},
+ "crypto-js": {
+ "version": "3.1.9-1",
+ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz",
+ "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg="
+ },
"css-parse": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz",
@@ -7153,10 +7157,13 @@
"dev": true
},
"oidc-client": {
- "version": "1.9.0-beta.3",
- "resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.9.0-beta.3.tgz",
- "integrity": "sha512-8JqmesN7n7sQrdeEYiuWyWjNp/6cZGOHU5IaYrULm/qdYo6cAheeZl93bDkob6MdfbQMsQ2HGG/+EOHFdFQcSQ==",
+ "version": "1.9.0-beta.4",
+ "resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.9.0-beta.4.tgz",
+ "integrity": "sha512-BE6o220w9kDTicmsX324Z5t3Gg20G9NgQjCOFP6SUY7glJYBohyw9DVPt/khPmmg+wabufJq1tH2zyEadMf7Pw==",
"requires": {
+ "base64-js": "^1.3.0",
+ "core-js": "^2.6.4",
+ "crypto-js": "^3.1.9-1",
"uuid": "^3.3.2"
}
},
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json
index c249e23305..c30b740221 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json
@@ -26,7 +26,7 @@
"bootstrap": "^4.3.1",
"core-js": "^2.6.5",
"jquery": "3.4.1",
- "oidc-client": "^1.9.0-beta.1",
+ "oidc-client": "^1.9.0-beta.4",
"popper.js": "^1.14.3",
"rxjs": "^6.4.0",
"zone.js": "~0.9.1"
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts
index 7c46a3e27b..ce9e28bfa3 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts
@@ -21,7 +21,6 @@ export interface FailureAuthenticationResult {
export interface RedirectAuthenticationResult {
status: AuthenticationResultStatus.Redirect;
- redirectUrl: string;
}
export enum AuthenticationResultStatus {
@@ -34,18 +33,6 @@ export interface IUser {
name: string;
}
-// Private interfaces
-enum LoginMode {
- Silent,
- PopUp,
- Redirect
-}
-
-interface IAuthenticationState {
- mode: LoginMode;
- userState?: any;
-}
-
@Injectable({
providedIn: 'root'
})
@@ -86,7 +73,7 @@ export class AuthorizeService {
await this.ensureUserManagerInitialized();
let user: User = null;
try {
- user = await this.userManager.signinSilent(this.createArguments(LoginMode.Silent));
+ user = await this.userManager.signinSilent(this.createArguments());
this.userSubject.next(user.profile);
return this.success(state);
} catch (silentError) {
@@ -97,7 +84,7 @@ export class AuthorizeService {
if (this.popUpDisabled) {
throw new Error('Popup disabled. Change \'authorize.service.ts:AuthorizeService.popupDisabled\' to false to enable it.');
}
- user = await this.userManager.signinPopup(this.createArguments(LoginMode.PopUp));
+ user = await this.userManager.signinPopup(this.createArguments());
this.userSubject.next(user.profile);
return this.success(state);
} catch (popupError) {
@@ -110,9 +97,8 @@ export class AuthorizeService {
// PopUps might be blocked by the user, fallback to redirect
try {
- const signInRequest = await this.userManager.createSigninRequest(
- this.createArguments(LoginMode.Redirect, state));
- return this.redirect(signInRequest.url);
+ await this.userManager.signinRedirect(this.createArguments(state));
+ return this.redirect();
} catch (redirectError) {
console.log('Redirect authentication error: ', redirectError);
return this.error(redirectError);
@@ -121,56 +107,29 @@ export class AuthorizeService {
}
}
- // We are receiving a callback from the IdP. This code can be running in 3 situations:
- // 1) As a hidden iframe started by a silent login on signIn (above). The code in the main
- // browser window will close the iframe after returning from signInSilent.
- // 2) As a PopUp window started by a pop-up login on signIn (above). The code in the main
- // browser window will close the pop-up window after returning from signInPopUp
- // 3) On the main browser window when the IdP redirects back to the app. We will process
- // the response and redirect to the return url or display an error message.
public async completeSignIn(url: string): Promise {
- await this.ensureUserManagerInitialized();
try {
- const { state } = await (this.userManager as any).readSigninResponseState(url, this.userManager.settings.stateStore);
- if (state.request_type === 'si:r' || !state.request_type) {
- const user = await this.userManager.signinRedirectCallback(url);
- this.userSubject.next(user.profile);
- return this.success(state.data.userState);
-
- }
- if (state.request_type === 'si:p') {
- await this.userManager.signinPopupCallback(url);
- return this.success(undefined);
- }
- if (state.request_type === 'si:s') {
- await this.userManager.signinSilentCallback(url);
- return this.success(undefined);
- }
-
- throw new Error(`Invalid login mode '${state.request_type}'.`);
- } catch (signInResponseError) {
- console.log('There was an error signing in', signInResponseError);
- return this.error('Sing in callback authentication error.');
+ await this.ensureUserManagerInitialized();
+ const user = await this.userManager.signinCallback(url);
+ this.userSubject.next(user && user.profile);
+ return this.success(user && user.state);
+ } catch (error) {
+ console.log('There was an error signing in: ', error);
+ return this.error('There was an error signing in.');
}
}
- // We try to sign out the user in two different ways:
- // 1) We try to do a sign-out using a PopUp Window. This might fail if there is a
- // Pop-Up blocker or the user has disabled PopUps.
- // 2) If the method above fails, we redirect the browser to the IdP to perform a traditional
- // post logout redirect flow.
public async signOut(state: any): Promise {
- await this.ensureUserManagerInitialized();
try {
- await this.userManager.signoutPopup(this.createArguments(LoginMode.PopUp));
+ await this.ensureUserManagerInitialized();
+ await this.userManager.signoutPopup(this.createArguments());
this.userSubject.next(null);
return this.success(state);
} catch (popupSignOutError) {
console.log('Popup signout error: ', popupSignOutError);
try {
- const signInRequest = await this.userManager.createSignoutRequest(
- this.createArguments(LoginMode.Redirect, state));
- return this.redirect(signInRequest.url);
+ await this.userManager.signoutRedirect(this.createArguments(state));
+ return this.redirect();
} catch (redirectSignOutError) {
console.log('Redirect signout error: ', popupSignOutError);
return this.error(redirectSignOutError);
@@ -178,39 +137,20 @@ export class AuthorizeService {
}
}
- // We are receiving a callback from the IdP. This code can be running in 2 situations:
- // 1) As a PopUp window started by a pop-up login on signOut (above). The code in the main
- // browser window will close the pop-up window after returning from signOutPopUp
- // 2) On the main browser window when the IdP redirects back to the app. We will process
- // the response and redirect to the logged-out url or display an error message.
public async completeSignOut(url: string): Promise {
await this.ensureUserManagerInitialized();
try {
- const { state } = await (this.userManager as any).readSignoutResponseState(url, this.userManager.settings.stateStore);
- if (state) {
- if (state.request_type === 'so:r') {
- await this.userManager.signoutRedirectCallback(url);
- this.userSubject.next(null);
- return this.success(state.data.userState);
- }
- if (state.request_type === 'so:p') {
- await this.userManager.signoutPopupCallback(url);
- return this.success(state.data && state.data.userState);
- }
- throw new Error(`Invalid login mode '${state.request_type}'.`);
- }
- } catch (signInResponseError) {
- console.log('There was an error signing out', signInResponseError);
- return this.error('Sign out callback authentication error.');
+ const state = await this.userManager.signoutCallback(url);
+ this.userSubject.next(null);
+ return this.success(state && state.data);
+ } catch (error) {
+ console.log(`There was an error trying to log out '${error}'.`);
+ return this.error(error);
}
}
- private createArguments(mode: LoginMode, state?: any): any {
- if (mode !== LoginMode.Silent) {
- return { data: { mode, userState: state } };
- } else {
- return { data: { mode, userState: state }, redirect_uri: this.userManager.settings.redirect_uri };
- }
+ private createArguments(state?: any): any {
+ return { useReplaceToNavigate: true, data: state };
}
private error(message: string): IAuthenticationResult {
@@ -221,8 +161,8 @@ export class AuthorizeService {
return { status: AuthenticationResultStatus.Success, state };
}
- private redirect(redirectUrl: string): IAuthenticationResult {
- return { status: AuthenticationResultStatus.Redirect, redirectUrl };
+ private redirect(): IAuthenticationResult {
+ return { status: AuthenticationResultStatus.Redirect };
}
private async ensureUserManagerInitialized(): Promise {
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts
index b48738b645..f90d0df380 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts
@@ -52,10 +52,6 @@ export class LoginComponent implements OnInit {
this.message.next(undefined);
switch (result.status) {
case AuthenticationResultStatus.Redirect:
- // We replace the location here so that in case the user hits the back
- // arrow from within the login page they don't get into an infinite
- // redirect loop.
- window.location.replace(result.redirectUrl);
break;
case AuthenticationResultStatus.Success:
await this.navigateToReturnUrl(returnUrl);
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts
index d9402f007e..78969d39bf 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts
@@ -53,9 +53,6 @@ export class LogoutComponent implements OnInit {
const result = await this.authorizeService.signOut(state);
switch (result.status) {
case AuthenticationResultStatus.Redirect:
- // We replace the location here so that in case the user hits the back
- // arrow from within the IdP they don't get into an infinite redirect loop.
- window.location.replace(result.redirectUrl);
break;
case AuthenticationResultStatus.Success:
await this.navigateToReturnUrl(returnUrl);
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs
index 8901c5fea8..d79b0e6698 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs
@@ -10,52 +10,67 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Company.WebApplication1.Data.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
- [Migration("00000000000000_CreateIdentitySchema")]
+ [Migration("20190808120446_CreateIdentitySchema")]
partial class CreateIdentitySchema
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3")
+ .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
{
- b.Property("Id");
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
- b.Property("AccessFailedCount");
+ b.Property("AccessFailedCount")
+ .HasColumnType("int");
b.Property("ConcurrencyStamp")
- .IsConcurrencyToken();
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
b.Property("Email")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
- b.Property("EmailConfirmed");
+ b.Property("EmailConfirmed")
+ .HasColumnType("bit");
- b.Property("LockoutEnabled");
+ b.Property("LockoutEnabled")
+ .HasColumnType("bit");
- b.Property("LockoutEnd");
+ b.Property("LockoutEnd")
+ .HasColumnType("datetimeoffset");
b.Property("NormalizedEmail")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("NormalizedUserName")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
- b.Property("PasswordHash");
+ b.Property("PasswordHash")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumber");
+ b.Property("PhoneNumber")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumberConfirmed");
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("bit");
- b.Property("SecurityStamp");
+ b.Property("SecurityStamp")
+ .HasColumnType("nvarchar(max)");
- b.Property("TwoFactorEnabled");
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("bit");
b.Property("UserName")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
@@ -74,26 +89,33 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
{
b.Property("UserCode")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
- b.Property("CreationTime");
+ b.Property("CreationTime")
+ .HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
+ .HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property("DeviceCode")
.IsRequired()
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("Expiration")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("datetime2");
b.Property("SubjectId")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("UserCode");
@@ -101,51 +123,64 @@ namespace Company.WebApplication1.Data.Migrations
b.HasIndex("DeviceCode")
.IsUnique();
+ b.HasIndex("Expiration");
+
b.ToTable("DeviceCodes");
});
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
{
b.Property("Key")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
- b.Property("CreationTime");
+ b.Property("CreationTime")
+ .HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
+ .HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
- b.Property("Expiration");
+ b.Property("Expiration")
+ .HasColumnType("datetime2");
b.Property("SubjectId")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("Type")
.IsRequired()
+ .HasColumnType("nvarchar(50)")
.HasMaxLength(50);
b.HasKey("Key");
- b.HasIndex("SubjectId", "ClientId", "Type");
+ b.HasIndex("SubjectId", "ClientId", "Type", "Expiration");
b.ToTable("PersistedGrants");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
- b.Property("Id");
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
b.Property("ConcurrencyStamp")
- .IsConcurrencyToken();
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
b.Property("Name")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("NormalizedName")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
@@ -162,14 +197,18 @@ namespace Company.WebApplication1.Data.Migrations
{
b.Property("Id")
.ValueGeneratedOnAdd()
+ .HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
- b.Property("ClaimType");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
b.Property("RoleId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
b.HasKey("Id");
@@ -182,14 +221,18 @@ namespace Company.WebApplication1.Data.Migrations
{
b.Property("Id")
.ValueGeneratedOnAdd()
+ .HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
- b.Property("ClaimType");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
b.Property("UserId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
b.HasKey("Id");
@@ -201,15 +244,19 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
{
b.Property("LoginProvider")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property("ProviderKey")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
- b.Property("ProviderDisplayName");
+ b.Property("ProviderDisplayName")
+ .HasColumnType("nvarchar(max)");
b.Property("UserId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
b.HasKey("LoginProvider", "ProviderKey");
@@ -220,9 +267,11 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
{
- b.Property("UserId");
+ b.Property("UserId")
+ .HasColumnType("nvarchar(450)");
- b.Property("RoleId");
+ b.Property("RoleId")
+ .HasColumnType("nvarchar(450)");
b.HasKey("UserId", "RoleId");
@@ -233,15 +282,19 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
{
- b.Property("UserId");
+ b.Property("UserId")
+ .HasColumnType("nvarchar(450)");
b.Property("LoginProvider")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property("Name")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
- b.Property("Value");
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs
index b297cf37fb..151e8b2206 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs
@@ -1,5 +1,4 @@
using System;
-using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Company.WebApplication1.Data.Migrations
@@ -86,7 +85,7 @@ namespace Company.WebApplication1.Data.Migrations
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
+ .Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column(nullable: false),
ClaimType = table.Column(nullable: true),
ClaimValue = table.Column(nullable: true)
@@ -107,7 +106,7 @@ namespace Company.WebApplication1.Data.Migrations
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
+ .Annotation("SqlServer:Identity", "1, 1"),
UserId = table.Column(nullable: false),
ClaimType = table.Column(nullable: true),
ClaimValue = table.Column(nullable: true)
@@ -233,9 +232,14 @@ namespace Company.WebApplication1.Data.Migrations
unique: true);
migrationBuilder.CreateIndex(
- name: "IX_PersistedGrants_SubjectId_ClientId_Type",
+ name: "IX_DeviceCodes_Expiration",
+ table: "DeviceCodes",
+ column: "Expiration");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration",
table: "PersistedGrants",
- columns: new[] { "SubjectId", "ClientId", "Type" });
+ columns: new[] { "SubjectId", "ClientId", "Type", "Expiration" });
}
protected override void Down(MigrationBuilder migrationBuilder)
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs
index 40ca333c0c..6f19b5d805 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs
@@ -15,45 +15,60 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3")
+ .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
{
- b.Property("Id");
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
- b.Property("AccessFailedCount");
+ b.Property("AccessFailedCount")
+ .HasColumnType("int");
b.Property("ConcurrencyStamp")
- .IsConcurrencyToken();
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
b.Property("Email")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
- b.Property("EmailConfirmed");
+ b.Property("EmailConfirmed")
+ .HasColumnType("bit");
- b.Property("LockoutEnabled");
+ b.Property("LockoutEnabled")
+ .HasColumnType("bit");
- b.Property("LockoutEnd");
+ b.Property("LockoutEnd")
+ .HasColumnType("datetimeoffset");
b.Property("NormalizedEmail")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("NormalizedUserName")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
- b.Property("PasswordHash");
+ b.Property("PasswordHash")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumber");
+ b.Property("PhoneNumber")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumberConfirmed");
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("bit");
- b.Property("SecurityStamp");
+ b.Property("SecurityStamp")
+ .HasColumnType("nvarchar(max)");
- b.Property("TwoFactorEnabled");
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("bit");
b.Property("UserName")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
@@ -72,26 +87,33 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
{
b.Property("UserCode")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
- b.Property("CreationTime");
+ b.Property("CreationTime")
+ .HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
+ .HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property("DeviceCode")
.IsRequired()
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("Expiration")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("datetime2");
b.Property("SubjectId")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("UserCode");
@@ -99,51 +121,64 @@ namespace Company.WebApplication1.Data.Migrations
b.HasIndex("DeviceCode")
.IsUnique();
+ b.HasIndex("Expiration");
+
b.ToTable("DeviceCodes");
});
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
{
b.Property("Key")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
- b.Property("CreationTime");
+ b.Property("CreationTime")
+ .HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
+ .HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
- b.Property("Expiration");
+ b.Property("Expiration")
+ .HasColumnType("datetime2");
b.Property("SubjectId")
+ .HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property("Type")
.IsRequired()
+ .HasColumnType("nvarchar(50)")
.HasMaxLength(50);
b.HasKey("Key");
- b.HasIndex("SubjectId", "ClientId", "Type");
+ b.HasIndex("SubjectId", "ClientId", "Type", "Expiration");
b.ToTable("PersistedGrants");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
- b.Property("Id");
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
b.Property("ConcurrencyStamp")
- .IsConcurrencyToken();
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
b.Property("Name")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("NormalizedName")
+ .HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
@@ -160,14 +195,18 @@ namespace Company.WebApplication1.Data.Migrations
{
b.Property("Id")
.ValueGeneratedOnAdd()
+ .HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
- b.Property("ClaimType");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
b.Property("RoleId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
b.HasKey("Id");
@@ -180,14 +219,18 @@ namespace Company.WebApplication1.Data.Migrations
{
b.Property("Id")
.ValueGeneratedOnAdd()
+ .HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
- b.Property("ClaimType");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
b.Property("UserId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
b.HasKey("Id");
@@ -199,15 +242,19 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
{
b.Property("LoginProvider")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property("ProviderKey")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
- b.Property("ProviderDisplayName");
+ b.Property("ProviderDisplayName")
+ .HasColumnType("nvarchar(max)");
b.Property("UserId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
b.HasKey("LoginProvider", "ProviderKey");
@@ -218,9 +265,11 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
{
- b.Property("UserId");
+ b.Property("UserId")
+ .HasColumnType("nvarchar(450)");
- b.Property("RoleId");
+ b.Property("RoleId")
+ .HasColumnType("nvarchar(450)");
b.HasKey("UserId", "RoleId");
@@ -231,15 +280,19 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
{
- b.Property("UserId");
+ b.Property("UserId")
+ .HasColumnType("nvarchar(450)");
b.Property("LoginProvider")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property("Name")
+ .HasColumnType("nvarchar(128)")
.HasMaxLength(128);
- b.Property("Value");
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs
index fb7b4f9ee3..445f3f946d 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs
@@ -16,43 +16,58 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3");
+ .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13");
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
{
- b.Property("Id");
+ b.Property("Id")
+ .HasColumnType("TEXT");
- b.Property("AccessFailedCount");
+ b.Property("AccessFailedCount")
+ .HasColumnType("INTEGER");
b.Property("ConcurrencyStamp")
- .IsConcurrencyToken();
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
b.Property("Email")
+ .HasColumnType("TEXT")
.HasMaxLength(256);
- b.Property("EmailConfirmed");
+ b.Property("EmailConfirmed")
+ .HasColumnType("INTEGER");
- b.Property("LockoutEnabled");
+ b.Property("LockoutEnabled")
+ .HasColumnType("INTEGER");
- b.Property("LockoutEnd");
+ b.Property("LockoutEnd")
+ .HasColumnType("TEXT");
b.Property("NormalizedEmail")
+ .HasColumnType("TEXT")
.HasMaxLength(256);
b.Property("NormalizedUserName")
+ .HasColumnType("TEXT")
.HasMaxLength(256);
- b.Property("PasswordHash");
+ b.Property("PasswordHash")
+ .HasColumnType("TEXT");
- b.Property("PhoneNumber");
+ b.Property("PhoneNumber")
+ .HasColumnType("TEXT");
- b.Property("PhoneNumberConfirmed");
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("INTEGER");
- b.Property("SecurityStamp");
+ b.Property("SecurityStamp")
+ .HasColumnType("TEXT");
- b.Property("TwoFactorEnabled");
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("INTEGER");
b.Property("UserName")
+ .HasColumnType("TEXT")
.HasMaxLength(256);
b.HasKey("Id");
@@ -70,26 +85,33 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
{
b.Property("UserCode")
+ .HasColumnType("TEXT")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
+ .HasColumnType("TEXT")
.HasMaxLength(200);
- b.Property("CreationTime");
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
b.Property("Data")
.IsRequired()
+ .HasColumnType("TEXT")
.HasMaxLength(50000);
b.Property("DeviceCode")
.IsRequired()
+ .HasColumnType("TEXT")
.HasMaxLength(200);
b.Property("Expiration")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("TEXT");
b.Property("SubjectId")
+ .HasColumnType("TEXT")
.HasMaxLength(200);
b.HasKey("UserCode");
@@ -97,51 +119,64 @@ namespace Company.WebApplication1.Data.Migrations
b.HasIndex("DeviceCode")
.IsUnique();
+ b.HasIndex("Expiration");
+
b.ToTable("DeviceCodes");
});
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
{
b.Property("Key")
+ .HasColumnType("TEXT")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
+ .HasColumnType("TEXT")
.HasMaxLength(200);
- b.Property("CreationTime");
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
b.Property("Data")
.IsRequired()
+ .HasColumnType("TEXT")
.HasMaxLength(50000);
- b.Property("Expiration");
+ b.Property("Expiration")
+ .HasColumnType("TEXT");
b.Property("SubjectId")
+ .HasColumnType("TEXT")
.HasMaxLength(200);
b.Property("Type")
.IsRequired()
+ .HasColumnType("TEXT")
.HasMaxLength(50);
b.HasKey("Key");
- b.HasIndex("SubjectId", "ClientId", "Type");
+ b.HasIndex("SubjectId", "ClientId", "Type", "Expiration");
b.ToTable("PersistedGrants");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
- b.Property("Id");
+ b.Property("Id")
+ .HasColumnType("TEXT");
b.Property("ConcurrencyStamp")
- .IsConcurrencyToken();
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
b.Property("Name")
+ .HasColumnType("TEXT")
.HasMaxLength(256);
b.Property("NormalizedName")
+ .HasColumnType("TEXT")
.HasMaxLength(256);
b.HasKey("Id");
@@ -156,14 +191,18 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
{
b.Property("Id")
- .ValueGeneratedOnAdd();
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
- b.Property("ClaimType");
+ b.Property("ClaimType")
+ .HasColumnType("TEXT");
- b.Property("ClaimValue");
+ b.Property("ClaimValue")
+ .HasColumnType("TEXT");
b.Property("RoleId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("TEXT");
b.HasKey("Id");
@@ -175,14 +214,18 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
{
b.Property("Id")
- .ValueGeneratedOnAdd();
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
- b.Property("ClaimType");
+ b.Property("ClaimType")
+ .HasColumnType("TEXT");
- b.Property("ClaimValue");
+ b.Property("ClaimValue")
+ .HasColumnType("TEXT");
b.Property("UserId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("TEXT");
b.HasKey("Id");
@@ -194,15 +237,19 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
{
b.Property("LoginProvider")
+ .HasColumnType("TEXT")
.HasMaxLength(128);
b.Property("ProviderKey")
+ .HasColumnType("TEXT")
.HasMaxLength(128);
- b.Property("ProviderDisplayName");
+ b.Property("ProviderDisplayName")
+ .HasColumnType("TEXT");
b.Property("UserId")
- .IsRequired();
+ .IsRequired()
+ .HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
@@ -213,9 +260,11 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
{
- b.Property("UserId");
+ b.Property("UserId")
+ .HasColumnType("TEXT");
- b.Property("RoleId");
+ b.Property("RoleId")
+ .HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
@@ -226,15 +275,19 @@ namespace Company.WebApplication1.Data.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
{
- b.Property("UserId");
+ b.Property("UserId")
+ .HasColumnType("TEXT");
b.Property("LoginProvider")
+ .HasColumnType("TEXT")
.HasMaxLength(128);
b.Property("Name")
+ .HasColumnType("TEXT")
.HasMaxLength(128);
- b.Property("Value");
+ b.Property("Value")
+ .HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs
index 20ae98cb06..19502e4c12 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs
@@ -230,9 +230,14 @@ namespace Company.WebApplication1.Data.Migrations
unique: true);
migrationBuilder.CreateIndex(
- name: "IX_PersistedGrants_SubjectId_ClientId_Type",
+ name: "IX_DeviceCodes_Expiration",
+ table: "DeviceCodes",
+ column: "Expiration");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration",
table: "PersistedGrants",
- columns: new[] { "SubjectId", "ClientId", "Type" });
+ columns: new[] { "SubjectId", "ClientId", "Type", "Expiration" });
}
protected override void Down(MigrationBuilder migrationBuilder)
diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs
index f037fed08a..00494952dd 100644
--- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs
+++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs
@@ -14,43 +14,58 @@ namespace Company.WebApplication1.Data.Migrations
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3");
+ .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13");
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
{
- b.Property("Id");
+ b.Property("Id")
+ .HasColumnType("TEXT");
- b.Property("AccessFailedCount");
+ b.Property("AccessFailedCount")
+ .HasColumnType("INTEGER");
b.Property("ConcurrencyStamp")
- .IsConcurrencyToken();
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
b.Property("Email")
+ .HasColumnType("TEXT")
.HasMaxLength(256);
- b.Property("EmailConfirmed");
+ b.Property("EmailConfirmed")
+ .HasColumnType("INTEGER");
- b.Property