POST /Auth/Verify/Login

This process is called for every page requiring the user to be logged in. It looks at the JWT token sent in and returns information about it. Token is usually passed as a cookie. Secret Hmac and page href Required. Cache Time 1 Hour.

application/json

Body Required

  • Token string

    optional jwt token returned from a previous call to /Auth/Verify/Login or /Auth/Verify/Token

  • Href string

    required copy of document.href since referrer is not always accurate

  • Username string

    the username entered - or nothing if already logged in or verifying still logged in

  • Password string

    the password entered - or nothing if already logged in or verifying still logged in

Responses

  • 200 application/json

    Login successful

    Hide response attributes Show response attributes object
    • Valid number

      0 if expired, 1 if not

    • Expires number

      Seconds until the jwt token expires and login is valid. If expired, it returns negative seconds

    • Custno number

      Customer User Number (frequently the same as parent)

    • Parent number

      Parent User Number

    • IdLogin number

      The current user Login Id

    • LoginIp string

      the Ip address of the logged in user

    • Message string

      the message to display on the screen

    • FirstName string

      the First Name of the logged in user

    • LastName string

      the Last Name of the logged in user

    • LoginTime string

      the date/time logged in (YYYYMMDDHHMMSS)

    • PrevLogin string

      the date/time previously logged in (YYYYMMDDHHMMSS)

  • 401 application/json

    User Unauthorized

    Hide response attributes Show response attributes object
    • Valid number

      0 if expired, 1 if not

    • Expires number

      Seconds until the jwt token expires and login is valid. If expired, it returns negative seconds

    • Username string

      If they checked to save username, this responds with the last username passed

    • Message string

      debug message for why this failed

POST /Auth/Verify/Login
curl \
 --request POST 'https://api.wereadthemanual.com/v1.0/Auth/Verify/Login' \
 --header "X-ApiKey: $API_KEY" \
 --header "X-ApiDate: $API_KEY" \
 --header "X-ApiHmac: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"Token":"base 64 encoded stuffs","Href":"https://www.whyreadthemanual.com/login","Username":"username","Password":"password"}'
Request examples
{
  "Token": "base 64 encoded stuffs",
  "Href": "https://www.whyreadthemanual.com/login",
  "Username": "username",
  "Password": "password"
}
Response examples (200)
{
  "Valid": 1,
  "Expires": 1,
  "Custno": 10028,
  "Parent": 10028,
  "IdLogin": 9,
  "LoginIp": "Doe",
  "Message": "Welcome John.  Your last login was 28 days ago",
  "FirstName": "John",
  "LastName": "Doe",
  "LoginTime": 20250101000000,
  "PrevLogin": 20250101000000
}
Response examples (401)
{
  "Valid": 0,
  "Expires": -3600,
  "Message": "Token expired 33 minutes ago or No User or Password Expired",
  "Username": ""
}