{
  "files": [
    {
      "name": "keyapis/identity/v1/keyapis_identity_oauth2_v1.proto",
      "description": "Сервис предоставляет возможность авторизации",
      "package": "keyapis.identity.v1",
      "hasEnums": false,
      "hasExtensions": false,
      "hasMessages": true,
      "hasServices": true,
      "enums": [],
      "extensions": [],
      "messages": [
        {
          "name": "AuthServiceError",
          "longName": "AuthServiceError",
          "fullName": "keyapis.identity.v1.AuthServiceError",
          "description": "Ошибки авторизационного сервиса",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "auth",
              "description": "Ошибки авторизационного сервиса",
              "label": "",
              "type": "AuthError",
              "longType": "AuthServiceError.AuthError",
              "fullType": "keyapis.identity.v1.AuthServiceError.AuthError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "AuthError",
          "longName": "AuthServiceError.AuthError",
          "fullName": "keyapis.identity.v1.AuthServiceError.AuthError",
          "description": "Ошибки авторизационного сервиса",
          "hasExtensions": false,
          "hasFields": false,
          "hasOneofs": false,
          "extensions": [],
          "fields": []
        },
        {
          "name": "GetOauth2ConsentRequest",
          "longName": "GetOauth2ConsentRequest",
          "fullName": "keyapis.identity.v1.GetOauth2ConsentRequest",
          "description": "Запрос соглашения пользователя по процедуре OAuth2",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "consent_challenge",
              "description": "Идентификатор текущей попытки запроса соглашения пользователя",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            }
          ]
        },
        {
          "name": "GetOauth2ConsentResponse",
          "longName": "GetOauth2ConsentResponse",
          "fullName": "keyapis.identity.v1.GetOauth2ConsentResponse",
          "description": "Ответ на запрос соглашения пользователя по процедуре OAuth2",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "GetOauth2ConsentResponse.Error",
              "fullType": "keyapis.identity.v1.GetOauth2ConsentResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Error",
          "longName": "GetOauth2ConsentResponse.Error",
          "fullName": "keyapis.identity.v1.GetOauth2ConsentResponse.Error",
          "description": "Ошибка запроса авторизации пользователя",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "auth_service",
              "description": "Ошибки авторизационного сервиса",
              "label": "",
              "type": "AuthServiceError",
              "longType": "AuthServiceError",
              "fullType": "keyapis.identity.v1.AuthServiceError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "PostOauth2LoginByCodeRequest",
          "longName": "PostOauth2LoginByCodeRequest",
          "fullName": "keyapis.identity.v1.PostOauth2LoginByCodeRequest",
          "description": "Запрос на авторизацию по ОТП-коду",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "code_id",
              "description": "Идентификатор ОТП-кода",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "code",
              "description": "Значение ОТП-кода",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 2
            },
            {
              "name": "login_challenge",
              "description": "Идентификатор текущей попытки логина пользователя",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 3
            }
          ]
        },
        {
          "name": "PostOauth2LoginByCodeResponse",
          "longName": "PostOauth2LoginByCodeResponse",
          "fullName": "keyapis.identity.v1.PostOauth2LoginByCodeResponse",
          "description": "Ответ на запрос об авторизации пользователя",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "PostOauth2LoginByCodeResponse.Error",
              "fullType": "keyapis.identity.v1.PostOauth2LoginByCodeResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Error",
          "longName": "PostOauth2LoginByCodeResponse.Error",
          "fullName": "keyapis.identity.v1.PostOauth2LoginByCodeResponse.Error",
          "description": "Ошибка запроса авторизации пользователя",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "otp_code",
              "description": "Ошибка отп-кода",
              "label": "",
              "type": "Error",
              "longType": "OtpCode.Error",
              "fullType": "keyapis.identity.v1.OtpCode.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "sso",
              "description": "Ошибка из ССО",
              "label": "",
              "type": "SsoError",
              "longType": "SsoError",
              "fullType": "keyapis.identity.v1.SsoError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 2
            },
            {
              "name": "key",
              "description": "Ошибки сервисов ключа",
              "label": "",
              "type": "KeyError",
              "longType": "KeyError",
              "fullType": "keyapis.identity.v1.KeyError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 3
            },
            {
              "name": "auth_service",
              "description": "Ошибки авторизационного сервиса",
              "label": "",
              "type": "AuthServiceError",
              "longType": "AuthServiceError",
              "fullType": "keyapis.identity.v1.AuthServiceError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 4
            }
          ]
        },
        {
          "name": "PostOauth2LoginByPasswordRequest",
          "longName": "PostOauth2LoginByPasswordRequest",
          "fullName": "keyapis.identity.v1.PostOauth2LoginByPasswordRequest",
          "description": "Запрос на авторизацию по паролю",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "phone_number",
              "description": "Номер телефона",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "email",
              "description": "Электронная почта",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 2
            },
            {
              "name": "login",
              "description": "Логин",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 3
            },
            {
              "name": "password",
              "description": "Пароль",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 4
            },
            {
              "name": "captcha_answer",
              "description": "Ответ на капчу",
              "label": "",
              "type": "CaptchaAnswer",
              "longType": "CaptchaAnswer",
              "fullType": "keyapis.identity.v1.CaptchaAnswer",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "OPTIONAL"
                  ]
                }
              },
              "number": 5
            },
            {
              "name": "login_challenge",
              "description": "Идентификатор текущей попытки логина пользователя",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 6
            }
          ]
        },
        {
          "name": "PostOauth2LoginByPasswordResponse",
          "longName": "PostOauth2LoginByPasswordResponse",
          "fullName": "keyapis.identity.v1.PostOauth2LoginByPasswordResponse",
          "description": "Ответ на запрос об авторизации по паролю пользователя",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "PostOauth2LoginByPasswordResponse.Error",
              "fullType": "keyapis.identity.v1.PostOauth2LoginByPasswordResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Error",
          "longName": "PostOauth2LoginByPasswordResponse.Error",
          "fullName": "keyapis.identity.v1.PostOauth2LoginByPasswordResponse.Error",
          "description": "Ошибка запроса авторизации пользователя",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "captcha_answer",
              "description": "Ошибка капчи",
              "label": "",
              "type": "Error",
              "longType": "CaptchaAnswer.Error",
              "fullType": "keyapis.identity.v1.CaptchaAnswer.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "sso",
              "description": "Ошибка из ССО",
              "label": "",
              "type": "SsoError",
              "longType": "SsoError",
              "fullType": "keyapis.identity.v1.SsoError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 2
            },
            {
              "name": "key",
              "description": "Ошибки сервисов ключа",
              "label": "",
              "type": "KeyError",
              "longType": "KeyError",
              "fullType": "keyapis.identity.v1.KeyError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 3
            },
            {
              "name": "auth_service",
              "description": "Ошибки авторизационного сервиса",
              "label": "",
              "type": "AuthServiceError",
              "longType": "AuthServiceError",
              "fullType": "keyapis.identity.v1.AuthServiceError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 4
            }
          ]
        }
      ],
      "services": [
        {
          "name": "Oauth2Service",
          "longName": "Oauth2Service",
          "fullName": "keyapis.identity.v1.Oauth2Service",
          "description": "Сервис авторизации пользователей по процедуре OAuth2",
          "methods": [
            {
              "name": "PostOauth2LoginByCode",
              "description": "Метод авторизации по ОТП-коду по процедуре OAuth2.\nМетод возвращает переадресацию в виде GRPC метаданных x-http-code и location.\nНе требует авторизации",
              "requestType": "PostOauth2LoginByCodeRequest",
              "requestLongType": "PostOauth2LoginByCodeRequest",
              "requestFullType": "keyapis.identity.v1.PostOauth2LoginByCodeRequest",
              "requestStreaming": false,
              "responseType": "PostOauth2LoginByCodeResponse",
              "responseLongType": "PostOauth2LoginByCodeResponse",
              "responseFullType": "keyapis.identity.v1.PostOauth2LoginByCodeResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "POST",
                      "pattern": "/identity/api/v1/oauth2/login_by_code",
                      "body": "*"
                    }
                  ]
                }
              }
            },
            {
              "name": "PostOauth2LoginByPassword",
              "description": "Метод авторизации по паролю по процедуре OAuth2.\nМетод возвращает переадресацию в виде GRPC метаданных x-http-code и location.\nНе требует авторизации",
              "requestType": "PostOauth2LoginByPasswordRequest",
              "requestLongType": "PostOauth2LoginByPasswordRequest",
              "requestFullType": "keyapis.identity.v1.PostOauth2LoginByPasswordRequest",
              "requestStreaming": false,
              "responseType": "PostOauth2LoginByPasswordResponse",
              "responseLongType": "PostOauth2LoginByPasswordResponse",
              "responseFullType": "keyapis.identity.v1.PostOauth2LoginByPasswordResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "POST",
                      "pattern": "/identity/api/v1/oauth2/login_by_password",
                      "body": "*"
                    }
                  ]
                }
              }
            },
            {
              "name": "GetOauth2Consent",
              "description": "Метод запроса соглашения пользователя по процедуре OAuth2.\nМетод возвращает переадресацию в виде GRPC метаданных x-http-code и location.\nНе требует авторизации",
              "requestType": "GetOauth2ConsentRequest",
              "requestLongType": "GetOauth2ConsentRequest",
              "requestFullType": "keyapis.identity.v1.GetOauth2ConsentRequest",
              "requestStreaming": false,
              "responseType": "GetOauth2ConsentResponse",
              "responseLongType": "GetOauth2ConsentResponse",
              "responseFullType": "keyapis.identity.v1.GetOauth2ConsentResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "GET",
                      "pattern": "/identity/api/v1/oauth2/consent"
                    }
                  ]
                }
              }
            }
          ]
        }
      ],
      "syntax": "proto3"
    }
  ],
  "scalarValueTypes": [
    {
      "protoType": "double",
      "notes": "",
      "cppType": "double",
      "csType": "double",
      "goType": "float64",
      "javaType": "double",
      "phpType": "float",
      "pythonType": "float",
      "rubyType": "Float"
    },
    {
      "protoType": "float",
      "notes": "",
      "cppType": "float",
      "csType": "float",
      "goType": "float32",
      "javaType": "float",
      "phpType": "float",
      "pythonType": "float",
      "rubyType": "Float"
    },
    {
      "protoType": "int32",
      "notes": "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "int64",
      "notes": "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "uint32",
      "notes": "Uses variable-length encoding.",
      "cppType": "uint32",
      "csType": "uint",
      "goType": "uint32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int/long",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "uint64",
      "notes": "Uses variable-length encoding.",
      "cppType": "uint64",
      "csType": "ulong",
      "goType": "uint64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sint32",
      "notes": "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sint64",
      "notes": "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "fixed32",
      "notes": "Always four bytes. More efficient than uint32 if values are often greater than 2^28.",
      "cppType": "uint32",
      "csType": "uint",
      "goType": "uint32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "fixed64",
      "notes": "Always eight bytes. More efficient than uint64 if values are often greater than 2^56.",
      "cppType": "uint64",
      "csType": "ulong",
      "goType": "uint64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "sfixed32",
      "notes": "Always four bytes.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sfixed64",
      "notes": "Always eight bytes.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "bool",
      "notes": "",
      "cppType": "bool",
      "csType": "bool",
      "goType": "bool",
      "javaType": "boolean",
      "phpType": "boolean",
      "pythonType": "boolean",
      "rubyType": "TrueClass/FalseClass"
    },
    {
      "protoType": "string",
      "notes": "A string must always contain UTF-8 encoded or 7-bit ASCII text.",
      "cppType": "string",
      "csType": "string",
      "goType": "string",
      "javaType": "String",
      "phpType": "string",
      "pythonType": "str/unicode",
      "rubyType": "String (UTF-8)"
    },
    {
      "protoType": "bytes",
      "notes": "May contain any arbitrary sequence of bytes.",
      "cppType": "string",
      "csType": "ByteString",
      "goType": "[]byte",
      "javaType": "ByteString",
      "phpType": "string",
      "pythonType": "str",
      "rubyType": "String (ASCII-8BIT)"
    }
  ]
}