Integration Guide for Banks
[UKR] Посібник з інтеграції для банку
[UKR] Посібник з інтеграції для банку
  • General
    • 💰Загальний опис
      • Перекази між цифровізованими сутностями
        • Варіант 1. Швидке створення/видалення ідентифікаторів
        • Варіант 2. Стандартне створення/видалення ідентифікаторів (опціонально)
      • Історія версій
      • Журнал змін API
      • Глосарій
    • 🌐Загальні вимоги
    • 👉Базовий варіант впровадження
    • 📅План інтеграції
      • План інтеграції (Бізнес)
      • План інтеграції (Технічна команда)
      • Мультипідпис
    • ❗Повідомлення про помилки
  • 🛠️API МЕТОДИ
    • Автентифікація
      • Авторизація через JWT
      • Служба Аутентифікації Банку
      • JWT формат
    • Працівники
      • Призначити роль працівнику
      • Управління ролями
    • Клієнти
      • Сегмент
    • Цифровізовані сутності
    • Ідентифікатори
    • Трансфер (перерозподілення ідентифікаторів)
      • Мультипідпис для трансферів
      • Зворотні виклики
      • Категорія
    • Ліміти
    • Реконсиляція
    • [необов’язково] Відділення
      • Відділення (доступ)
      • Як додати працівника до віддлення (філії)
      • Фільтр по відділенню
      • Трансфери (Відділення)
Powered by GitBook
On this page
  1. API МЕТОДИ

Автентифікація

Як увійти в систему за допомогою облікових даних співробітника

PreviousПовідомлення про помилкиNextАвторизація через JWT

Last updated 1 year ago

Для роботи з DCM необхідно авторизуватися в системі.

Якщо ви , вам не потрібно виконувати автентифікацію через API.

Метою автентифікації є обмеження доступу до ідентифікації та інформації про обліковий запис лише для тих, кому це явно дозволено.

Для автентифікації використовуйте наступний хост URL-адреси: api-{alias}-integrate

Які кроки потрібно зробити для автентифікації?

Передумова: працівник повинен бути зареєстрований (див. функцію).

  1. Створити потік входу

  1. Авторизуватися

У тілі запиту необхідно вказати параметри користувача (e-mail, пароль), які вказано при реєстрації.

Важливо, тіло повинно надсилатись у форматі x-www-form-urlencoded.

Приклад:

curl --location 'https://api.xxx.processing-stage.dcm.systems/kratos/self-service/login?flow=xxx' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'csrf_token=xxx' \
--data-urlencode 'identifier=xxx@mail.com' \
--data-urlencode 'method=password' \
--data-urlencode 'password=xxx'

У разі успішної відповіді в тілі відповіді отримується параметрsession_token.

    Authorization: bearer ${session-token}

Токен сеансу потрібно надіслати в заголовок авторизації HTTP для всіх інших запитів API (не застосовується, якщо використовується :

🛠️
використовуєте власний JWT
Працівники
Авторизація через JWT

Submit a Login Flow

post

Use this endpoint to complete a login flow.

Query parameters
flowstringRequired

The Login Flow ID

The value for this parameter comes from flow URL Query parameter sent to your application (e.g. /login?flow=abcde).

Header parameters
CookiestringOptional

HTTP Cookies

When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Body
one ofOptional
or
or
or
or
Responses
200
successfulNativeLogin
application/json
303
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.
400
loginFlow
application/json
410
errorGeneric
application/json
422
errorBrowserLocationChangeRequired
application/json
default
errorGeneric
application/json
post
POST /kratos/self-service/login?flow={{id}}?flow=text HTTP/1.1
Host: {{url_host}}
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "csrf_token": "text",
  "identifier": "text",
  "method": "text",
  "password": "text"
}
{
  "...": null,
  "session_token": "text"
}

Create Login Flow for Native Apps

get

This endpoint initiates a login flow for native apps that do not use a browser, such as mobile devices, smart TVs, and so on. In the response you will get flow_id that will be used during the logging in on the next step.

