--- swagger: "2.0" info: x-ibm-name: authorization-api title: Authorization API version: 2.1.0 description: Сервисы для аутентификации приложений использующих API schemes: - https securityDefinitions: Authorization: type: basic description: Basic авторизация с использованием clientId и clientSecret security: - Authorization: [] paths: /token: post: summary: Получение токена доступа description: Получение токена доступа parameters: - name: grant_type in: formData description: 'Тип доступа (пример: client_credentials)' type: string required: true enum: - authorization_code - password - client_credentials - refresh_token - name: scope in: formData type: string description: Запрошенный доступ required: true responses: 200: description: Успешное выполнение запроса schema: $ref: '#/definitions/AccessTokenResponse' 400: description: Ошибка в запросе /introspect: post: summary: Проверка токена доступа description: Проверка токена доступа parameters: - name: token in: formData description: Токен required: true type: string - name: token_type_hint in: formData description: 'Тип токена (пример: access_token)' required: true type: string responses: 200: description: Успешное выполнение запроса schema: $ref: '#/definitions/IntrospectResponse' 401: description: Ошибка в запросе x-ibm-configuration: testable: true enforced: true phase: realized categories: - "" definitions: AccessTokenResponse: type: object additionalProperties: false required: - token_type - access_token - expires_in - scope - consented_on properties: token_type: enum: - bearer description: Тип токена type: string example: bearer access_token: type: string description: Токен доступа example: token expires_in: type: integer description: Длительность жизни токена (в секундах) format: int64 example: "3600" scope: type: string description: Одобренные доступы на ресурсы и/или операции example: scope consented_on: type: integer description: Время выдачи токена format: int32 example: "1626944681" description: Информация о выданном токене доступа IntrospectResponse: type: object additionalProperties: false required: - active - client_id - client_name - username - sub - exp - expstr - iat - nbf - nbfstr - scope - token_type - grant_type - consented_on_str - consented_on - miscinfo properties: active: type: boolean description: Признак валидности example: "true" client_id: type: string description: Идентификатор приложения example: 5edd60a0-1368-4db6-bdce-c38f03c685f1 client_name: type: string description: Название приложения example: App username: type: string description: Идентификатор приложения example: 5edd60a0-1368-4db6-bdce-c38f03c685f1 sub: type: string description: Идентификатор приложения example: 5edd60a0-1368-4db6-bdce-c38f03c685f1 exp: type: integer description: Дата и время истечения срока валидности токена format: int64 example: "1626948281" expstr: type: string description: Дата и время истечения срока валидности токена example: "2021-07-22T10:04:41Z" iat: type: integer description: Дата и время выдачи токена format: int64 example: "1626948281" nbf: type: integer description: Дата и время выдачи токена format: int64 example: "1626948281" nbfstr: type: string description: Дата и время выдачи токена example: "2021-07-22T09:04:41Z" scope: type: string description: Доступы (через пробелы) example: scope miscinfo: type: string example: "" consented_on: type: integer description: Дата и время выдачи токена format: int64 example: "1626944681" consented_on_str: type: string description: Дата и время выдачи токена example: "2021-07-22T09:04:41Z" grant_type: type: string description: Тип доступа example: application token_type: type: string description: Тип токена example: bearer description: Информация о токене basePath: /v2/oauth consumes: - application/x-www-form-urlencoded produces: - application/json x-ibm-endpoints: - endpointUrl: https://api.bcc.kz:10443/bcc/production description: Альтернативная точка подключения для вызова сервиса в продуктивной среде. Зарегистрированное на портале developer.bcc.kz приложение должно быть в режиме "PRODUCTION" type: - production - development - endpointUrl: https://api-test.bcc.kz/bcc/production description: Точка подключения для вызова сервисов в тестовой среде. Зарегистрированное на портале developer.bcc.kz приложение должно быть в режиме "DEVELOPMENT" type: - development - endpointUrl: https://api.bcc.kz/bcc/production description: Точка подключения для вызова сервиса в продуктивной среде. Зарегистрированное на портале developer.bcc.kz приложение должно быть в режиме "PRODUCTION" type: - production - endpointUrl: https://api-sandbox.bcc.kz/bcc/production description: Точка подключения для вызова сервисов в песочнице. Зарегистрированное на портале developer.bcc.kz приложение должно быть в режиме "DEVELOPMENT" type: - development ...