camwest / chargepoint-rest-mock

Fake REST API for chargepoint REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fake Login

camwest opened this issue · comments

  • POST /users/validate
  • Fields
    • user_name
    • user_password
  • Returns an authorization cookie which should be provided to all other requests

Example Request

POST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

user_name=camwest
user_password=abc123

Example Response

HTTP/1.1 302 Found
Server: nginx
Set-Cookie: ci_ui_session=abc123; expires=Mon, 25-Apr-2016 19:45:25 GMT; path=/; domain=chargepoint.com; secure; httponly
Content-Type: text/html; charset=UTF-8
Location: https://na.chargepoint.com/home
Strict-Transport-Security: max-age=31536000; includeSubDomains
Date: Mon, 25 Apr 2016 17:45:25 GMT
Content-Length: 0
Connection: close