|
2 | 2 |
|
3 | 3 | import cn.authing.sdk.java.dto.*; |
4 | 4 |
|
| 5 | +import cn.authing.sdk.java.dto.*; |
| 6 | + |
5 | 7 | import java.util.HashMap; |
6 | 8 | import java.net.URI; |
7 | 9 | import java.net.URISyntaxException; |
@@ -37,6 +39,128 @@ public Object makeRequest(MakeRequestReqDto reqDto) { |
37 | 39 | return deserialize(response, Object.class); |
38 | 40 | } |
39 | 41 |
|
| 42 | + /** |
| 43 | + * @summary 岗位列表 |
| 44 | + * @description 岗位列表 |
| 45 | + **/ |
| 46 | + public PostPaginatedRespDto postList(ListPostDto reqDto) { |
| 47 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 48 | + config.setUrl("/api/v3/list-post"); |
| 49 | + config.setBody(reqDto); |
| 50 | + config.setMethod("GET"); |
| 51 | + String response = request(config); |
| 52 | + return deserialize(response, PostPaginatedRespDto.class); |
| 53 | + } |
| 54 | + /** |
| 55 | + * @summary 获取岗位 |
| 56 | + * @description 获取岗位 |
| 57 | + **/ |
| 58 | + public CreatePostDto getPost(GetPostDto reqDto) { |
| 59 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 60 | + config.setUrl("/api/v3/get-post"); |
| 61 | + config.setBody(reqDto); |
| 62 | + config.setMethod("GET"); |
| 63 | + String response = request(config); |
| 64 | + return deserialize(response, CreatePostDto.class); |
| 65 | + } |
| 66 | + /** |
| 67 | + * @deprecated |
| 68 | + * @summary 获取用户关联岗位 |
| 69 | + * @description 获取用户关联的所有岗位 |
| 70 | + **/ |
| 71 | + public PostListRespDto getUserPosts(GetUserPostsDto reqDto) { |
| 72 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 73 | + config.setUrl("/api/v3/get-user-posts"); |
| 74 | + config.setBody(reqDto); |
| 75 | + config.setMethod("GET"); |
| 76 | + String response = request(config); |
| 77 | + return deserialize(response, PostListRespDto.class); |
| 78 | + } |
| 79 | + /** |
| 80 | + * @deprecated |
| 81 | + * @summary 获取用户关联岗位 |
| 82 | + * @description 此接口只会返回一个岗位,已废弃,请使用 /api/v3/get-user-posts 接口 |
| 83 | + **/ |
| 84 | + public CreatePostDto getUserPost(GetUserPostDto reqDto) { |
| 85 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 86 | + config.setUrl("/api/v3/get-user-post"); |
| 87 | + config.setBody(reqDto); |
| 88 | + config.setMethod("GET"); |
| 89 | + String response = request(config); |
| 90 | + return deserialize(response, CreatePostDto.class); |
| 91 | + } |
| 92 | + /** |
| 93 | + * @summary 获取岗位信息 |
| 94 | + * @description 根据岗位 id 获取岗位详情 |
| 95 | + **/ |
| 96 | + public PostRespDto getPostById(GetPostByIdListDto reqDto) { |
| 97 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 98 | + config.setUrl("/api/v3/get-post-by-id"); |
| 99 | + config.setBody(reqDto); |
| 100 | + config.setMethod("POST"); |
| 101 | + String response = request(config); |
| 102 | + return deserialize(response, PostRespDto.class); |
| 103 | + } |
| 104 | + /** |
| 105 | + * @summary 创建岗位 |
| 106 | + * @description 创建岗位 |
| 107 | + **/ |
| 108 | + public CreatePostRespDto createPost(CreatePostDto reqDto) { |
| 109 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 110 | + config.setUrl("/api/v3/create-post"); |
| 111 | + config.setBody(reqDto); |
| 112 | + config.setMethod("POST"); |
| 113 | + String response = request(config); |
| 114 | + return deserialize(response, CreatePostRespDto.class); |
| 115 | + } |
| 116 | + /** |
| 117 | + * @summary 更新岗位信息 |
| 118 | + * @description 更新岗位信息 |
| 119 | + **/ |
| 120 | + public CreatePostRespDto updatePost(CreatePostDto reqDto) { |
| 121 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 122 | + config.setUrl("/api/v3/update-post"); |
| 123 | + config.setBody(reqDto); |
| 124 | + config.setMethod("POST"); |
| 125 | + String response = request(config); |
| 126 | + return deserialize(response, CreatePostRespDto.class); |
| 127 | + } |
| 128 | + /** |
| 129 | + * @summary 删除岗位 |
| 130 | + * @description 删除岗位 |
| 131 | + **/ |
| 132 | + public CommonResponseDto removePost(RemovePostDto reqDto) { |
| 133 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 134 | + config.setUrl("/api/v3/remove-post"); |
| 135 | + config.setBody(reqDto); |
| 136 | + config.setMethod("POST"); |
| 137 | + String response = request(config); |
| 138 | + return deserialize(response, CommonResponseDto.class); |
| 139 | + } |
| 140 | + /** |
| 141 | + * @summary 用户设置岗位 |
| 142 | + * @description 一次性给用户设置岗位:如果之前的岗位不在传入的列表中,会进行移除;如果有新增的岗位,会加入到新的岗位;如果不变,则不进行任何操作。 |
| 143 | + **/ |
| 144 | + public CommonResponseDto setUserPosts(SetUserPostsDto reqDto) { |
| 145 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 146 | + config.setUrl("/api/v3/set-user-posts"); |
| 147 | + config.setBody(reqDto); |
| 148 | + config.setMethod("POST"); |
| 149 | + String response = request(config); |
| 150 | + return deserialize(response, CommonResponseDto.class); |
| 151 | + } |
| 152 | + /** |
| 153 | + * @summary 用户关联岗位 |
| 154 | + * @description 用户关联岗位 |
| 155 | + **/ |
| 156 | + public CommonResponseDto userConnectionPost(UserConnectionPostDto reqDto) { |
| 157 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 158 | + config.setUrl("/api/v3/user-connection-post"); |
| 159 | + config.setBody(reqDto); |
| 160 | + config.setMethod("POST"); |
| 161 | + String response = request(config); |
| 162 | + return deserialize(response, CommonResponseDto.class); |
| 163 | + } |
40 | 164 | /** |
41 | 165 | * @summary 数据对象高级搜索 |
42 | 166 | * @description 数据对象高级搜索 |
@@ -422,138 +546,40 @@ public CommonResponseDto importModel(ImportMetadataDto reqDto) { |
422 | 546 | return deserialize(response, CommonResponseDto.class); |
423 | 547 | } |
424 | 548 | /** |
425 | | - * @summary UEBA 上传 |
426 | | - * @description UEBA 上传 |
| 549 | + * @summary 获取全部数据对象数据 |
| 550 | + * @description 获取全部数据对象数据 |
427 | 551 | **/ |
428 | | - public CreateUEBARespDto capture(CreateUEBADto reqDto) { |
| 552 | + public FunctionModelValueListResDto getAllMetadata(GetAllRowDto reqDto) { |
429 | 553 | AuthingRequestConfig config = new AuthingRequestConfig(); |
430 | | - config.setUrl("/api/v3/metadata/ueba/capture"); |
| 554 | + config.setUrl("/api/v3/metadata/get-all-metadata"); |
431 | 555 | config.setBody(reqDto); |
432 | 556 | config.setMethod("POST"); |
433 | 557 | String response = request(config); |
434 | | - return deserialize(response, CreateUEBARespDto.class); |
435 | | - } |
436 | | - /** |
437 | | - * @summary 岗位列表 |
438 | | - * @description 岗位列表 |
439 | | - **/ |
440 | | - public PostPaginatedRespDto postList(ListPostDto reqDto) { |
441 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
442 | | - config.setUrl("/api/v3/list-post"); |
443 | | - config.setBody(reqDto); |
444 | | - config.setMethod("GET"); |
445 | | - String response = request(config); |
446 | | - return deserialize(response, PostPaginatedRespDto.class); |
447 | | - } |
448 | | - /** |
449 | | - * @summary 获取岗位 |
450 | | - * @description 获取岗位 |
451 | | - **/ |
452 | | - public CreatePostDto getPost(GetPostDto reqDto) { |
453 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
454 | | - config.setUrl("/api/v3/get-post"); |
455 | | - config.setBody(reqDto); |
456 | | - config.setMethod("GET"); |
457 | | - String response = request(config); |
458 | | - return deserialize(response, CreatePostDto.class); |
459 | | - } |
460 | | - /** |
461 | | - * @deprecated |
462 | | - * @summary 获取用户关联岗位 |
463 | | - * @description 获取用户关联的所有岗位 |
464 | | - **/ |
465 | | - public PostListRespDto getUserPosts(GetUserPostsDto reqDto) { |
466 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
467 | | - config.setUrl("/api/v3/get-user-posts"); |
468 | | - config.setBody(reqDto); |
469 | | - config.setMethod("GET"); |
470 | | - String response = request(config); |
471 | | - return deserialize(response, PostListRespDto.class); |
| 558 | + return deserialize(response, FunctionModelValueListResDto.class); |
472 | 559 | } |
473 | 560 | /** |
474 | | - * @deprecated |
475 | | - * @summary 获取用户关联岗位 |
476 | | - * @description 此接口只会返回一个岗位,已废弃,请使用 /api/v3/get-user-posts 接口 |
| 561 | + * @summary 获取行关联数据 |
| 562 | + * @description 获取行关联数据 |
477 | 563 | **/ |
478 | | - public CreatePostDto getUserPost(GetUserPostDto reqDto) { |
| 564 | + public RelationValueListResDto getRelationDetails() { |
479 | 565 | AuthingRequestConfig config = new AuthingRequestConfig(); |
480 | | - config.setUrl("/api/v3/get-user-post"); |
481 | | - config.setBody(reqDto); |
| 566 | + config.setUrl("/api/v3/metadata/get-row-relation-details"); |
| 567 | + config.setBody(new Object()); |
482 | 568 | config.setMethod("GET"); |
483 | 569 | String response = request(config); |
484 | | - return deserialize(response, CreatePostDto.class); |
485 | | - } |
486 | | - /** |
487 | | - * @summary 获取岗位信息 |
488 | | - * @description 根据岗位 id 获取岗位详情 |
489 | | - **/ |
490 | | - public PostRespDto getPostById(GetPostByIdListDto reqDto) { |
491 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
492 | | - config.setUrl("/api/v3/get-post-by-id"); |
493 | | - config.setBody(reqDto); |
494 | | - config.setMethod("POST"); |
495 | | - String response = request(config); |
496 | | - return deserialize(response, PostRespDto.class); |
497 | | - } |
498 | | - /** |
499 | | - * @summary 创建岗位 |
500 | | - * @description 创建岗位 |
501 | | - **/ |
502 | | - public CreatePostRespDto createPost(CreatePostDto reqDto) { |
503 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
504 | | - config.setUrl("/api/v3/create-post"); |
505 | | - config.setBody(reqDto); |
506 | | - config.setMethod("POST"); |
507 | | - String response = request(config); |
508 | | - return deserialize(response, CreatePostRespDto.class); |
509 | | - } |
510 | | - /** |
511 | | - * @summary 更新岗位信息 |
512 | | - * @description 更新岗位信息 |
513 | | - **/ |
514 | | - public CreatePostRespDto updatePost(CreatePostDto reqDto) { |
515 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
516 | | - config.setUrl("/api/v3/update-post"); |
517 | | - config.setBody(reqDto); |
518 | | - config.setMethod("POST"); |
519 | | - String response = request(config); |
520 | | - return deserialize(response, CreatePostRespDto.class); |
521 | | - } |
522 | | - /** |
523 | | - * @summary 删除岗位 |
524 | | - * @description 删除岗位 |
525 | | - **/ |
526 | | - public CommonResponseDto removePost(RemovePostDto reqDto) { |
527 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
528 | | - config.setUrl("/api/v3/remove-post"); |
529 | | - config.setBody(reqDto); |
530 | | - config.setMethod("POST"); |
531 | | - String response = request(config); |
532 | | - return deserialize(response, CommonResponseDto.class); |
533 | | - } |
534 | | - /** |
535 | | - * @summary 用户设置岗位 |
536 | | - * @description 一次性给用户设置岗位:如果之前的岗位不在传入的列表中,会进行移除;如果有新增的岗位,会加入到新的岗位;如果不变,则不进行任何操作。 |
537 | | - **/ |
538 | | - public CommonResponseDto setUserPosts(SetUserPostsDto reqDto) { |
539 | | - AuthingRequestConfig config = new AuthingRequestConfig(); |
540 | | - config.setUrl("/api/v3/set-user-posts"); |
541 | | - config.setBody(reqDto); |
542 | | - config.setMethod("POST"); |
543 | | - String response = request(config); |
544 | | - return deserialize(response, CommonResponseDto.class); |
| 570 | + return deserialize(response, RelationValueListResDto.class); |
545 | 571 | } |
546 | 572 | /** |
547 | | - * @summary 用户关联岗位 |
548 | | - * @description 用户关联岗位 |
| 573 | + * @summary UEBA 上传 |
| 574 | + * @description UEBA 上传 |
549 | 575 | **/ |
550 | | - public CommonResponseDto userConnectionPost(UserConnectionPostDto reqDto) { |
| 576 | + public CreateUEBARespDto capture(CreateUEBADto reqDto) { |
551 | 577 | AuthingRequestConfig config = new AuthingRequestConfig(); |
552 | | - config.setUrl("/api/v3/user-connection-post"); |
| 578 | + config.setUrl("/api/v3/metadata/ueba/capture"); |
553 | 579 | config.setBody(reqDto); |
554 | 580 | config.setMethod("POST"); |
555 | 581 | String response = request(config); |
556 | | - return deserialize(response, CommonResponseDto.class); |
| 582 | + return deserialize(response, CreateUEBARespDto.class); |
557 | 583 | } |
558 | 584 | /** |
559 | 585 | * @summary 移除绑定(用户详情页) |
@@ -1612,7 +1638,7 @@ public IdentityListRespDto getUserIdentities(GetUserIdentitiesDto reqDto) { |
1612 | 1638 | } |
1613 | 1639 | /** |
1614 | 1640 | * @summary 获取用户角色列表 |
1615 | | - * @description 通过用户 ID,获取用户角色列表,可以选择所属权限分组 code、选择指定用户 ID 类型等。 |
| 1641 | + * @description 通过用户 ID,获取用户角色列表,可以选择所属权限分组 code、选择指定用户 ID 类型等。注意:如果不传 namespace,默认只会获取默认权限分组下面的角色! |
1616 | 1642 | **/ |
1617 | 1643 | public RolePaginatedRespDto getUserRoles(GetUserRolesDto reqDto) { |
1618 | 1644 | AuthingRequestConfig config = new AuthingRequestConfig(); |
@@ -2636,6 +2662,18 @@ public IsSuccessRespDto deleteAdminRolesBatch(DeleteAdminRoleDto reqDto) { |
2636 | 2662 | String response = request(config); |
2637 | 2663 | return deserialize(response, IsSuccessRespDto.class); |
2638 | 2664 | } |
| 2665 | + /** |
| 2666 | + * @summary 检测角色互斥 |
| 2667 | + * @description 检测一组角色是否存在互斥关系 |
| 2668 | + **/ |
| 2669 | + public CheckRoleMutualExclusionRespDto checkMutualExclusion(CheckRoleMutualExclusionReqDto reqDto) { |
| 2670 | + AuthingRequestConfig config = new AuthingRequestConfig(); |
| 2671 | + config.setUrl("/api/v3/check-role-mutual-exclusion"); |
| 2672 | + config.setBody(reqDto); |
| 2673 | + config.setMethod("POST"); |
| 2674 | + String response = request(config); |
| 2675 | + return deserialize(response, CheckRoleMutualExclusionRespDto.class); |
| 2676 | + } |
2639 | 2677 | /** |
2640 | 2678 | * @summary 获取身份源列表 |
2641 | 2679 | * @description 获取身份源列表,可以指定 租户 ID 筛选。 |
|
0 commit comments