Token 관리자 관리
1. 사용자 추가
서비스 사용자(토큰 관리자)를 추가합니다.
기본 정보
URI | /user/info |
---|---|
METHOD | PUT |
Content-Type | application/json |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
body | CreateUserDto | string | userId | M | gildong.hong | - | 사용자 ID |
string | userName | M | 홍길동 | - | 사용자 이름 | ||
string | organization | O | 인력팀 | - | 사용자 조직 | ||
string[] | userRoles | O | [ TOKEN_ADMIN ] | - | 사용자 권한 목록 |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
User | string | userId | M | gildong.hong | 사용자 ID |
string | userName | M | 홍길동 | 사용자 이름 | |
string | organization | O | 인력팀 | 사용자 조직 | |
enum | userStatus | M | ACTIVATED | 사용자 상태 | |
string | createdAt | M | 2021-09-01T00:01:02Z | 생성 일시 | |
UserRole | userRoles | O | 사용자 권한 목록 | ||
UserEoa | userEoas | O | 사용자 owned address 목록 |
Request Sample Code
curl -X 'POST' \ 'https://{{USER-MANAGEMENT-URL}}/user/info' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' \ -d '{ "userId": 24, "userName": 1, "organization": "test-admin1", "userRoles": [ "TOKEN_ADMIN" ] }' |
Response Sample Code
{ "userId": "gildong.hong", "userName": "홍길동", "organization": "인력팀", "status": "ACTIVATED", "createdAt": "2021-09-07T05:04:50.000Z", "createdBy": null, "userEoas": [ { "ownedAddress": "0xfa0D8d66c557c28E6FF0d26799Be306dEA6F97d1", "userId": "gildong.hong", "tempId": "gildong.hong", "alias": "사용자 등록에 의한 자동 생성", "createdAt": "2021-09-07T05:04:50.000Z" } ], "userRoles": [ { "userId": "gildong.hong", "role": "ROLE_TOKEN_ADMIN" } ] } |
2. 사용자 목록 조회
서비스 사용자(토큰 관리자) 목록을 조회합니다.
기본 정보
URI | /user/info |
---|---|
METHOD | PUT |
Content-Type | application/json |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
query | string | userId | O | gildong.hong | - | 사용자 ID | |
string | userName | O | 홍길동 | - | 사용자 이름 | ||
string | organization | O | 인력팀 | - | 사용자 조직, 부분 조회 허용 | ||
enum | status | O | ACTIVATED | - | 사용자 상태 | ||
string | createdBy | O | admin | - | 작업자 ID | ||
number | skip | O | 0 | 0 | skip row count | ||
number | take | O | 10 | 10 | take row count | ||
string | sort | O | organization | - | 정렬 대상 컬럼명 | ||
string | order | O | DESC | - | 정렬 순서 |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
Pagenate<User> | number | total | M | 18 | 대상 전체 수 |
number | skip | M | 0 | skip row count | |
number | take | M | 10 | take row count | |
number | count | M | 5 | current row count | |
User[] | contents | O | [ ] | 사용자 정보 |
Request Sample Code
curl -X 'GET' \ 'https://{{USER-MANAGEMENT-URL}}/user/info' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' }' |
Response Sample Code
{ "total": 18, "skip": 0, "take": 2, "contents": [ { "userId": "admin1", "userName": "Giduk Kim", "organization": "Team", "status": "ACTIVATED", "createdAt": "2021-09-06T09:46:26.000Z" }, { "userId": "admin6", "userName": "Giduk Kim", "organization": "Team", "status": "ACTIVATED", "createdAt": "2021-09-06T09:28:57.000Z" } ] } |
3. 사용자 상세 정보 조회
서비스 사용자(토큰 관리자)의 상세 정보를 조회합니다.
기본 정보
URI | /user/info/{userId} |
---|---|
METHOD | GET |
Content-Type | - |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
path variable | string | userId | M | gildong.hong | - | 사용자 ID |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
User | string | userId | M | gildong.hong | 사용자 ID |
string | userName | M | 홍길동 | 사용자 이름 | |
string | organization | O | 인력팀 | 사용자 조직 | |
enum | userStatus | M | ACTIVATED | 사용자 상태 | |
string | createdAt | M | 2021-09-01T00:01:02Z | 생성 일시 | |
UserRole | userRoles | O | 사용자 권한 목록 | ||
UserEoa | userEoas | O | 사용자 owned address 목록 |
Request Sample Code
curl -X 'GET' \ 'https://{{USER-MANAGEMENT-URL}}/user/info/gildong.hong' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' }' |
Response Sample Code
{ "userId": "gildong.hong", "userName": "홍길동", "organization": "인력팀", "status": "ACTIVATED", "createdAt": "2021-09-07T05:04:50.000Z", "createdBy": null, "userEoas": [ { "ownedAddress": "0xfa0D8d66c557c28E6FF0d26799Be306dEA6F97d1", "userId": "gildong.hong", "tempId": "gildong.hong", "alias": "사용자 등록에 의한 자동 생성", "createdAt": "2021-09-07T05:04:50.000Z" } ], "userRoles": [ { "userId": "gildong.hong", "role": "ROLE_TOKEN_ADMIN" } ] } |
4. 사용자 정보 변경
서비스 사용자(토큰 관리자)의 정보를 변경합니다.
기본 정보
URI | /user/info/{userId} |
---|---|
METHOD | PATCH |
Content-Type | application/json |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
path variable | string | userId | M | gildong.hong | - | 변경할 대상 사용자 ID | |
Body | string | userName | O | 변경된홍길동 | - | 변경할 사용자 이름 | |
string | userName | O | 변경된부서명 | - | 변경할 사용자 조직 |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
User | string | userId | M | gildong.hong | 사용자 ID |
string | userName | M | 홍길동 | 사용자 이름 | |
string | organization | O | 인력팀 | 사용자 조직 | |
enum | userStatus | M | ACTIVATED | 사용자 상태 | |
string | createdAt | M | 2021-09-01T00:01:02Z | 생성 일시 |
Request Sample Code
curl -X 'PATCH' \ 'https://{{USER-MANAGEMENT-URL}}/user/info/gildong.hong' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' \ -d '{ "userName": "변경된홍길동", "organization": "변경된부서명" }' |
Response Sample Code
{ "userId": "gildong.hong", "userName": "변경된홍길동", "organization": "변경된부서명", "status": "ACTIVATED", "createdAt": "2021-09-07T05:04:50.000Z" } |
5. 사용자 삭제
서비스 사용자(토큰 관리자)를 삭제합니다. 사용자의 상태를 CLOSED로 변경한 뒤 일정시간 경괴 후 삭제 절차를 수행합니다.
기본 정보
URI | /user/info/{userId} |
---|---|
METHOD | DELETE |
Content-Type | - |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
path variable | string | userId | M | gildong.hong | - | 변경할 대상 사용자 ID |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
User | string | userId | M | gildong.hong | 사용자 ID |
string | userName | M | 홍길동 | 사용자 이름 | |
string | organization | O | 인력팀 | 사용자 조직 | |
enum | userStatus | M | ACTIVATED | 사용자 상태 | |
string | createdAt | M | 2021-09-01T00:01:02Z | 생성 일시 |
Request Sample Code
curl -X 'DELETE' \ 'https://{{USER-MANAGEMENT-URL}}/user/info/gildong.hong' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' }' |
Response Sample Code
{ "userId": "gildong.hong", "userName": "변경된홍길동", "organization": "변경된부서명", "status": "CLOSED", "createdAt": "2021-09-07T05:04:50.000Z" } |
사용자 EOA 관리
1. 사용자의 EOA를 발급
서비스 사용자(토큰 관리자)의 EOA를 발급합니다.
기본 정보
URI | /user/eoa |
---|---|
METHOD | PUT |
Content-Type | application/json |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
body | CreateUserEoaDto | string | userId | M | gildong.hong | - | 사용자 ID |
string | alias | M | 테스트용 | - | EOA 별칭 |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
UserEoa | string | ownedAddress | M | gildong.hong | 사용자 owned address |
string | userId | M | gildong.hong | 사용자 이름 | |
string | tempId | M | d14e31e6-acb9-408f-868a-8036c9789c25 | Server-side Key Management Service용 가상 ID, 서버에서 생성 | |
alias | alias | O | 테스트용 | EOA 별칭 | |
string | createdAt | M | 2021-09-01T00:01:02Z | 생성 일시 |
Request Sample Code
curl -X 'PUT' \ 'https://{{USER-MANAGEMENT-URL}}/user/eoa' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' \ -d '{ "userId": "gildong.hong", "alias": "테스트용" }' |
Response Sample Code
{ "ownedAddress": "0x011B7196384cc62D171e032D37b45D917b878D8d", "userId": "gildong.hong", "tempId": "d14e31e6-acb9-408f-868a-8036c9789c25", "alias": "테스트용", "createdAt": "2021-09-07T05:37:15.000Z" } |
2. 사용자별 EOA 목록 조회
서비스 사용자별 EOA 목록을 조회합니다.
기본 정보
URI | /user/eoa |
---|---|
METHOD | GET |
Content-Type | - |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
query | string | ownedAddress | O | gildong.hong | - | 사용자 owned address | |
string | userId | O | 0x011B7196384cc62D171e032D37b45D917b878D8d | - | 사용자 ID | ||
string | tempId | O | d14e31e6-acb9-408f-868a-8036c9789c25 | - | Server-side Key Management Service용 가상 ID | ||
string | alias | O | 테스트용 | - | 사용자 EOA 별칭 | ||
number | skip | O | 0 | 0 | skip row count | ||
number | take | O | 10 | 10 | take row count | ||
string | sort | O | organization | - | 정렬 대상 컬럼명 | ||
string | order | O | DESC | - | 정렬 순서 |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
Pagenate<UserEoa> | number | total | M | 18 | 대상 전체 수 |
number | skip | M | 0 | skip row count | |
number | take | M | 10 | take row count | |
number | count | M | 5 | current row count | |
UserEoa[] | contents | O | [ ] | 사용자 EOA 목록 |
Request Sample Code
curl -X 'GET' \ 'https://{{USER-MANAGEMENT-URL}}/user/eoa' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' }' |
Response Sample Code
{ "total": 2, "skip": 0, "take": 2 "contents": [ { "ownedAddress": "0x011B7196384cc62D171e032D37b45D917b878D8d", "userId": "gildong.hong", "tempId": "d14e31e6-acb9-408f-868a-8036c9789c25", "alias": "테스트용", "createdAt": "2021-09-07T05:37:15.000Z" }, { "ownedAddress": "0xfa0D8d66c557c28E6FF0d26799Be306dEA6F97d1", "userId": "gildong.hong", "tempId": "gildong.hong", "alias": "사용자 등록에 의한 자동 생성", "createdAt": "2021-09-07T05:04:50.000Z" } ] } |
3. 사용자 EOA 삭제
서비스 사용자(토큰 관리자)의 EOA를 삭제합니다.
기본 정보
URI | /user/eoa |
---|---|
METHOD | DELETE |
Content-Type | - |
Role | ADMIN, TOKEN_ADMIN |
Request Parameters
Parameter Type | Type | Name | M / C / O | Example | Default | Description | |
---|---|---|---|---|---|---|---|
query | string | userId | M | gildong.hong | - | 사용자 ID | |
string | ownedAddress | M | 0x011B7196384cc62D171e032D37b45D917b878D8d | - | 사용자의 owned address |
Response Parameter
Type | Name | M / C / O | Example | Description | |
---|---|---|---|---|---|
UserEoa | string | ownedAddress | M | gildong.hong | 사용자 owned address |
string | userId | M | gildong.hong | 사용자 이름 | |
string | tempId | M | d14e31e6-acb9-408f-868a-8036c9789c25 | Server-side Key Management Service용 가상 ID, 서버에서 생성 | |
alias | alias | O | 테스트용 | EOA 별칭 | |
string | createdAt | M | 2021-09-01T00:01:02Z | 생성 일시 |
Request Sample Code
curl -X 'DELETE' \ 'https://{{USER-MANAGEMENT-URL}}/user/eoa?userId=gildong.hong&ownedAddress=0x011B7196384cc62D171e032D37b45D917b878D8d' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {{ACCESS-TOKEN}}' }' |
Response Sample Code
{ "ownedAddress": "0x011B7196384cc62D171e032D37b45D917b878D8d", "userId": "gildong.hong", "tempId": "d14e31e6-acb9-408f-868a-8036c9789c25", "alias": "테스트용", "createdAt": "2021-09-07T05:37:15.000Z" } |