Skip to content

Commit

Permalink
PIN-5339 - Add multiple users to client and producer keychain (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carminepo2 authored Oct 7, 2024
1 parent 69690a9 commit 516d558
Show file tree
Hide file tree
Showing 10 changed files with 480 additions and 378 deletions.
206 changes: 119 additions & 87 deletions packages/api-clients/open-api/authorizationApi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,20 +338,19 @@ paths:
"/clients/{clientId}/users":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
- name: clientId
in: path
description: ID of Client the users belong to
required: true
schema:
type: string
format: uuid
get:
tags:
- client
summary: List client users
description: List client users
operationId: getClientUsers
parameters:
- name: clientId
in: path
description: ID of Client the users belong to
required: true
schema:
type: string
format: uuid
responses:
"200":
description: Request succeed
Expand All @@ -377,32 +376,35 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Problem"
"/clients/{clientId}/users/{userId}":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
- name: clientId
in: path
description: The Client id
required: true
schema:
type: string
format: uuid
- name: userId
in: path
description: The identifier of the user between the security user and the consumer
required: true
schema:
type: string
format: uuid
delete:
description: Removes a user from a Client
post:
tags:
- client
summary: Remove a user from a Client
operationId: removeUser
summary: Add users to a Client
operationId: addUsers
requestBody:
required: true
description: List of users ids to add
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- userIds
properties:
userIds:
type: array
minItems: 1
items:
type: string
format: uuid
responses:
"204":
description: User removed
"200":
description: Users added
content:
application/json:
schema:
$ref: "#/components/schemas/Client"
"400":
description: Bad Request
content:
Expand All @@ -422,23 +424,38 @@ paths:
schema:
$ref: "#/components/schemas/Problem"
"404":
description: Client or User not found
description: Missing Required Information
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
post:
description: Add users to a Client
"/clients/{clientId}/users/{userId}":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
- name: clientId
in: path
description: The Client id
required: true
schema:
type: string
format: uuid
- name: userId
in: path
description: The identifier of the user between the security user and the consumer
required: true
schema:
type: string
format: uuid
delete:
description: Removes a user from a Client
tags:
- client
summary: Add a user to a Client
operationId: addUser
summary: Remove a user from a Client
operationId: removeUser
responses:
"200":
description: User added
content:
application/json:
schema:
$ref: "#/components/schemas/Client"
"204":
description: User removed
"400":
description: Bad Request
content:
Expand All @@ -458,12 +475,11 @@ paths:
schema:
$ref: "#/components/schemas/Problem"
"404":
description: Missing Required Information
description: Client or User not found
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
description: Add a user to a Client
"/clients/{clientId}/keys":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
Expand Down Expand Up @@ -1045,20 +1061,19 @@ paths:
"/producerKeychains/{producerKeychainId}/users":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
- name: producerKeychainId
in: path
description: ID of the producer keychain the users belong to
required: true
schema:
type: string
format: uuid
get:
tags:
- producerKeychain
summary: List Producer Keychain users
description: List Producer Keychain users
operationId: getProducerKeychainUsers
parameters:
- name: producerKeychainId
in: path
description: ID of Producer Keychain the users belong to
required: true
schema:
type: string
format: uuid
operationId: getProducerKeychainUsers
responses:
"200":
description: Request succeed
Expand All @@ -1084,32 +1099,35 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Problem"
"/producerKeychains/{producerKeychainId}/users/{userId}":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
- name: producerKeychainId
in: path
description: The Producer Keychain id
required: true
schema:
type: string
format: uuid
- name: userId
in: path
description: The identifier of the user between the security user and the consumer
required: true
schema:
type: string
format: uuid
delete:
description: Removes a user from a Producer Keychain
post:
tags:
- producerKeychain
summary: Remove a user from a Producer Keychain
operationId: removeProducerKeychainUser
summary: Add users to a Producer Keychain
operationId: addProducerKeychainUsers
requestBody:
required: true
description: List of users ids to add
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- userIds
properties:
userIds:
type: array
minItems: 1
items:
type: string
format: uuid
responses:
"204":
description: User removed
"200":
description: Users added
content:
application/json:
schema:
$ref: "#/components/schemas/ProducerKeychain"
"400":
description: Bad Request
content:
Expand All @@ -1129,23 +1147,38 @@ paths:
schema:
$ref: "#/components/schemas/Problem"
"404":
description: Producer Keychain or User not found
description: Missing Required Information
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
post:
description: Add users to a Producer Keychain
"/producerKeychains/{producerKeychainId}/users/{userId}":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
- name: producerKeychainId
in: path
description: The Producer Keychain id
required: true
schema:
type: string
format: uuid
- name: userId
in: path
description: The identifier of the user between the security user and the consumer
required: true
schema:
type: string
format: uuid
delete:
description: Removes a user from a Producer Keychain
tags:
- producerKeychain
summary: Add a user to a Producer Keychain
operationId: addProducerKeychainUser
summary: Remove a user from a Producer Keychain
operationId: removeProducerKeychainUser
responses:
"200":
description: User added
content:
application/json:
schema:
$ref: "#/components/schemas/ProducerKeychain"
"204":
description: User removed
"400":
description: Bad Request
content:
Expand All @@ -1165,12 +1198,11 @@ paths:
schema:
$ref: "#/components/schemas/Problem"
"404":
description: Missing Required Information
description: Producer Keychain or User not found
content:
application/json:
schema:
$ref: "#/components/schemas/Problem"
description: Add a user to a Producer Keychain
"/producerKeychains/{producerKeychainId}/keys":
parameters:
- $ref: "#/components/parameters/CorrelationIdHeader"
Expand Down
Loading

0 comments on commit 516d558

Please sign in to comment.