openapi: 3.2.0 info: title: Folio Credentials API version: v1 description: 'Operations tagged credentials across 2 of this provider''s published API definitions: folio-mod-login-keycloak-openapi.json, folio-mod-login-keycloak-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: http://localhost:8081 description: Locally deployed server tags: - name: Credentials paths: /authn/update: post: description: Self-update existing credentials. operationId: updateCredentials tags: - Credentials parameters: - $ref: '#/components/parameters/userAgentHeader' - $ref: '#/components/parameters/xForwardedForHeader' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/updateCredentials' responses: '204': description: Self-update existing credentials. '400': $ref: '#/components/responses/badRequestResponse' '401': $ref: '#/components/responses/unauthorizedResponse' '422': $ref: '#/components/responses/unprocessableEntityResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' summary: Update credentials x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /authn/credentials: post: description: Add a new login to the system. operationId: createCredentials tags: - Credentials requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/loginCredentials' responses: '201': description: Success string message '400': $ref: '#/components/responses/badRequestResponse' '422': $ref: '#/components/responses/unprocessableEntityResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' summary: Create credentials x-summary-source: derived delete: description: Delete credentials for user operationId: deleteCredentials tags: - Credentials parameters: - $ref: '#/components/parameters/userId' responses: '204': description: Credentials removed successfully '404': $ref: '#/components/responses/badRequestResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' summary: Delete credentials x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server /authn/credentials-existence: get: description: Returns single property 'credentialsExist' with true, if user has local password operationId: checkCredentialsExistence tags: - Credentials parameters: - $ref: '#/components/parameters/userId' responses: '200': description: Credentials existence response content: application/json: schema: $ref: '#/components/schemas/credentialsExistence' '500': $ref: '#/components/responses/internalServerErrorResponse' summary: Check credentials existence x-summary-source: derived servers: - url: http://localhost:8081 description: Locally deployed server components: schemas: parameter: $schema: http://json-schema.org/draft-04/schema# id: parameter.json title: Key/Value Parameter Schema description: List of key/value parameters of an error type: object properties: key: description: Parameter key type: string value: description: Parameter value type: string loginCredentials: $schema: http://json-schema.org/draft-04/schema# id: loginCredentials.json title: Login Credentials Schema description: An entity that describes the basic credentials for a user to log on to the system type: object properties: username: description: Username in the system, case insensitive type: string userId: description: Unique user id type: string password: description: User password type: string required: - password errors: $schema: http://json-schema.org/draft-04/schema# id: Errors Schema description: A set of errors type: object properties: errors: description: List of errors id: errors type: array items: $ref: '#/components/schemas/error' total_records: description: Total number of errors type: integer errorCode: $schema: http://json-schema.org/draft-04/schema# id: errorCode.json title: Error Code Schema description: Error message code type: string enum: - unknown_error - service_error - validation_error - not_found_error - found_error - token.parse.failure - token.refresh.unprocessable - token.logout.unprocessable - unauthorized_error credentialsExistence: $schema: http://json-schema.org/draft-04/schema# id: credentialsExistence.json title: Credential Existence Schema description: Credentials existence response type: object properties: credentialsExist: type: boolean description: True if user has local password required: - credentialsExist updateCredentials: $schema: http://json-schema.org/draft-04/schema# id: updateCredentials.json title: Update Credentials Schema description: An entity that describes the necessary data to update a user password type: object properties: username: description: username type: string userId: description: Unique user id type: string password: description: The current password of the user who will be replaced by the new one type: string newPassword: description: New user password type: string required: - username - password - newPassword error: $schema: http://json-schema.org/draft-04/schema# id: error.json title: Error Schema description: An error object type: object properties: message: type: string description: Error message text type: type: string description: Error message type code: description: Error message code $ref: '#/components/schemas/errorCode' parameters: description: List of key/value parameters of an error $ref: '#/components/schemas/parameters' parameters: $schema: http://json-schema.org/draft-04/schema# id: parameters.json title: List of Parameters Schema description: List of key/value parameters of an error type: array items: $ref: '#/components/schemas/parameter' parameters: userId: in: query required: true name: userId description: User identifier schema: type: string xForwardedForHeader: in: header required: false name: forwardedFor description: -< HTTP header field is a common method for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer schema: type: string userAgentHeader: in: header required: false name: userAgent description: Used to identify the Operating System and Browser of the web-server schema: type: string responses: internalServerErrorResponse: description: Error response for unhandled or critical server exceptions, e.g. NullPointerException. content: application/json: schema: $ref: '#/components/schemas/errors' unauthorizedResponse: description: Error response in JSON format if user is not authorized to perform operation. content: application/json: schema: $ref: '#/components/schemas/errors' unprocessableEntityResponse: description: Error response in JSON format for unprocessable entity. content: application/json: schema: $ref: '#/components/schemas/errors' badRequestResponse: description: Error response in JSON format for validation errors. content: application/json: schema: $ref: '#/components/schemas/errors' x-refined-from: - folio-mod-login-keycloak-openapi.json - folio-mod-login-keycloak-openapi.yml