openapi: 3.0.1
info:
  title: Authorization
  description: Authorization API used for accessing resouces using ouath2 with client_credentials
  version: 1.0.0
servers:
- description: Main Server
  url: https://api.btx.fr.banqup.com/oauth2
- description: Main Server
  url: https://api.btx.eu.banqup.com/oauth2
tags:
- name: Authorization
  description: Apigee OAuth2
paths:
  /client_credential/gettoken:
    post:
      tags:
      - OAuth2
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - grant_type
              - client_id
              - client_secret
              properties:
                grant_type:
                  type: string
                  enum:
                  - client_credentials
                  default: client_credentials
                client_id:
                  type: string
                  description: The client's public identifier.
                client_secret:
                  type: string
                  description: The client's private secret.
      responses:
        '200':
          description: Successful response
      summary: Get bearer token and details
      description: 'Click on this link for further details: [API authentication and
        authorization](../../../../docs/api-guides/api-fundamentals/api-authentication#api-authentication-and-authorization)
        <br/> Scope: []'
  /client_credential/accesstoken:
    post:
      tags:
      - OAuth2
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - grant_type
              - client_id
              - client_secret
              properties:
                grant_type:
                  type: string
                  enum:
                  - client_credentials
                  default: client_credentials
                client_id:
                  type: string
                  description: The client's public identifier.
                client_secret:
                  type: string
                  description: The client's private secret.
      responses:
        '200':
          description: Successful response
      summary: Get bearer token
      description: 'Click on this link for further details: [API authentication and
        authorization](../../../../docs/api-guides/api-fundamentals/api-authentication#api-authentication-and-authorization)
        <br/> Scope: []'
  /validate:
    post:
      tags:
      - OAuth2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - bearer
              properties:
                bearer:
                  type: string
                  description: The Bearer to be validated.
      responses:
        '200':
          description: Successful response
      summary: Validate bearer token
      description: 'Token validator <br/> Scope: []'
  /client_credential/.well-known/openid-configuration:
    get:
      tags:
      - OAuth2
      responses:
        '200':
          description: Successful response
      summary: /.well-known client credential
      description: ' <br/> Scope: []'
      operationId: well-known-client-credential
  /.well-known/openid-configuration:
    get:
      tags:
      - OAuth2
      responses:
        '200':
          description: Successful response
      summary: /.well-known auth code
      description: ' <br/> Scope: []'
      operationId: well-known
  /client_credential/protocol/openid-connect/certs:
    get:
      tags:
      - OAuth2
      responses:
        '200':
          description: Successful response
      summary: /certs
      description: ' <br/> Scope: []'
      operationId: certs-client-credential
  /protocol/openid-connect/certs:
    get:
      tags:
      - OAuth2
      responses:
        '200':
          description: Successful response
      summary: /certs
      description: ' <br/> Scope: []'
      operationId: certs
  /activate_redirect:
    post:
      tags:
      - OAuth2
      summary: Activates the Authorization Code Redirect URI
      description: ''
      operationId: activate-redirect
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - redirect_uri
              properties:
                redirect_uri:
                  type: array
                  items:
                    type: string
              example:
                redirect_uri:
                - https://redirect_uri.com
                - https://another_redirect_uri.com
      responses:
        '200':
          description: Successful response
      security:
      - oauth2: []
  /update_redirect:
    put:
      tags:
      - OAuth2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - redirect_uri
              properties:
                redirect_uri:
                  type: array
                  items:
                    type: string
                  default:
                  - redirect_uri.com
                  - another_redirect_uri.com
              example:
                redirect_uri:
                - redirect_uri.com
                - another_redirect_uri.com
      responses:
        '200':
          description: Successful response
      security:
      - oauth2: []
      summary: Updates the Redirect URI for the given client
      description: ''
      operationId: update-redirect
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.btx.fr.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.btx.fr.banqup.com/oauth2/auth
          tokenUrl: https://api.btx.fr.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
