diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs
index 0f59a03a1e..d6acd8c262 100644
--- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs
+++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs
@@ -461,7 +461,6 @@ namespace Volo.Docs.Pages.Documents.Project
Version = Version
}
);
-
}
catch (DocumentNotFoundException) //TODO: What if called on a remote service which may return 404
{
diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js
index fef573f413..c41e6e996d 100644
--- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js
+++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js
@@ -1,5 +1,76 @@
+var doc = doc || {};
+
(function ($) {
$(function () {
+
+ doc.lazyExpandableNavigation = {
+ isAllLoaded: false,
+ findNode : function(text, href, node){
+ if(node.text === text && node.path === href && node.isLazyExpandable){
+ return node;
+ }
+ if(node.items){
+ for (let i = 0; i < node.items.length; i++) {
+ var result = doc.lazyExpandableNavigation.findNode(text, href, node.items[i]);
+ if(result){
+ return result;
+ }
+ }
+ }
+ return null;
+ },
+ renderNodeAsHtml : function($lazyLiElement, node, isRootLazyNode){
+ if(node.isEmpty){
+ return;
+ }
+
+ var textCss = node.path === "javascript:;" ? "": "tree-toggle";
+ var uiCss = isRootLazyNode ? "" : "style='display: none;'";
+ var $ul = $(`
`);
+ var $li = $(``);
+
+ $li.append(`
${node.text}`)
+
+ if(node.isLazyExpandable){
+ $li.addClass("lazy-expand");
+ }else if(node.hasChildItems){
+ node.items.forEach(function(item){
+ doc.lazyExpandableNavigation.renderNodeAsHtml($li, item, false);
+ });
+ }
+
+ $ul.append($li);
+ $lazyLiElement.append($ul)
+
+ window.Toc.helpers.initNavEvent();
+ },
+ loadAll : function(lazyLiElements){
+ if(doc.lazyExpandableNavigation.isAllLoaded){
+ return;
+ }
+ for(var i = 0; i < lazyLiElements.length; i++){
+ var $li = $(lazyLiElements[i]);
+ if($li.has("ul").length === 0){
+ var $a = $li.find("a");
+ var node = doc.lazyExpandableNavigation.findNode($a.text(), $a.attr("href"), doc.project.navigation);
+ node.items.forEach(item => {
+ doc.lazyExpandableNavigation.renderNodeAsHtml($li, item, true);
+ })
+ }
+
+ var childLazyLiElements = $li.find("li.lazy-expand");
+ if(childLazyLiElements.length > 0){
+ doc.lazyExpandableNavigation.isAllLoaded = false;
+ doc.lazyExpandableNavigation.loadAll(childLazyLiElements);
+ }
+
+ initLazyExpandNavigation();
+ }
+
+ doc.lazyExpandableNavigation.isAllLoaded = true;
+ }
+ }
+
var initNavigationFilter = function (navigationContainerId) {
var $navigation = $('#' + navigationContainerId);
@@ -23,6 +94,8 @@
return;
}
+ doc.lazyExpandableNavigation.loadAll($navigation.find("li.lazy-expand"));
+
var filteredItems = $navigation
.find('li > a')
.filter(function () {
@@ -98,6 +171,23 @@
});
};
+ var initDocProject = function(){
+ abp.ajax({
+ type :"GET",
+ url: '/docs/document-navigation',
+ data: {
+ projectId: doc.project.id,
+ version: doc.project.version,
+ routeVersion: doc.project.routeVersion,
+ languageCode: doc.project.languageCode,
+ projectName: doc.project.name,
+ projectFormat: doc.project.format
+ }
+ }).done(data => {
+ doc.project.navigation = data;
+ })
+ }
+
var initSocialShareLinks = function () {
var pageHeader = $('.docs-body').find('h1, h2').first().text();
@@ -272,6 +362,31 @@
}
};
+ var initLazyExpandNavigation = function(){
+ $("li .lazy-expand").off('click');
+ $("li .lazy-expand a").on('click', function(e){
+ if($(this).attr("href") !== "javascript:;"){
+ e.stopPropagation();
+ }
+ });
+ $("li .lazy-expand").on('click', function(){
+ var $this = $(this);
+ if($this.has("ul").length > 0){
+ return;
+ }
+
+ var $a = $this.find("a");
+ var node = doc.lazyExpandableNavigation.findNode($a.text(), $a.attr("href") , doc.project.navigation);
+ node.items.forEach(item => {
+ doc.lazyExpandableNavigation.renderNodeAsHtml($this, item, true);
+ })
+
+ initLazyExpandNavigation();
+ });
+ }
+
+ initDocProject();
+
initNavigationFilter('sidebar-scroll');
initAnchorTags('.docs-page .docs-body');
@@ -280,7 +395,7 @@
initSections();
- initDocumentNodeBreadcrumb();
+ initLazyExpandNavigation();
Element.prototype.querySelector = function (selector) {
var result = $(this).find(decodeURI(selector));
diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js
index 74767bf56b..5208ac99c0 100644
--- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js
+++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js
@@ -1,23 +1,7 @@
(function ($) {
$(function () {
- $('li:not(.last-link) a.tree-toggle').click(function () {
- $(this).parent().children('ul.tree').toggle(100);
- $(this).closest('li').toggleClass('selected-tree');
- });
-
- $('li:not(.last-link) span.plus-icon i.fa-chevron-right').click(
- function () {
- var $element = $(this).parent();
- var $filter = $('.docs-version #filter');
- if ($filter && $filter.val() != ''){
- return;
- }
-
- $element.parent().children('ul.tree').toggle(100);
- $element.closest('li').toggleClass('selected-tree');
- }
- );
+ window.Toc.helpers.initNavEvent();
var scrollTopBtn = $('.scroll-top-btn');
var enoughHeight = $('.docs-sidebar-wrapper > .docs-top').height();
@@ -159,6 +143,30 @@
$li.append($a);
return $li;
};
+
+ window.Toc.helpers.initNavEvent = function () {
+ $('li:not(.last-link) a.tree-toggle').off('click');
+ $('li:not(.last-link) span.plus-icon i.fa-chevron-right').off('click');
+
+ $('li:not(.last-link) a.tree-toggle').click(function () {
+ $(this).parent().children('ul.tree').toggle(100);
+ $(this).closest('li').toggleClass('selected-tree');
+ });
+
+ $('li:not(.last-link) span.plus-icon i.fa-chevron-right').click(
+ function () {
+ var $element = $(this).parent();
+ var $filter = $('.docs-version #filter');
+
+ if ($filter && $filter.val() != ''){
+ return;
+ }
+
+ $element.parent().children('ul.tree').toggle(100);
+ $element.closest('li').toggleClass('selected-tree');
+ }
+ );
+ }
function docsCriteria() {
var docsContentWidth = $('.docs-content').width() - 74;
diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityRoleDto.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityRoleDto.cs
index 71185cf288..1232045903 100644
--- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityRoleDto.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityRoleDto.cs
@@ -1,10 +1,11 @@
using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
+using Volo.Abp.Auditing;
namespace Volo.Abp.Identity;
-public class IdentityRoleDto : ExtensibleEntityDto
, IHasConcurrencyStamp
+public class IdentityRoleDto : ExtensibleEntityDto, IHasConcurrencyStamp , IHasCreationTime
{
public string Name { get; set; }
@@ -15,4 +16,6 @@ public class IdentityRoleDto : ExtensibleEntityDto, IHasConcurrencyStamp
public bool IsPublic { get; set; }
public string ConcurrencyStamp { get; set; }
+
+ public DateTime CreationTime { get; set; }
}
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimType.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimType.cs
index 2f988948a3..98e0a26a6d 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimType.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimType.cs
@@ -1,10 +1,11 @@
using JetBrains.Annotations;
using System;
+using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;
namespace Volo.Abp.Identity;
-public class IdentityClaimType : AggregateRoot
+public class IdentityClaimType : AggregateRoot, IHasCreationTime
{
public virtual string Name { get; protected set; }
@@ -19,6 +20,8 @@ public class IdentityClaimType : AggregateRoot
public virtual string Description { get; set; }
public virtual IdentityClaimValueType ValueType { get; set; }
+
+ public virtual DateTime CreationTime { get; protected set; }
protected IdentityClaimType()
{
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs
index 68439c9d4b..bfe9e4546d 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs
@@ -14,7 +14,7 @@ namespace Volo.Abp.Identity;
///
/// Represents a role in the identity system
///
-public class IdentityRole : AggregateRoot, IMultiTenant, IHasEntityVersion
+public class IdentityRole : AggregateRoot, IMultiTenant, IHasEntityVersion, IHasCreationTime
{
public virtual Guid? TenantId { get; protected set; }
@@ -53,6 +53,8 @@ public class IdentityRole : AggregateRoot, IMultiTenant, IHasEntityVersion
/// A version value that is increased whenever the entity is changed.
///
public virtual int EntityVersion { get; protected set; }
+
+ public virtual DateTime CreationTime { get; protected set; }
///
/// Initializes a new instance of .
diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs
index 0c9af27055..2fb073dc34 100644
--- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs
+++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs
@@ -40,7 +40,7 @@ public class EfCoreIdentityClaimTypeRepository : EfCoreRepository
u.Name.Contains(filter)
)
- .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.Name) : sorting)
+ .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs
index 293b786eca..9f6085339a 100644
--- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs
+++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs
@@ -119,7 +119,7 @@ public class EfCoreIdentityRoleRepository : EfCoreRepository x.Name.Contains(filter) ||
x.NormalizedName.Contains(filter))
- .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.Name) : sorting)
+ .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}
diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs
index a05e59a1d0..86682b85db 100644
--- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs
+++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs
@@ -232,7 +232,7 @@ public class EfCoreIdentityUserRepository : EfCoreRepository
u.Name.Contains(filter)
)
- .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.Name) : sorting)
+ .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.CreationTime) + " desc" : sorting)
.As>()
.PageBy>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs
index ca67864975..3a57f69902 100644
--- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs
+++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs
@@ -125,7 +125,7 @@ public class MongoIdentityRoleRepository : MongoDbRepository x.Name.Contains(filter) ||
x.NormalizedName.Contains(filter))
- .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.Name) : sorting)
+ .OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.CreationTime) + " desc" : sorting)
.As>()
.PageBy>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs
index 2c99f872ba..58486893ec 100644
--- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs
+++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs
@@ -200,7 +200,7 @@ public class MongoIdentityUserRepository : MongoDbRepository>()
.PageBy>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs
index f085b2eedc..c3a168033b 100644
--- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs
+++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs
@@ -71,7 +71,7 @@ public class MongoOrganizationUnitRepository
CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken))
- .OrderBy(sorting.IsNullOrEmpty() ? nameof(OrganizationUnit.DisplayName) : sorting)
+ .OrderBy(sorting.IsNullOrEmpty() ? nameof(OrganizationUnit.CreationTime) + " desc" : sorting)
.As>()
.PageBy>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js
index fe2c4c5bba..b83db95758 100644
--- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js
+++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js
@@ -114,7 +114,7 @@
_dataTable = _$table.DataTable(
abp.libs.datatables.normalizeConfiguration({
- order: [[1, 'asc']],
+ order: [],
searching: false,
processing: true,
serverSide: true,
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js
index 320e7ff508..fa63b96af4 100644
--- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js
+++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js
@@ -150,7 +150,7 @@
var _$table = _$wrapper.find('table');
_dataTable = _$table.DataTable(
abp.libs.datatables.normalizeConfiguration({
- order: [[1, 'asc']],
+ order: [],
processing: true,
serverSide: true,
scrollX: true,
diff --git a/modules/openiddict/app/OpenIddict.Demo.API/Program.cs b/modules/openiddict/app/OpenIddict.Demo.API/Program.cs
index 4d56464b50..0938f87e6c 100644
--- a/modules/openiddict/app/OpenIddict.Demo.API/Program.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.API/Program.cs
@@ -1,5 +1,8 @@
using Microsoft.AspNetCore.Authentication.JwtBearer;
using OpenIddict.Demo.API;
+using Microsoft.OpenApi.Models;
+using Swashbuckle.AspNetCore.SwaggerGen;
+using Swashbuckle.AspNetCore.SwaggerUI;
var builder = WebApplication.CreateBuilder(args);
builder.Logging.ClearProviders();
@@ -20,7 +23,40 @@ builder.Services.AddCors(options =>
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
-builder.Services.AddSwaggerGen();
+builder.Services.AddSwaggerGen(options =>
+{
+ options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme
+ {
+ Type = SecuritySchemeType.OAuth2,
+ Flows = new OpenApiOAuthFlows
+ {
+ AuthorizationCode = new OpenApiOAuthFlow
+ {
+ AuthorizationUrl = new Uri("https://localhost:44301/connect/authorize"),
+ TokenUrl = new Uri("https://localhost:44301/connect/token"),
+ Scopes = new Dictionary
+ {
+ { "AbpAPI", "AbpAPI"}
+ }
+ }
+ }
+ });
+
+ options.AddSecurityRequirement(new OpenApiSecurityRequirement
+ {
+ {
+ new OpenApiSecurityScheme
+ {
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.SecurityScheme,
+ Id = "oauth2"
+ }
+ },
+ Array.Empty()
+ }
+ });
+});
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddAbpJwtBearer(options =>
@@ -37,7 +73,12 @@ await app.InitializeApplicationAsync();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
- app.UseSwaggerUI();
+ app.UseSwaggerUI(options =>
+ {
+ options.SwaggerEndpoint("/swagger/v1/swagger.json", "OpenIddict.Demo.API");
+ options.OAuthClientId("Swagger");
+ options.OAuthScopes("AbpAPI");
+ });
}
app.UseHttpsRedirection();
diff --git a/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Pages/Index.razor b/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Pages/Index.razor
index 7889736c35..648f6ab84b 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Pages/Index.razor
+++ b/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Pages/Index.razor
@@ -21,9 +21,9 @@ Welcome to your new app.
@if (_claims.Count() > 0)
{
-
+
+
@foreach (var claim in _claims)
diff --git a/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Program.cs b/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Program.cs
index f4a96ba0f8..a2bd2c85e3 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Program.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.Client.BlazorWASM/Program.cs
@@ -15,7 +15,7 @@ builder.Services.AddOidcAuthentication(options =>
options.ProviderOptions.ClientId = "AbpBlazorWASMApp";
options.ProviderOptions.ResponseType = "code";
- options.UserOptions.NameClaim = JwtClaimTypes.Name;
+ options.UserOptions.NameClaim = JwtClaimTypes.PreferredUserName;
options.UserOptions.RoleClaim = JwtClaimTypes.Role;
options.ProviderOptions.DefaultScopes.Add("roles");
diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/EntityFrameworkCore/ServerDataSeedContributor.cs b/modules/openiddict/app/OpenIddict.Demo.Server/EntityFrameworkCore/ServerDataSeedContributor.cs
index f63137a0e2..148685c1bd 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Server/EntityFrameworkCore/ServerDataSeedContributor.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.Server/EntityFrameworkCore/ServerDataSeedContributor.cs
@@ -67,10 +67,10 @@ public class ServerDataSeedContributor : IDataSeedContributor, ITransientDepende
{
OpenIddictConstants.Permissions.Endpoints.Authorization,
OpenIddictConstants.Permissions.Endpoints.Token,
- OpenIddictConstants.Permissions.Endpoints.Device,
+ OpenIddictConstants.Permissions.Endpoints.DeviceAuthorization,
OpenIddictConstants.Permissions.Endpoints.Introspection,
OpenIddictConstants.Permissions.Endpoints.Revocation,
- OpenIddictConstants.Permissions.Endpoints.Logout,
+ OpenIddictConstants.Permissions.Endpoints.EndSession,
OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode,
OpenIddictConstants.Permissions.GrantTypes.Implicit,
@@ -125,10 +125,10 @@ public class ServerDataSeedContributor : IDataSeedContributor, ITransientDepende
{
OpenIddictConstants.Permissions.Endpoints.Authorization,
OpenIddictConstants.Permissions.Endpoints.Token,
- OpenIddictConstants.Permissions.Endpoints.Device,
+ OpenIddictConstants.Permissions.Endpoints.DeviceAuthorization,
OpenIddictConstants.Permissions.Endpoints.Introspection,
OpenIddictConstants.Permissions.Endpoints.Revocation,
- OpenIddictConstants.Permissions.Endpoints.Logout,
+ OpenIddictConstants.Permissions.Endpoints.EndSession,
OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode,
OpenIddictConstants.Permissions.GrantTypes.Implicit,
@@ -156,5 +156,37 @@ public class ServerDataSeedContributor : IDataSeedContributor, ITransientDepende
}
});
}
+
+ if (await _applicationManager.FindByClientIdAsync("Swagger") == null)
+ {
+ await _applicationManager.CreateAsync(new OpenIddictApplicationDescriptor
+ {
+ ApplicationType = OpenIddictConstants.ApplicationTypes.Web,
+ ClientId = "Swagger",
+ ClientType = OpenIddictConstants.ClientTypes.Public,
+ ConsentType = OpenIddictConstants.ConsentTypes.Explicit,
+ DisplayName = "Abp Swagger Application",
+ RedirectUris =
+ {
+ new Uri("https://localhost:44303/swagger/oauth2-redirect.html")
+ },
+ Permissions =
+ {
+ OpenIddictConstants.Permissions.Endpoints.Authorization,
+ OpenIddictConstants.Permissions.Endpoints.Token,
+
+ OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode,
+
+ OpenIddictConstants.Permissions.ResponseTypes.Code,
+
+ OpenIddictConstants.Permissions.Prefixes.Scope + "AbpAPI"
+ },
+ Settings =
+ {
+ // Use a shorter access token lifetime for tokens issued to the Postman application.
+ [OpenIddictConstants.Settings.TokenLifetimes.AccessToken] = TimeSpan.FromMinutes(5).ToString("c", CultureInfo.InvariantCulture)
+ }
+ });
+ }
}
}
diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20240829013142_Initial.Designer.cs b/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20241005085943_Initial.Designer.cs
similarity index 98%
rename from modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20240829013142_Initial.Designer.cs
rename to modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20241005085943_Initial.Designer.cs
index 158f345fbe..7fffd314e8 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20240829013142_Initial.Designer.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20241005085943_Initial.Designer.cs
@@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace OpenIddict.Demo.Server.Migrations
{
[DbContext(typeof(ServerDbContext))]
- [Migration("20240829013142_Initial")]
+ [Migration("20241005085943_Initial")]
partial class Initial
{
///
@@ -22,7 +22,7 @@ namespace OpenIddict.Demo.Server.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
- .HasAnnotation("ProductVersion", "8.0.4")
+ .HasAnnotation("ProductVersion", "9.0.0-rc.1.24451.1")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
@@ -394,6 +394,13 @@ namespace OpenIddict.Demo.Server.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
b.Property("Device")
.IsRequired()
.HasMaxLength(64)
@@ -403,9 +410,14 @@ namespace OpenIddict.Demo.Server.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
b.Property("IpAddresses")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ .HasMaxLength(2048)
+ .HasColumnType("nvarchar(2048)");
b.Property("LastAccessed")
.HasColumnType("datetime2");
diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20240829013142_Initial.cs b/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20241005085943_Initial.cs
similarity index 99%
rename from modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20240829013142_Initial.cs
rename to modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20241005085943_Initial.cs
index 537745685f..62b23276c4 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20240829013142_Initial.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20241005085943_Initial.cs
@@ -232,9 +232,11 @@ namespace OpenIddict.Demo.Server.Migrations
TenantId = table.Column(type: "uniqueidentifier", nullable: true),
UserId = table.Column(type: "uniqueidentifier", nullable: false),
ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true),
- IpAddresses = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
+ IpAddresses = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
SignedIn = table.Column(type: "datetime2", nullable: false),
- LastAccessed = table.Column(type: "datetime2", nullable: true)
+ LastAccessed = table.Column(type: "datetime2", nullable: true),
+ ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false),
+ ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false)
},
constraints: table =>
{
diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/ServerDbContextModelSnapshot.cs b/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/ServerDbContextModelSnapshot.cs
index bdbb1fca9b..fbaf0bc710 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/ServerDbContextModelSnapshot.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.Server/Migrations/ServerDbContextModelSnapshot.cs
@@ -19,7 +19,7 @@ namespace OpenIddict.Demo.Server.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
- .HasAnnotation("ProductVersion", "8.0.4")
+ .HasAnnotation("ProductVersion", "9.0.0-rc.1.24451.1")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
@@ -391,6 +391,13 @@ namespace OpenIddict.Demo.Server.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
b.Property("Device")
.IsRequired()
.HasMaxLength(64)
@@ -400,9 +407,14 @@ namespace OpenIddict.Demo.Server.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
b.Property("IpAddresses")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ .HasMaxLength(2048)
+ .HasColumnType("nvarchar(2048)");
b.Property("LastAccessed")
.HasColumnType("datetime2");
diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/OpenIddictServerModule.cs b/modules/openiddict/app/OpenIddict.Demo.Server/OpenIddictServerModule.cs
index b6e262ee32..dd8ba1df2d 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Server/OpenIddictServerModule.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.Server/OpenIddictServerModule.cs
@@ -89,24 +89,7 @@ public class OpenIddictServerModule : AbpModule
PreConfigure(builder =>
{
- //https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html
- using (var algorithm = RSA.Create(keySizeInBits: 2048))
- {
- var subject = new X500DistinguishedName("CN=Fabrikam Encryption Certificate");
- var request = new CertificateRequest(subject, algorithm, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
- request.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, critical: true));
- var certificate = request.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(2));
- builder.AddSigningCertificate(certificate);
- }
-
- using (var algorithm = RSA.Create(keySizeInBits: 2048))
- {
- var subject = new X500DistinguishedName("CN=Fabrikam Signing Certificate");
- var request = new CertificateRequest(subject, algorithm, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
- request.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment, critical: true));
- var certificate = request.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(2));
- builder.AddEncryptionCertificate(certificate);
- }
+ builder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000");
builder.Configure(openIddictServerOptions =>
{
diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/Program.cs b/modules/openiddict/app/OpenIddict.Demo.Server/Program.cs
index 9b3126f594..83c641e569 100644
--- a/modules/openiddict/app/OpenIddict.Demo.Server/Program.cs
+++ b/modules/openiddict/app/OpenIddict.Demo.Server/Program.cs
@@ -8,7 +8,7 @@ builder.Services.AddCors(options =>
options.AddDefaultPolicy(
builder =>
{
- builder.WithOrigins("http://localhost:4200", "https://localhost:44304")
+ builder.WithOrigins("http://localhost:4200", "https://localhost:44303", "https://localhost:44304")
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/openiddict.pfx b/modules/openiddict/app/OpenIddict.Demo.Server/openiddict.pfx
new file mode 100644
index 0000000000..8dc3bf1771
Binary files /dev/null and b/modules/openiddict/app/OpenIddict.Demo.Server/openiddict.pfx differ
diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs
index 61f254f255..6ebb66cb6a 100644
--- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs
+++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictAspNetCoreModule.cs
@@ -62,13 +62,13 @@ public class AbpOpenIddictAspNetCoreModule : AbpModule
//.SetConfigurationEndpointUris()
// .well-known/jwks
//.SetCryptographyEndpointUris()
- .SetDeviceEndpointUris("device")
+ .SetDeviceAuthorizationEndpointUris("device")
.SetIntrospectionEndpointUris("connect/introspect")
- .SetLogoutEndpointUris("connect/logout")
+ .SetEndSessionEndpointUris("connect/endsession")
.SetRevocationEndpointUris("connect/revocat")
.SetTokenEndpointUris("connect/token")
- .SetUserinfoEndpointUris("connect/userinfo")
- .SetVerificationEndpointUris("connect/verify");
+ .SetUserInfoEndpointUris("connect/userinfo")
+ .SetEndUserVerificationEndpointUris("connect/verify");
builder
.AllowAuthorizationCodeFlow()
@@ -77,7 +77,7 @@ public class AbpOpenIddictAspNetCoreModule : AbpModule
.AllowPasswordFlow()
.AllowClientCredentialsFlow()
.AllowRefreshTokenFlow()
- .AllowDeviceCodeFlow()
+ .AllowDeviceAuthorizationFlow()
.AllowNoneFlow();
builder.RegisterScopes(new[]
@@ -94,9 +94,9 @@ public class AbpOpenIddictAspNetCoreModule : AbpModule
builder.UseAspNetCore()
.EnableAuthorizationEndpointPassthrough()
.EnableTokenEndpointPassthrough()
- .EnableUserinfoEndpointPassthrough()
- .EnableLogoutEndpointPassthrough()
- .EnableVerificationEndpointPassthrough()
+ .EnableUserInfoEndpointPassthrough()
+ .EnableEndSessionEndpointPassthrough()
+ .EnableEndUserVerificationEndpointPassthrough()
.EnableStatusCodePagesIntegration();
if (builderOptions.AddDevelopmentEncryptionAndSigningCertificate)
diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs
index 5b28962f37..f61d6fde45 100644
--- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs
+++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs
@@ -30,11 +30,11 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
// If prompt=login was specified by the client application,
// immediately return the user agent to the login page.
- if (request.HasPrompt(OpenIddictConstants.Prompts.Login))
+ if (request.HasPromptValue(OpenIddictConstants.PromptValues.Login))
{
// To avoid endless login -> authorization redirects, the prompt=login flag
// is removed from the authorization request payload before redirecting the user.
- var prompt = string.Join(" ", request.GetPrompts().Remove(OpenIddictConstants.Prompts.Login));
+ var prompt = string.Join(" ", request.GetPromptValues().Remove(OpenIddictConstants.PromptValues.Login));
var parameters = Request.HasFormContentType ?
Request.Form.Where(parameter => parameter.Key != OpenIddictConstants.Parameters.Prompt).ToList() :
@@ -59,7 +59,7 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
{
// If the client application requested promptless authentication,
// return an error indicating that the user is not logged in.
- if (request.HasPrompt(OpenIddictConstants.Prompts.None))
+ if (request.HasPromptValue(OpenIddictConstants.PromptValues.None))
{
return Forbid(
authenticationSchemes: OpenIddictServerAspNetCoreDefaults.AuthenticationScheme,
@@ -137,7 +137,7 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
// return an authorization response without displaying the consent form.
case OpenIddictConstants.ConsentTypes.Implicit:
case OpenIddictConstants.ConsentTypes.External when authorizations.Any():
- case OpenIddictConstants.ConsentTypes.Explicit when authorizations.Any() && !request.HasPrompt(OpenIddictConstants.Prompts.Consent):
+ case OpenIddictConstants.ConsentTypes.Explicit when authorizations.Any() && !request.HasPromptValue(OpenIddictConstants.PromptValues.Consent):
var principal = await SignInManager.CreateUserPrincipalAsync(user);
if (result.Properties != null && result.Properties.IsPersistent)
@@ -173,8 +173,8 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
// At this point, no authorization was found in the database and an error must be returned
// if the client application specified prompt=none in the authorization request.
- case OpenIddictConstants.ConsentTypes.Explicit when request.HasPrompt(OpenIddictConstants.Prompts.None):
- case OpenIddictConstants.ConsentTypes.Systematic when request.HasPrompt(OpenIddictConstants.Prompts.None):
+ case OpenIddictConstants.ConsentTypes.Explicit when request.HasPromptValue(OpenIddictConstants.PromptValues.None):
+ case OpenIddictConstants.ConsentTypes.Systematic when request.HasPromptValue(OpenIddictConstants.PromptValues.None):
return Forbid(
authenticationSchemes: OpenIddictServerAspNetCoreDefaults.AuthenticationScheme,
properties: new AuthenticationProperties(new Dictionary
diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/LogoutController.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/EndSessionController.cs
similarity index 93%
rename from modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/LogoutController.cs
rename to modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/EndSessionController.cs
index 34796ea6a9..627479813b 100644
--- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/LogoutController.cs
+++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/EndSessionController.cs
@@ -1,11 +1,10 @@
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
using OpenIddict.Server.AspNetCore;
namespace Volo.Abp.OpenIddict.Controllers;
-[Route("connect/logout")]
+[Route("connect/endsession")]
[ApiExplorerSettings(IgnoreApi = true)]
public class LogoutController : AbpOpenIdDictControllerBase
{
diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidateAuthorizedParty.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidateAuthorizedParty.cs
index 5c22de29a2..eaae81d714 100644
--- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidateAuthorizedParty.cs
+++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidateAuthorizedParty.cs
@@ -5,10 +5,10 @@ using OpenIddict.Server;
namespace Volo.Abp.OpenIddict.WildcardDomains;
-public class AbpValidateAuthorizedParty : AbpOpenIddictWildcardDomainBase
+public class AbpValidateAuthorizedParty : AbpOpenIddictWildcardDomainBase
{
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
- = OpenIddictServerHandlerDescriptor.CreateBuilder()
+ = OpenIddictServerHandlerDescriptor.CreateBuilder()
.UseScopedHandler()
.SetOrder(OpenIddictServerHandlers.Session.ValidateEndpointPermissions.Descriptor.Order + 1_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
@@ -22,7 +22,7 @@ public class AbpValidateAuthorizedParty : AbpOpenIddictWildcardDomainBase
+public class AbpValidateClientPostLogoutRedirectUri : AbpOpenIddictWildcardDomainBase
{
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
- = OpenIddictServerHandlerDescriptor.CreateBuilder()
+ = OpenIddictServerHandlerDescriptor.CreateBuilder()
.AddFilter()
.AddFilter()
.UseScopedHandler()
@@ -24,7 +24,7 @@ public class AbpValidateClientPostLogoutRedirectUri : AbpOpenIddictWildcardDomai
OriginalHandler = new OpenIddictServerHandlers.Session.ValidateClientPostLogoutRedirectUri(applicationManager);
}
- public async override ValueTask HandleAsync(OpenIddictServerEvents.ValidateLogoutRequestContext context)
+ public async override ValueTask HandleAsync(OpenIddictServerEvents.ValidateEndSessionRequestContext context)
{
Check.NotNull(context, nameof(context));
Check.NotNullOrEmpty(context.PostLogoutRedirectUri, nameof(context.PostLogoutRedirectUri));
diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidatePostLogoutRedirectUriParameter.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidatePostLogoutRedirectUriParameter.cs
index d96592944c..fe54259121 100644
--- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidatePostLogoutRedirectUriParameter.cs
+++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/WildcardDomains/AbpValidatePostLogoutRedirectUriParameter.cs
@@ -4,10 +4,10 @@ using OpenIddict.Server;
namespace Volo.Abp.OpenIddict.WildcardDomains;
-public class AbpValidatePostLogoutRedirectUriParameter : AbpOpenIddictWildcardDomainBase
+public class AbpValidatePostLogoutRedirectUriParameter : AbpOpenIddictWildcardDomainBase
{
public static OpenIddictServerHandlerDescriptor Descriptor { get; }
- = OpenIddictServerHandlerDescriptor.CreateBuilder()
+ = OpenIddictServerHandlerDescriptor.CreateBuilder()
.UseSingletonHandler()
.SetOrder(int.MinValue + 100_000)
.SetType(OpenIddictServerHandlerType.BuiltIn)
@@ -18,7 +18,7 @@ public class AbpValidatePostLogoutRedirectUriParameter : AbpOpenIddictWildcardDo
{
}
- public async override ValueTask HandleAsync(OpenIddictServerEvents.ValidateLogoutRequestContext context)
+ public async override ValueTask HandleAsync(OpenIddictServerEvents.ValidateEndSessionRequestContext context)
{
Check.NotNull(context, nameof(context));
diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/AbpOpenIddictAuthorizationCache.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/AbpOpenIddictAuthorizationCache.cs
index 5149d26c75..ca9d8931db 100644
--- a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/AbpOpenIddictAuthorizationCache.cs
+++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/AbpOpenIddictAuthorizationCache.cs
@@ -30,82 +30,8 @@ public class AbpOpenIddictAuthorizationCache : AbpOpenIddictCacheBase FindAsync(string subject, string client, [EnumeratorCancellation] CancellationToken cancellationToken)
+ public virtual async IAsyncEnumerable FindAsync(string subject, string client, string status, string type, ImmutableArray? scopes, [EnumeratorCancellation] CancellationToken cancellationToken)
{
- Check.NotNullOrEmpty(subject, nameof(subject));
- Check.NotNullOrEmpty(client, nameof(client));
-
- var authorizations = await ArrayCache.GetOrAddAsync($"{nameof(FindAsync)}_{subject}_{client}", async () =>
- {
- var applications = new List();
- await foreach (var authorization in Store.FindAsync(subject, client, cancellationToken))
- {
- applications.Add(authorization);
- await AddAsync(authorization, cancellationToken);
- }
- return applications.ToArray();
- }, token: cancellationToken);
-
- foreach (var authorization in authorizations)
- {
- yield return authorization;
- }
- }
-
- public virtual async IAsyncEnumerable FindAsync(string subject, string client, string status, [EnumeratorCancellation] CancellationToken cancellationToken)
- {
- Check.NotNullOrEmpty(subject, nameof(subject));
- Check.NotNullOrEmpty(client, nameof(client));
- Check.NotNullOrEmpty(status, nameof(status));
-
- var authorizations = await ArrayCache.GetOrAddAsync($"{nameof(FindAsync)}_{subject}_{client}_{status}", async () =>
- {
- var applications = new List();
- await foreach (var authorization in Store.FindAsync(subject, client, status, cancellationToken))
- {
- applications.Add(authorization);
- await AddAsync(authorization, cancellationToken);
- }
- return applications.ToArray();
- }, token: cancellationToken);
-
- foreach (var authorization in authorizations)
- {
- yield return authorization;
- }
- }
-
- public virtual async IAsyncEnumerable