Link Search Menu Expand Document (external link)

Remove session initialized by mobile id

Table of contents
  1. Endpoint
  2. URL parameter description
  3. Request body parameter description
  4. Response body parameter description
    1. Successful response
    2. Failed response
  5. Sample request
  6. Sample response
    1. Sample success response
    2. Sample failed response
  7. Implementation
    1. CURL
    2. Using php-client

This API destroys the session initialed by authentication or signing processes via mobile id.

Endpoint

Path (Locale: LT) /api/mobile/session/{sessionId}
Path (Locale: EN) /en/api/mobile/session/{sessionId}
Method DELETE
Request Body Schema application/json

URL parameter description

Key Requirement Type Description
sessionId Mandatory String Token that is being sent as a response of from the response of Initialize authentication via mobile id request or Initialize signing via mobile id request or Initialize hash signing via mobile id request

Request body parameter description

Key Requirement Type Description
access_token Mandatory String API Access Token

Response body parameter description

Successful response

Key Type Description
status String Status of the request, ok in this case

Failed response

Key Type Description
status String Status of the request, error in this case
message String Brief message about what is wrong

Sample request


DELETE /en/api/mobile/session/320a35af-19c9-eecd-5f7e-8725393bd955 HTTP/1.1
Host: app.marksign.local
Content-Type: application/json

{
  "access_token": "52900c96-3f60-5307-3719-5948f0191da6"
}

Sample response

Sample success response


{
  "status": "ok"
}

Sample failed response


{
  "status": "error",
  "message": "Request number is invalid"
}

Implementation

CURL


curl --location --request DELETE 'https://app.marksign.local/en/api/mobile/session/320a35af-19c9-eecd-5f7e-8725393bd955' \
--header 'Content-Type: application/json' \
--data-raw '{
  "access_token": "52900c96-3f60-5307-3719-5948f0191da6"
}'

Using php-client

To use the php-client, please follow the installation and basic usage here, and use AppBundle\GatewaySDKPhp\RequestBuilder\MobileidIdentificationRemoveRequestBuilder as request builder.


/**
 * The sessionId is the value of 'token' found either
 * from the response of 'Initialize authentication via mobile id' request
 * or 'Initialize signing via mobile id' request
 * or 'Initialize hash signing via mobile id' request
 * The following is a dummy to use as example.
 */
$sessionId = '98ead4e1-015b-4968-bdcd-03797d1a4bea';

$indentRemReq = (new MobileidIdentificationRemoveRequestBuilder)
  ->withSessionId($sessionId)
  ->createRequest();
$indentRemRes = $client->postRequest($indentRemReq);
$indentRemResArray = $indentRemRes->toArray();
var_dump($indentRemResArray);