Site Tools


guides:ws_store_checksum

This is an old revision of the document!


Web Service: StoreChecksum

The StoreChecksum web service is used to obtain a ‘soft-token’. A ‘soft-token’ is required to call any other CeRTNA web service. A user name and password are provided as parameters to the Login web service.

In October 2018, CeRTNA added a requirement to include a SALT value when preparing your encrypted password string. The sample code blocks included later in this page show how to obtain your SALT value and use it when encrypting your password.

Request Endpoint

Method URL
POST https://apex-prd.certna.org/user/login

Request Body

This endpoint accepts request body parameters using an application/json format.

Request Headers

Key Value
Content-Type application/json

JSON Request Parameters

Parm Name Req/Opt Format Description
user_name Required [string] User name.
password Required [string] Base64 encoded SHA1 hash. See Comment 1.

JSON Response Parameters

Parm Name Format Description
access_token [string] Upon successful login this parameter will be returned.
code [string] Upon login failure this parameter will be returned.
message [string] Upon login failure this parameter will be returned.

As noted, any condition that results in an unsuccessful login will produce a JSON formatted response with a code and message property populated. Successful logins will result in the access_token property being returned and the token can be used for subsequent web service call for the duration of the web session.

Sample Request

Endpoint:

https://apex-prd.certna.org/user/login

Headers:

Content-Type: application/json

Body:

{
  "user_name" : "sample1",
  "password" : "i4Z15hsQxRv0527iliRhb4j3/OlbtFu0SCn/7Sp+Sqk="
}

Sample Response:

Status Code: 200

or

Status Code: 500 (When an error occurs.)

{
    "access_token": "534d4c30-28a0-48c8-a76d-bbd265d7a1ac"
}

or (example 1)

{
    "Exception": {
        "Code": "DatabaseError",
        "Message": "The user name or/and password are invalid."
    }
}

or (example 2)

{
    "Exception": {
        "Code": "DatabaseError",
        "Message": "Procedure or function 'spLogin_New' expects parameter '@PASSWORD', which was not supplied."
    }
}

Additional Comments

Comments and sample code are provided for reference purposes only and are not intended to show all exception handling conditions and/or completed code blocks.

guides/ws_store_checksum.1540574104.txt.gz · Last modified: by brett.zamora