/
Auth. Get authorize token

ЕСОЗ - публічна документація

Auth. Get authorize token

Specification

Apiaryget-token-to-change-the-password
Postoauth/tokens

Purpose

This WS gives possibility to registered user change password to token

Request parameters

  • grant_type
  • email
  • password
  • client_id
  • scope

Validation

Validate client_id

  • Check id client_id exist in DB
    • in case error return 401, "Invalid client id."

Validate grand type

  • grant_type Check if $.grant_type in allowed_grant_types for client_id
    • in case error return 401, "Client is not allowed to issue login token."
  • validate grant_type = "password"
    • in case error return

Validate email

  • Check user with email = $.email exists in DB
    • in case error return 401, "User not found."
  • Validate user is_block flag = false
    • in case error return 401, "User blocked."

Validate psw 

  • Check $.user's password = $.password
    • in case error return 401, "Identity, password combination is wrong."

Validate scope

  • validate client_id has scope=$.scope
    • in case error return

Response

  • 201 if access_token with scope "app:authorize" created
  • 4XX in other case

Related content

Auth. Configuration
Auth. Configuration
Read with this
Auth. Authorize scopes (Deprecated)
Auth. Authorize scopes (Deprecated)
More like this
Auth
Read with this
Change Password
Change Password
More like this
oAuth API
oAuth API
Read with this
Auth. Exchange grant token (Deprecated)
Auth. Exchange grant token (Deprecated)
Read with this

ЕСОЗ - публічна документація