diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/en.json b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/en.json index a4812224d..660b7c12a 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/en.json +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/en.json @@ -26,6 +26,12 @@ "ClientPropertyNotFound": "Client property: {0} not found!", "IdentityResourcePropertyNotFound": "Identity resource property: {0} not found!", "EncryptionNotImplemented": "Encryption type: {0} not implemented!", + "DisplayName:PersistedGrants": "Persisted Grants", + "DisplayName:Clients": "Clients", + "DisplayName:ApiResources": "Api Resources", + "DisplayName:ApiScopes": "Api Scopes", + "DisplayName:Devices": "Devices", + "DisplayName:IdentityResources": "Identity Resources", "AddNew": "Add New", "Basics": "Basics", "Authentication": "Authentication", @@ -56,6 +62,7 @@ "Assigned": "Assigned", "Available": "Available", "Expiration": "Expiration", + "CreationTime": "Creation Time", "Scope:New": "Add New", "Scope:Delete": "Delete", "Secret:New": "Add New", @@ -136,6 +143,17 @@ "Propertites:Value": "Value", "Propertites:Delete": "Delete", "Propertites:DuplicateKey": "Property already exists and cannot add duplicates!", - "Permissions": "Permissions" + "Permissions": "Permissions", + "ApiScopes:Edit": "Edit", + "ApiScopes:Delete": "Delete", + "Grants:Key": "Key", + "Grants:Type": "Type", + "Grants:SessionId": "Session Id", + "Grants:SubjectId": "Subject Id", + "Grants:ConsumedTime": "Consumed Time", + "Grants:Profile": "Profile", + "Grants:Delete": "Delete", + "Grants:DeleteByKey": "Delete By - {Key}", + "Grants:Data": "Data" } } \ No newline at end of file diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/zh-Hans.json b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/zh-Hans.json index e8e8235a5..c021ab7ff 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/zh-Hans.json +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Localization/Resources/zh-Hans.json @@ -26,6 +26,12 @@ "ClientPropertyNotFound": "客户端属性: {0} 不存在!", "IdentityResourcePropertyNotFound": "身份资源属性: {0} 不存在!", "EncryptionNotImplemented": "加密类型: {0} 未实现!", + "DisplayName:PersistedGrants": "持久授权", + "DisplayName:Clients": "客户端", + "DisplayName:ApiResources": "Api资源", + "DisplayName:ApiScopes": "Api范围", + "DisplayName:Devices": "设备授权", + "DisplayName:IdentityResources": "身份资源", "AddNew": "添加一个新的", "Basics": "基本信息", "Authentication": "认证/注销", @@ -55,7 +61,8 @@ "AllowedAccessTokenSigningAlgorithms": "允许访问令牌签名算法", "Assigned": "可分配的", "Available": "已拥有的", - "Expiration": "过期", + "Expiration": "过期时间", + "CreationTime": "创建时间", "Scope:New": "添加新作用域", "Scope:Delete": "删除作用域", "Secret:New": "添加新密钥", @@ -138,6 +145,15 @@ "Propertites:DuplicateKey": "属性已经存在,不能添加重复项!", "Permissions": "权限", "ApiScopes:Edit": "编辑范围", - "ApiScopes:Delete": "删除范围" + "ApiScopes:Delete": "删除范围", + "Grants:Key": "授权标识", + "Grants:Type": "授权类型", + "Grants:SessionId": "会话标识", + "Grants:SubjectId": "主体标识", + "Grants:ConsumedTime": "消费时间", + "Grants:Profile": "明细", + "Grants:Delete": "删除", + "Grants:DeleteByKey": "删除授权标识 - {Key}", + "Grants:Data": "数据" } } \ No newline at end of file diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs index 14e411be6..9461f2e19 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs @@ -2,10 +2,12 @@ using LINGYUN.Abp.IdentityServer.ApiResources; using LINGYUN.Abp.IdentityServer.ApiScopes; using LINGYUN.Abp.IdentityServer.Clients; +using LINGYUN.Abp.IdentityServer.Grants; using LINGYUN.Abp.IdentityServer.IdentityResources; using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; +using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; namespace LINGYUN.Abp.IdentityServer @@ -47,6 +49,9 @@ namespace LINGYUN.Abp.IdentityServer CreateMap(); CreateMap() .MapExtraProperties(); + + CreateMap() + .MapExtraProperties(); } } } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs index b5005107e..fd7bbead5 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.EntityFrameworkCore/LINGYUN/Abp/IdentityServer/Grants/EfCorePersistentGrantRepository.cs @@ -41,7 +41,7 @@ namespace LINGYUN.Abp.IdentityServer.Grants .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Type.Contains(filter) || x.ClientId.Contains(filter) || x.Key.Contains(filter)) .OrderBy(sorting ?? nameof(PersistedGrant.CreationTime)) - .Page(skipCount, maxResultCount) + .PageBy(skipCount, maxResultCount) .ToListAsync(GetCancellationToken(cancellation)); } } diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/event-bus-cap.db b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/event-bus-cap.db index 1d42f323c..2a350111e 100644 Binary files a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/event-bus-cap.db and b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/event-bus-cap.db differ diff --git a/vueJs/src/api/dynamic-api.ts b/vueJs/src/api/dynamic-api.ts index 5c6f7e692..c6aac5d7a 100644 --- a/vueJs/src/api/dynamic-api.ts +++ b/vueJs/src/api/dynamic-api.ts @@ -8,6 +8,19 @@ import { Method } from 'axios' const sourceUrl = '/api/abp/api-definition' const serviceUrl = process.env.VUE_APP_BASE_API +export enum ParameterBindingSources { + modelBinding = 'ModelBinding', + query = 'Query', + body = 'Body', + path = 'Path', + form = 'Form', + header = 'Header', + custom = 'Custom', + services = 'Services' +} + +const bindSources = [ParameterBindingSources.modelBinding, ParameterBindingSources.query] + export default class DynamicApiService { /** 获取api代理信息 * @param includeTypes 包括类型信息 @@ -44,14 +57,14 @@ export class UrlBuilder { const value = HttpActionParameterHelper.findParameterValue(methodArguments, pathParameter) if (!value) { if (pathParameter.isOptional) { - urlBuilder = urlBuilder.replace(`{{${pathParameter.name}}}`, '') + urlBuilder = urlBuilder.replace(`{${pathParameter.name}}`, '') } else if (pathParameter.defaultValue) { - urlBuilder = urlBuilder.replace(`{{${pathParameter.name}}}`, String(pathParameter.defaultValue)) + urlBuilder = urlBuilder.replace(`{${pathParameter.name}}`, String(pathParameter.defaultValue)) } else { throw new Error(`Missing path parameter value for ${pathParameter.name} (${pathParameter.nameOnMethod})`) } } else { - urlBuilder = urlBuilder.replace(`{{${pathParameter.name}}}`, String(value)) + urlBuilder = urlBuilder.replace(`{${pathParameter.name}}`, String(value)) } }) return urlBuilder @@ -63,7 +76,6 @@ export class UrlBuilder { methodArguments: any, apiVersion: ApiVersionInfo ) { - const bindSources = [ParameterBindingSources.modelBinding, ParameterBindingSources.query] const queryStringParameters = actionParameters.filter(x => bindSources.some(b => b === x.bindingSourceId)) let isFirstParam = true queryStringParameters @@ -142,17 +154,6 @@ export class ApiVersionInfo { } } -export enum ParameterBindingSources { - modelBinding = 'ModelBinding', - query = 'Query', - body = 'Body', - path = 'Path', - form = 'Form', - header = 'Header', - custom = 'Custom', - services = 'Services' -} - export class ControllerInterfaceApiDescriptionModel { type!: string } diff --git a/vueJs/src/api/grants.ts b/vueJs/src/api/grants.ts new file mode 100644 index 000000000..df0f49222 --- /dev/null +++ b/vueJs/src/api/grants.ts @@ -0,0 +1,20 @@ +import { ExtensibleEntity, PagedAndSortedResultRequestDto } from './types' + +export class PersistedGrant extends ExtensibleEntity { + key!: string + type!: string + subjectId?: string + sessionId!: string + description?: string + consumedTime?: Date + clientId!: string + creationTime!: Date + expiration?: Date + data!: string +} + +export class GetGrantByPaged extends PagedAndSortedResultRequestDto { + filter = '' + subjectId = '' +} + diff --git a/vueJs/src/views/admin/identityServer/api-scopes/components/ApiScopeCreateOrEditForm.vue b/vueJs/src/views/admin/identityServer/api-scopes/components/ApiScopeCreateOrEditForm.vue index 9cafafec2..1829e1736 100644 --- a/vueJs/src/views/admin/identityServer/api-scopes/components/ApiScopeCreateOrEditForm.vue +++ b/vueJs/src/views/admin/identityServer/api-scopes/components/ApiScopeCreateOrEditForm.vue @@ -149,7 +149,7 @@ import UserClaimEditForm from '../../components/UserClaimEditForm.vue' }) export default class extends Vue { @Prop({ default: false }) - private showDialog!: BooleanConstructor + private showDialog!: boolean @Prop({ default: '' }) private id!: string diff --git a/vueJs/src/views/admin/identityServer/persisted-grants/components/PersistedGrantProfile.vue b/vueJs/src/views/admin/identityServer/persisted-grants/components/PersistedGrantProfile.vue new file mode 100644 index 000000000..f16684fdd --- /dev/null +++ b/vueJs/src/views/admin/identityServer/persisted-grants/components/PersistedGrantProfile.vue @@ -0,0 +1,165 @@ + + + diff --git a/vueJs/src/views/admin/identityServer/persisted-grants/index.vue b/vueJs/src/views/admin/identityServer/persisted-grants/index.vue new file mode 100644 index 000000000..c243cced2 --- /dev/null +++ b/vueJs/src/views/admin/identityServer/persisted-grants/index.vue @@ -0,0 +1,230 @@ + + + + +