OAuth 2.0
OAuth 2.0: authorization, token, revocation, introspection.
curl -X GET "https://loading/.well-known/oauth-authorization-server"{
"authorization_endpoint": "string",
"code_challenge_methods_supported": [
"string"
],
"dpop_signing_alg_values_supported": [
"string"
],
"grant_types_supported": [
"string"
],
"introspection_endpoint": "string",
"introspection_endpoint_auth_methods_supported": [
"string"
],
"issuer": "string",
"jwks_uri": "string",
"registration_endpoint": "string",
"response_types_supported": [
"string"
],
"revocation_endpoint": "string",
"revocation_endpoint_auth_methods_supported": [
"string"
],
"scopes_supported": [
"string"
],
"service_documentation": "string",
"token_endpoint": "string",
"token_endpoint_auth_methods_supported": [
"string"
],
"userinfo_endpoint": "string"
}curl -X GET "https://loading/.well-known/openid-configuration"{
"authorization_endpoint": "string",
"code_challenge_methods_supported": [
"string"
],
"dpop_signing_alg_values_supported": [
"string"
],
"grant_types_supported": [
"string"
],
"introspection_endpoint": "string",
"introspection_endpoint_auth_methods_supported": [
"string"
],
"issuer": "string",
"jwks_uri": "string",
"registration_endpoint": "string",
"response_types_supported": [
"string"
],
"revocation_endpoint": "string",
"revocation_endpoint_auth_methods_supported": [
"string"
],
"scopes_supported": [
"string"
],
"service_documentation": "string",
"token_endpoint": "string",
"token_endpoint_auth_methods_supported": [
"string"
],
"userinfo_endpoint": "string",
"property1": null,
"property2": null
}Эндпоинт авторизации OAuth 2.0 (RFC 6749 §3.1, PKCE RFC 7636)
Авторизация
bearerAuth В: header
Параметры запроса
Только authorization code flow
"code"client_id зарегистрированного клиента
Зарегистрированный redirect URI
Запрашиваемые scope через пробел
Непрозрачное значение, возвращается в redirect
OIDC nonce
PKCE challenge (обязателен)
Метод PKCE, только S256
"S256"Отпечаток DPoP-ключа для привязки токенов (RFC 9449 §10)
Целевой ресурс (RFC 8707)
Тело ответа
application/json
curl -X GET "https://loading/oauth/authorize?response_type=code&client_id=string&redirect_uri=string&code_challenge=string"{
"error": "string",
"error_description": "string"
}Контекст экрана согласия OAuth (имя клиента, scopes, redirect_uri)
Авторизация
bearerAuth В: header
Параметры запроса
client_id из authorize-запроса
redirect_uri из authorize-запроса
Запрашиваемые scope через пробел
Целевой ресурс (RFC 8707)
Тело ответа
application/json
application/json
curl -X GET "https://loading/oauth/authorize/context?client_id=string&redirect_uri=string"{
"application_type": "string",
"client_id": "string",
"client_name": "string",
"redirect_uri": "string",
"resource": "string",
"scopes": [
"string"
]
}{
"error": "string",
"error_description": "string"
}Решение пользователя по экрану согласия OAuth (выдача кода или отказ)
Авторизация
bearerAuth В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
application/json
curl -X POST "https://loading/oauth/authorize/decision" \ -H "Content-Type: application/json" \ -d '{ "approve": true, "client_id": "string", "code_challenge": "string", "redirect_uri": "string" }'{
"location": "string"
}{
"error": "string",
"error_description": "string"
}Интроспекция токена (RFC 7662)
Тело запроса
application/x-www-form-urlencoded
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
application/json
application/json
curl -X POST "https://loading/oauth/introspect" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'token=string'{
"active": true,
"aud": "string",
"client_id": "string",
"cnf": {
"jkt": "string"
},
"exp": 0,
"iat": 0,
"iss": "string",
"jti": "string",
"nbf": 0,
"scope": "string",
"sub": "string",
"token_type": "string",
"username": "string"
}{
"error": "string",
"error_description": "string"
}{
"error": "string",
"error_description": "string"
}Динамическая регистрация клиента OAuth 2.0 (RFC 7591)
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
application/json
curl -X POST "https://loading/oauth/register" \ -H "Content-Type: application/json" \ -d '{ "redirect_uris": [ "string" ] }'{
"application_type": "string",
"client_id": "string",
"client_id_issued_at": 0,
"client_name": "string",
"grant_types": [
"string"
],
"redirect_uris": [
"string"
],
"response_types": [
"string"
],
"scope": "string",
"token_endpoint_auth_method": "string"
}{
"error": "string",
"error_description": "string"
}Отзыв токена (RFC 7009)
Тело запроса
application/x-www-form-urlencoded
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
curl -X POST "https://loading/oauth/revoke" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'token=string'Эндпоинт выдачи токенов OAuth 2.0 (RFC 6749 §3.2)
Тело запроса
application/x-www-form-urlencoded
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
application/json
application/json
curl -X POST "https://loading/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'grant_type=string'{
"access_token": "string",
"expires_in": 0,
"refresh_token": "string",
"scope": "string",
"token_type": "string"
}{
"error": "string",
"error_description": "string"
}{
"error": "string",
"error_description": "string"
}Эндпоинт UserInfo (профиль текущего пользователя)
Авторизация
bearerAuth В: header
Тело ответа
application/json
application/json
curl -X GET "https://loading/oauth/userinfo"{
"email": "string",
"family_name": "string",
"given_name": "string",
"name": "string",
"sub": "string"
}{
"error": "string",
"error_description": "string"
}