# Copyright 2021 - 2021 PeopleWare n.v.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

allOf:
  - $ref: 'BaseRequestBody.yaml'
  - type: object
    required:
      - code
      - redirect_uri
      - client_id
      - code_verifier
    properties:
      code:
        type: string
        minLength: 1
        description: The authorization code received from the authorization server.
        example: MP9TVQ-8-QBV-8-BQM=VN8VQ__=8
      redirect_uri:
        type: string
        format: uri
        description: Must be identical to the redirect uri with which the `code` was requested.
        example: https://example.org/ui/logged-in
      client_id:
        type: string
        minLength: 1
        example: bq2890n72
      code_verifier:
        type: string
        description: >-
          A cryptographically random string that is used to correlate the authorization request to the token request.


          See [RFC 7636 Section 4.1](https://tools.ietf.org/html/rfc7636#section-4.1).
        example: u2m90mum-0qIL::HL:I(BH%
