From 133223de74ee37f2e807bc3f6a1ba9bfca9bd0f5 Mon Sep 17 00:00:00 2001 From: yujiale Date: Tue, 10 Jan 2023 16:49:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E5=88=A0=E9=99=A4=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdk/java/client/AuthenticationClient.java | 91 ---- .../sdk/java/client/ManagementClient.java | 393 +----------------- 2 files changed, 1 insertion(+), 483 deletions(-) diff --git a/src/main/java/cn/authing/sdk/java/client/AuthenticationClient.java b/src/main/java/cn/authing/sdk/java/client/AuthenticationClient.java index 1f788d42..bf3f5487 100644 --- a/src/main/java/cn/authing/sdk/java/client/AuthenticationClient.java +++ b/src/main/java/cn/authing/sdk/java/client/AuthenticationClient.java @@ -1190,66 +1190,6 @@ public LoginTokenRespDto signInByCredentials(SigninByCredentialsDto reqDto) { String response = request(config); return deserialize(response, LoginTokenRespDto.class); } -/** - * @summary 使用用户凭证登录 - * @description - * 此端点为基于直接 API 调用形式的登录端点,适用于你需要自建登录页面的场景。**此端点暂时不支持 MFA、信息补全、首次密码重置等流程,如有需要,请使用 OIDC 标准协议认证端点。** - * - * - * 注意事项:取决于你在 Authing 创建应用时选择的**应用类型**和应用配置的**换取 token 身份验证方式**,在调用此接口时需要对客户端的身份进行不同形式的验证。 - * - *
- * 点击展开详情 - * - *
- * - * 你可以在 [Authing 控制台](https://console.authing.cn) 的**应用** - **自建应用** - **应用详情** - **应用配置** - **其他设置** - **授权配置** - * 中找到**换取 token 身份验证方式** 配置项: - * - * > 单页 Web 应用和客户端应用隐藏,默认为 `none`,不允许修改;后端应用和标准 Web 应用可以修改此配置项。 - * - * ![](https://files.authing.co/api-explorer/tokenAuthMethod.jpg) - * - * #### 换取 token 身份验证方式为 none 时 - * - * 调用此接口不需要进行额外操作。 - * - * #### 换取 token 身份验证方式为 client_secret_post 时 - * - * 调用此接口时必须在 body 中传递 `client_id` 和 `client_secret` 参数,作为验证客户端身份的条件。其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。 - * - * #### 换取 token 身份验证方式为 client_secret_basic 时 - * - * 调用此接口时必须在 HTTP 请求头中携带 `authorization` 请求头,作为验证客户端身份的条件。`authorization` 请求头的格式如下(其中 `client_id` 为应用 ID、`client_secret` 为应用密钥。): - * - * ``` - * Basic base64(:) - * ``` - * - * 结果示例: - * - * ``` - * Basic NjA2M2ZiMmYzY3h4eHg2ZGY1NWYzOWViOjJmZTdjODdhODFmODY3eHh4eDAzMjRkZjEyZGFlZGM3 - * ``` - * - * JS 代码示例: - * - * ```js - * 'Basic ' + Buffer.from(client_id + ':' + client_secret).toString('base64'); - * ``` - * - *
- * - * - **/ -public LoginTokenRespDto signInByCredentials1(SigninByCredentialsDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/signin"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, LoginTokenRespDto.class); -} /** * @summary 使用移动端社会化登录 * @description @@ -1860,25 +1800,6 @@ public UserSingleRespDto signUp(SignUpDto reqDto) { String response = request(config); return deserialize(response, UserSingleRespDto.class); } - /** - * @summary 注册 - * @description - * 此端点目前支持以下几种基于的注册方式: - * - * 1. 基于密码(PASSWORD):用户名 + 密码,邮箱 + 密码。 - * 2. 基于一次性临时验证码(PASSCODE):手机号 + 验证码,邮箱 + 验证码。你需要先调用发送短信或者发送邮件接口获取验证码。 - * - * 社会化登录等使用外部身份源“注册”请直接使用**登录**接口,我们会在其第一次登录的时候为其创建一个新账号。 - * - **/ - public UserSingleRespDto signUp1(SignUpDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/signup"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, UserSingleRespDto.class); - } /** * @summary 解密微信小程序数据 * @description 解密微信小程序数据 @@ -1951,18 +1872,6 @@ public GetTenantListRespDto getTenantList() { String response = request(config); return deserialize(response, GetTenantListRespDto.class); } - /** - * @summary 获取租户列表 - * @description 获取租户列表 - **/ - public GetTenantListRespDto getTenantList1() { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/get-my-tenant-list"); - config.setBody(new Object()); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, GetTenantListRespDto.class); - } /** * @summary 获取角色列表 * @description 获取角色列表 diff --git a/src/main/java/cn/authing/sdk/java/client/ManagementClient.java b/src/main/java/cn/authing/sdk/java/client/ManagementClient.java index fc0ec005..6df929c0 100644 --- a/src/main/java/cn/authing/sdk/java/client/ManagementClient.java +++ b/src/main/java/cn/authing/sdk/java/client/ManagementClient.java @@ -535,19 +535,6 @@ public OrganizationSingleRespDto getOrganization(GetOrganizationDto reqDto) { return deserialize(response, OrganizationSingleRespDto.class); } - /** - * @summary 获取组织机构详情 - * @description 获取组织机构详情 - **/ - public OrganizationSingleRespDto getOrganization1(GetOrganizationDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/get-organization"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, OrganizationSingleRespDto.class); - } - /** * @summary 批量获取组织机构详情 * @description 批量获取组织机构详情 @@ -574,19 +561,6 @@ public OrganizationPaginatedRespDto listOrganizations(ListOrganizationsDto reqDt return deserialize(response, OrganizationPaginatedRespDto.class); } - /** - * @summary 获取组织机构列表 - * @description 获取组织机构列表,支持分页。 - **/ - public OrganizationPaginatedRespDto listOrganizations1(ListOrganizationsDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-organizations"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, OrganizationPaginatedRespDto.class); - } - /** * @summary 创建组织机构 * @description 创建组织机构,会创建一个只有一个节点的组织机构,可以选择组织描述信息、根节点自定义 ID、多语言等。 @@ -652,19 +626,6 @@ public DepartmentSingleRespDto getDepartment(GetDepartmentDto reqDto) { return deserialize(response, DepartmentSingleRespDto.class); } - /** - * @summary 获取部门信息 - * @description 通过组织 code 以及 部门 ID 或 部门 code,获取部门信息,可以获取自定义数据。 - **/ - public DepartmentSingleRespDto getDepartment1(GetDepartmentDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/get-department"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, DepartmentSingleRespDto.class); - } - /** * @summary 创建部门 * @description 通过组织 code、部门名称、父部门 ID,创建部门,可以设置多种参数。 @@ -678,19 +639,6 @@ public DepartmentSingleRespDto createDepartment(CreateDepartmentReqDto reqDto) { return deserialize(response, DepartmentSingleRespDto.class); } - /** - * @summary 创建部门 - * @description 通过组织 code、部门名称、父部门 ID,创建部门,可以设置多种参数。 - **/ - public DepartmentSingleRespDto createDepartment1(CreateDepartmentReqDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/create-department"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, DepartmentSingleRespDto.class); - } - /** * @summary 修改部门 * @description 通过组织 code、部门 ID,修改部门,可以设置多种参数。 @@ -704,19 +652,6 @@ public DepartmentSingleRespDto updateDepartment(UpdateDepartmentReqDto reqDto) { return deserialize(response, DepartmentSingleRespDto.class); } - /** - * @summary 修改部门 - * @description 通过组织 code、部门 ID,修改部门,可以设置多种参数。 - **/ - public DepartmentSingleRespDto updateDepartment1(UpdateDepartmentReqDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/update-department"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, DepartmentSingleRespDto.class); - } - /** * @summary 删除部门 * @description 通过组织 code、部门 ID,删除部门。 @@ -730,19 +665,6 @@ public IsSuccessRespDto deleteDepartment(DeleteDepartmentReqDto reqDto) { return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 删除部门 - * @description 通过组织 code、部门 ID,删除部门。 - **/ - public IsSuccessRespDto deleteDepartment1(DeleteDepartmentReqDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/delete-department"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 搜索部门 * @description 通过组织 code、搜索关键词,搜索部门,可以搜索组织名称等。 @@ -783,19 +705,6 @@ public DepartmentPaginatedRespDto listChildrenDepartments(ListChildrenDepartment return deserialize(response, DepartmentPaginatedRespDto.class); } - /** - * @summary 获取子部门列表 - * @description 通过组织 code、部门 ID,获取子部门列表,可以选择获取自定义数据、虚拟组织等。 - **/ - public DepartmentPaginatedRespDto listChildrenDepartments1(ListChildrenDepartmentsDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-children-departments"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, DepartmentPaginatedRespDto.class); - } - /** * @summary 获取部门成员列表 * @description 通过组织 code、部门 ID、排序,获取部门成员列表,支持分页,可以选择获取自定义数据、identities 等。 @@ -809,19 +718,6 @@ public UserPaginatedRespDto listDepartmentMembers(ListDepartmentMembersDto reqDt return deserialize(response, UserPaginatedRespDto.class); } - /** - * @summary 获取部门成员列表 - * @description 通过组织 code、部门 ID、排序,获取部门成员列表,支持分页,可以选择获取自定义数据、identities 等。 - **/ - public UserPaginatedRespDto listDepartmentMembers1(ListDepartmentMembersDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-department-members"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, UserPaginatedRespDto.class); - } - /** * @summary 获取部门直属成员 ID 列表 * @description 通过组织 code、部门 ID,获取部门直属成员 ID 列表。 @@ -1253,19 +1149,6 @@ public ExtIdpListPaginatedRespDto listExtIdp(ListExtIdpDto reqDto) { return deserialize(response, ExtIdpListPaginatedRespDto.class); } - /** - * @summary 获取身份源列表 - * @description 获取身份源列表,可以指定 租户 ID 筛选。 - **/ - public ExtIdpListPaginatedRespDto listExtIdp1(ListExtIdpDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-ext-idp"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, ExtIdpListPaginatedRespDto.class); - } - /** * @summary 获取身份源详情 * @description 通过 身份源 ID,获取身份源详情,可以指定 租户 ID 筛选。 @@ -1279,19 +1162,6 @@ public ExtIdpDetailSingleRespDto getExtIdp(GetExtIdpDto reqDto) { return deserialize(response, ExtIdpDetailSingleRespDto.class); } - /** - * @summary 获取身份源详情 - * @description 通过 身份源 ID,获取身份源详情,可以指定 租户 ID 筛选。 - **/ - public ExtIdpDetailSingleRespDto getExtIdp1(GetExtIdpDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/get-ext-idp"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, ExtIdpDetailSingleRespDto.class); - } - /** * @summary 创建身份源 * @description 创建身份源,可以设置身份源名称、连接类型、租户 ID 等。 @@ -1305,19 +1175,6 @@ public ExtIdpSingleRespDto createExtIdp(CreateExtIdpDto reqDto) { return deserialize(response, ExtIdpSingleRespDto.class); } - /** - * @summary 创建身份源 - * @description 创建身份源,可以设置身份源名称、连接类型、租户 ID 等。 - **/ - public ExtIdpSingleRespDto createExtIdp1(CreateExtIdpDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/create-ext-idp"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, ExtIdpSingleRespDto.class); - } - /** * @summary 更新身份源配置 * @description 更新身份源配置,可以设置身份源 ID 与 名称。 @@ -1331,19 +1188,6 @@ public ExtIdpSingleRespDto updateExtIdp(UpdateExtIdpDto reqDto) { return deserialize(response, ExtIdpSingleRespDto.class); } - /** - * @summary 更新身份源配置 - * @description 更新身份源配置,可以设置身份源 ID 与 名称。 - **/ - public ExtIdpSingleRespDto updateExtIdp1(UpdateExtIdpDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/update-ext-idp"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, ExtIdpSingleRespDto.class); - } - /** * @summary 删除身份源 * @description 通过身份源 ID,删除身份源。 @@ -1357,19 +1201,6 @@ public IsSuccessRespDto deleteExtIdp(DeleteExtIdpDto reqDto) { return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 删除身份源 - * @description 通过身份源 ID,删除身份源。 - **/ - public IsSuccessRespDto deleteExtIdp1(DeleteExtIdpDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/delete-ext-idp"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 在某个已有身份源下创建新连接 * @description 在某个已有身份源下创建新连接,可以设置身份源图标、是否只支持登录等。 @@ -1383,19 +1214,6 @@ public ExtIdpConnDetailSingleRespDto createExtIdpConn(CreateExtIdpConnDto reqDto return deserialize(response, ExtIdpConnDetailSingleRespDto.class); } - /** - * @summary 在某个已有身份源下创建新连接 - * @description 在某个已有身份源下创建新连接,可以设置身份源图标、是否只支持登录等。 - **/ - public ExtIdpConnDetailSingleRespDto createExtIdpConn1(CreateExtIdpConnDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/create-ext-idp-conn"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, ExtIdpConnDetailSingleRespDto.class); - } - /** * @summary 更新身份源连接 * @description 更新身份源连接,可以设置身份源图标、是否只支持登录等。 @@ -1409,19 +1227,6 @@ public ExtIdpConnDetailSingleRespDto updateExtIdpConn(UpdateExtIdpConnDto reqDto return deserialize(response, ExtIdpConnDetailSingleRespDto.class); } - /** - * @summary 更新身份源连接 - * @description 更新身份源连接,可以设置身份源图标、是否只支持登录等。 - **/ - public ExtIdpConnDetailSingleRespDto updateExtIdpConn1(UpdateExtIdpConnDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/update-ext-idp-conn"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, ExtIdpConnDetailSingleRespDto.class); - } - /** * @summary 删除身份源连接 * @description 通过身份源连接 ID,删除身份源连接。 @@ -1435,19 +1240,6 @@ public IsSuccessRespDto deleteExtIdpConn(DeleteExtIdpConnDto reqDto) { return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 删除身份源连接 - * @description 通过身份源连接 ID,删除身份源连接。 - **/ - public IsSuccessRespDto deleteExtIdpConn1(DeleteExtIdpConnDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/delete-ext-idp-conn"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 身份源连接开关 * @description 身份源连接开关,可以打开或关闭身份源连接。 @@ -1461,19 +1253,6 @@ public IsSuccessRespDto changeExtIdpConnState(ChangeExtIdpConnStateDto reqDto) { return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 身份源连接开关 - * @description 身份源连接开关,可以打开或关闭身份源连接。 - **/ - public IsSuccessRespDto changeExtIdpConnState1(ChangeExtIdpConnStateDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/change-ext-idp-conn-state"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 租户关联身份源 * @description 租户可以关联或取消关联身份源连接。 @@ -1488,20 +1267,6 @@ public IsSuccessRespDto changeExtIdpConnAssociationState( return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 租户关联身份源 - * @description 租户可以关联或取消关联身份源连接。 - **/ - public IsSuccessRespDto changeExtIdpConnAssociationState1( - ChangeExtIdpAssociationStateDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/change-ext-idp-conn-association-state"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 租户控制台获取身份源列表 * @description 在租户控制台内获取身份源列表,可以根据 应用 ID 筛选。 @@ -1515,19 +1280,6 @@ public ExtIdpListPaginatedRespDto listTenantExtIdp(ListTenantExtIdpDto reqDto) { return deserialize(response, ExtIdpListPaginatedRespDto.class); } - /** - * @summary 租户控制台获取身份源列表 - * @description 在租户控制台内获取身份源列表,可以根据 应用 ID 筛选。 - **/ - public ExtIdpListPaginatedRespDto listTenantExtIdp1(ListTenantExtIdpDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-tenant-ext-idp"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, ExtIdpListPaginatedRespDto.class); - } - /** * @summary 身份源下应用的连接详情 * @description 在身份源详情页获取应用的连接情况 @@ -1541,19 +1293,6 @@ public ExtIdpListPaginatedRespDto extIdpConnStateByApps(ExtIdpConnAppsDto reqDto return deserialize(response, ExtIdpListPaginatedRespDto.class); } - /** - * @summary 身份源下应用的连接详情 - * @description 在身份源详情页获取应用的连接情况 - **/ - public ExtIdpListPaginatedRespDto extIdpConnStateByApps1(ExtIdpConnAppsDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/ext-idp-conn-apps"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, ExtIdpListPaginatedRespDto.class); - } - /** * @summary 获取用户内置字段列表 * @description 获取用户内置的字段列表 @@ -1697,19 +1436,6 @@ public CommonResourcePaginatedRespDto listCommonResource(ListCommonResourceDto r return deserialize(response, CommonResourcePaginatedRespDto.class); } - /** - * @summary 分页获取常规资源列表 - * @description 根据筛选条件,分页获取常规资源详情列表。 - **/ - public CommonResourcePaginatedRespDto listCommonResource1(ListCommonResourceDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-common-resource"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, CommonResourcePaginatedRespDto.class); - } - /** * @summary 分页获取资源列表 * @description 根据筛选条件,分页获取资源详情列表。 @@ -1723,19 +1449,6 @@ public ResourcePaginatedRespDto listResources(ListResourcesDto reqDto) { return deserialize(response, ResourcePaginatedRespDto.class); } - /** - * @summary 分页获取资源列表 - * @description 根据筛选条件,分页获取资源详情列表。 - **/ - public ResourcePaginatedRespDto listResources1(ListResourcesDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-resources"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, ResourcePaginatedRespDto.class); - } - /** * @summary 修改资源 * @description 修改资源,可以设置资源的描述、定义的操作类型、URL 标识等。 @@ -1803,19 +1516,6 @@ public IsSuccessRespDto associateTenantResource(AssociateTenantResourceDto reqDt return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 关联/取消关联应用资源到租户 - * @description 通过资源唯一标识以及权限分组,关联或取消关联资源到租户 - **/ - public IsSuccessRespDto associateTenantResource1(AssociateTenantResourceDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/associate-tenant-resource"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 创建权限分组 * @description 创建权限分组,可以设置权限分组名称、Code 和描述信息。 @@ -1946,19 +1646,6 @@ public IsSuccessRespDto authorizeResources(AuthorizeResourcesDto reqDto) { return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 授权资源 - * @description 将一个/多个资源授权给用户、角色、分组、组织机构等主体,且可以分别指定不同的操作权限。 - **/ - public IsSuccessRespDto authorizeResources1(AuthorizeResourcesDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/authorize-resources"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 获取某个主体被授权的资源列表 * @description 根据筛选条件,获取某个主体被授权的资源列表。 @@ -1986,19 +1673,6 @@ public IsActionAllowedRespDtp isActionAllowed(IsActionAllowedDto reqDto) { return deserialize(response, IsActionAllowedRespDtp.class); } - /** - * @summary 判断用户是否对某个资源的某个操作有权限 - * @description 判断用户是否对某个资源的某个操作有权限。 - **/ - public IsActionAllowedRespDtp isActionAllowed1(IsActionAllowedDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/is-action-allowed"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsActionAllowedRespDtp.class); - } - /** * @summary 获取资源被授权的主体 * @description 获取资源被授权的主体 @@ -2263,19 +1937,6 @@ public ApplicationSingleRespDto getApplication(GetApplicationDto reqDto) { return deserialize(response, ApplicationSingleRespDto.class); } - /** - * @summary 获取应用详情 - * @description 通过应用 ID,获取应用详情。 - **/ - public ApplicationSingleRespDto getApplication1(GetApplicationDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/get-application"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, ApplicationSingleRespDto.class); - } - /** * @summary 获取应用列表 * @description 获取应用列表 @@ -2303,20 +1964,6 @@ public ApplicationSimpleInfoSingleRespDto getApplicationSimpleInfo( return deserialize(response, ApplicationSimpleInfoSingleRespDto.class); } - /** - * @summary 获取应用简单信息 - * @description 通过应用 ID,获取应用简单信息。 - **/ - public ApplicationSimpleInfoSingleRespDto getApplicationSimpleInfo1( - GetApplicationSimpleInfoDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/get-application-simple-info"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, ApplicationSimpleInfoSingleRespDto.class); - } - /** * @summary 获取应用简单信息列表 * @description 获取应用简单信息列表 @@ -2438,19 +2085,6 @@ public IsSuccessRespDto authorizeApplicationAccess(AuthorizeApplicationAccessDto return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 授权应用访问权限 - * @description 给用户、分组、组织或角色授权应用访问权限,如果用户、分组、组织或角色不存在,则跳过,进行下一步授权,不返回报错 - **/ - public IsSuccessRespDto authorizeApplicationAccess1(AuthorizeApplicationAccessDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/authorize-application-access"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 删除应用访问授权记录 * @description 取消给用户、分组、组织或角色的应用访问权限授权,如果传入数据不存在,则返回数据不报错处理。 @@ -2464,19 +2098,6 @@ public IsSuccessRespDto revokeApplicationAccess(RevokeApplicationAccessDto reqDt return deserialize(response, IsSuccessRespDto.class); } - /** - * @summary 删除应用访问授权记录 - * @description 取消给用户、分组、组织或角色的应用访问权限授权,如果传入数据不存在,则返回数据不报错处理。 - **/ - public IsSuccessRespDto revokeApplicationAccess1(RevokeApplicationAccessDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/revoke-application-access"); - config.setBody(reqDto); - config.setMethod("POST"); - String response = request(config); - return deserialize(response, IsSuccessRespDto.class); - } - /** * @summary 检测域名是否可用 * @description 检测域名是否可用于创建新应用或更新应用域名 @@ -2504,19 +2125,7 @@ public TenantApplicationListPaginatedRespDto listTenantApplications( return deserialize(response, TenantApplicationListPaginatedRespDto.class); } - /** - * @summary 获取租户应用列表 - * @description 获取应用列表,可以指定 租户 ID 筛选。 - **/ - public TenantApplicationListPaginatedRespDto listTenantApplications1( - ListTenantApplicationsDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-tenant-applications"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, TenantApplicationListPaginatedRespDto.class); - } + /** * @summary 更新应用登录页配置 From 389de3d4552347133798b228731c46b3c3e12523 Mon Sep 17 00:00:00 2001 From: yujiale Date: Tue, 10 Jan 2023 17:58:31 +0800 Subject: [PATCH 2/2] fix:ssss --- .../authing/sdk/java/client/ManagementClient.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/main/java/cn/authing/sdk/java/client/ManagementClient.java b/src/main/java/cn/authing/sdk/java/client/ManagementClient.java index d0dd0754..dc3b9427 100644 --- a/src/main/java/cn/authing/sdk/java/client/ManagementClient.java +++ b/src/main/java/cn/authing/sdk/java/client/ManagementClient.java @@ -2125,19 +2125,6 @@ public TenantApplicationListPaginatedRespDto listTenantApplications( return deserialize(response, TenantApplicationListPaginatedRespDto.class); } - /** - * @summary 获取租户应用列表 - * @description 获取应用列表,可以指定 租户 ID 筛选。 - **/ - public TenantApplicationListPaginatedRespDto listTenantApplications1( - ListTenantApplicationsDto reqDto) { - AuthingRequestConfig config = new AuthingRequestConfig(); - config.setUrl("/api/v3/list-tenant-applications"); - config.setBody(reqDto); - config.setMethod("GET"); - String response = request(config); - return deserialize(response, TenantApplicationListPaginatedRespDto.class); - } /** * @summary 更新应用登录页配置