Responses
200
loginFlow
application/json
400
errorGeneric
application/json
default
errorGeneric
application/json
get
GET /kratos/self-service/login/api HTTP/1.1
Host: {{url_host}}
Accept: */*
{
  "active": "password",
  "created_at": "2025-06-17T13:41:49.101Z",
  "expires_at": "2025-06-17T13:41:49.101Z",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "issued_at": "2025-06-17T13:41:49.101Z",
  "oauth2_login_challenge": "text",
  "oauth2_login_request": {
    "challenge": "text",
    "client": {
      "allowed_cors_origins": [
        "text"
      ],
      "audience": [
        "text"
      ],
      "authorization_code_grant_access_token_lifespan": "text",
      "authorization_code_grant_id_token_lifespan": "text",
      "authorization_code_grant_refresh_token_lifespan": "text",
      "backchannel_logout_session_required": true,
      "backchannel_logout_uri": "text",
      "client_credentials_grant_access_token_lifespan": "text",
      "client_id": "text",
      "client_name": "text",
      "client_secret": "text",
      "client_secret_expires_at": 1,
      "client_uri": "text",
      "contacts": [
        "text"
      ],
      "created_at": "2025-06-17T13:41:49.101Z",
      "frontchannel_logout_session_required": true,
      "frontchannel_logout_uri": "text",
      "grant_types": [
        "text"
      ],
      "implicit_grant_access_token_lifespan": "text",
      "implicit_grant_id_token_lifespan": "text",
      "jwks": null,
      "jwks_uri": "text",
      "jwt_bearer_grant_access_token_lifespan": "text",
      "logo_uri": "text",
      "metadata": null,
      "owner": "text",
      "policy_uri": "text",
      "post_logout_redirect_uris": [
        "text"
      ],
      "redirect_uris": [
        "text"
      ],
      "refresh_token_grant_access_token_lifespan": "text",
      "refresh_token_grant_id_token_lifespan": "text",
      "refresh_token_grant_refresh_token_lifespan": "text",
      "registration_access_token": "text",
      "registration_client_uri": "text",
      "request_object_signing_alg": "text",
      "request_uris": [
        "text"
      ],
      "response_types": [
        "text"
      ],
      "scope": "text",
      "sector_identifier_uri": "text",
      "subject_type": "text",
      "token_endpoint_auth_method": "text",
      "token_endpoint_auth_signing_alg": "text",
      "tos_uri": "text",
      "updated_at": "2025-06-17T13:41:49.101Z",
      "userinfo_signed_response_alg": "text"
    },
    "oidc_context": {
      "acr_values": [
        "text"
      ],
      "display": "text",
      "id_token_hint_claims": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "login_hint": "text",
      "ui_locales": [
        "text"
      ]
    },
    "request_url": "text",
    "requested_access_token_audience": [
      "text"
    ],
    "requested_scope": [
      "text"
    ],
    "session_id": "text",
    "skip": true,
    "subject": "text"
  },
  "refresh": true,
  "request_url": "text",
  "requested_aal": "aal0",
  "return_to": "text",
  "type": "text",
  "ui": {
    "action": "text",
    "messages": [
      {
        "context": {},
        "id": 1,
        "text": "text",
        "type": "info"
      }
    ],
    "method": "text",
    "nodes": [
      {
        "attributes": {
          "autocomplete": "email",
          "disabled": true,
          "label": {
            "context": {},
            "id": 1,
            "text": "text",
            "type": "info"
          },
          "name": "text",
          "node_type": "text",
          "onclick": "text",
          "pattern": "text",
          "required": true,
          "type": "text",
          "value": null
        },
        "group": "default",
        "messages": [
          {
            "context": {},
            "id": 1,
            "text": "text",
            "type": "info"
          }
        ],
        "meta": {
          "label": {
            "context": {},
            "id": 1,
            "text": "text",
            "type": "info"
          }
        },
        "type": "text"
      }
    ]
  },
  "updated_at": "2025-06-17T13:41:49.101Z"
}
  • Які кроки потрібно зробити для автентифікації?
  • GETCreate Login Flow for Native Apps
  • POSTSubmit a Login Flow