openapi: 3.2.0 info: title: Security Authenticate API version: v1 description: Provides endpoints to enable authentication to the Cubi api's servers: - url: https://cubi-sandbox-api.customersbank.com/security/v1 tags: - name: Authenticate description: Provides endpoints to enable authentication to the Cubi api's paths: /authenticate/token: post: tags: - Authenticate summary: /authenticate/token - POST description: Gets an auth token for the provided client id and secret operationId: post-authenticate-token requestBody: description: The client id and secret to authenticate content: application/json: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.ClientCredentialsDto' example: clientId: string clientSecret: string text/json: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.ClientCredentialsDto' example: clientId: string clientSecret: string application/*+json: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.ClientCredentialsDto' example: clientId: string clientSecret: string responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.AccessTokenDto' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.AccessTokenDto' example: tokenType: Bearer accessToken: string expiresOn: string text/json: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.AccessTokenDto' example: tokenType: Bearer accessToken: string expiresOn: string '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string /oauth2/token: post: tags: - Authenticate summary: /oauth2/token - POST description: Gets an auth token for the provided client id, secret, and grant type operationId: post-oauth2-token requestBody: content: application/x-www-form-urlencoded: schema: properties: client_id: type: string client_secret: type: string grant_type: type: string organization: type: string responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.OAuthResponseDto' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.OAuthResponseDto' example: access_token: string token_type: Bearer expires_in: 3598 text/json: schema: $ref: '#/components/schemas/Cubi.Security.WebApi.Dtos.OAuthResponseDto' example: access_token: string token_type: Bearer expires_in: 3598 '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: text/plain: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: string title: string status: 0 detail: string traceId: string text/json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: string title: string status: 0 detail: string traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string components: schemas: Microsoft.AspNetCore.Mvc.ProblemDetails: type: object properties: type: type: - string - 'null' title: type: - string - 'null' status: type: - integer - 'null' format: int32 detail: type: - string - 'null' traceId: type: - string - 'null' additionalProperties: {} Cubi.Security.WebApi.Dtos.OAuthResponseDto: type: object properties: access_token: type: - string - 'null' description: The authorized access token token_type: type: - string - 'null' example: Bearer expires_in: type: integer format: int32 example: 3598 additionalProperties: false description: The result of a successful authentication Cubi.Security.WebApi.Dtos.AccessTokenDto: type: object properties: tokenType: type: - string - 'null' description: This will always be Bearer example: Bearer accessToken: type: - string - 'null' description: The access token expiresOn: type: string description: The time the token expires at format: date-time additionalProperties: false description: The results of a successful authentication Microsoft.AspNetCore.Mvc.ValidationProblemDetails: type: object properties: type: type: - string - 'null' title: type: - string - 'null' status: type: - integer - 'null' format: int32 detail: type: - string - 'null' traceId: type: - string - 'null' errors: type: object additionalProperties: type: array items: type: string additionalProperties: {} Cubi.Security.WebApi.Dtos.ClientCredentialsDto: required: - clientId - clientSecret type: object properties: clientId: minLength: 1 type: string description: The client id clientSecret: minLength: 1 type: string description: The secret for the authentication call additionalProperties: false description: The credentials to use to authenticate x-readme: explorer-enabled: false proxy-enabled: true