Logging in
From DreamFactory
MikeRentoul3 (Talk | contribs) (Created page with "My name is Mike and I аm studying Optometry ɑnd Anthropology and Sociology аt Terme Di Stigliano / Italy.<br><br>Ϻy web site :: [https://www.facebook.com/eshopcardcodesgen...") |
(→Logging in as a User (non-admin)) |
||
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | === Logging in as an Admin === | |
+ | |||
+ | The Admin login API endpoint is api/v2/system/admin/session | ||
+ | |||
+ | Request URL: | ||
+ | |||
+ | <pre>POST https://foo.com/api/v2/system/admin/session</pre> | ||
+ | |||
+ | Request body: | ||
+ | |||
+ | <source lang="JavaScript"> | ||
+ | { | ||
+ | "email": "admin@example.com", | ||
+ | "password": "secret", | ||
+ | "remember_me": false | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | cURL: | ||
+ | |||
+ | <pre>curl -i -k -3 -X POST "https://foo.com/api/v2/system/admin/session" -d '{ "email" : "admin@example.com", "password" : "secret" }' -H "Content-Type: application/json"</pre> | ||
+ | |||
+ | Note: Set remember_me=true to get a JWT (token) that can be refreshed forever (until logout) without authentication.'' | ||
+ | |||
+ | === Logging in as a User (Non-Admin) === | ||
+ | |||
+ | The non-admin login API endpoint is api/v2/user/session | ||
+ | |||
+ | Request URL: | ||
+ | |||
+ | <pre>POST https://foo.com/api/v2/user/session</pre> | ||
+ | |||
+ | Request body: | ||
+ | |||
+ | <source lang="JavaScript"> | ||
+ | { | ||
+ | "email": "user@example.com", | ||
+ | "password": "secret", | ||
+ | "remember_me": false | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | cURL: | ||
+ | |||
+ | <pre>curl -i -k -3 -X POST "https://foo.com/api/v2/user/session" -d '{ "email" : "user@example.com", "password" : "secret" }' -H "Content-Type: application/json"</pre> | ||
+ | |||
+ | Note: Set remember_me=true to get a JWT (token) that can be refreshed forever (until logout) without authentication.'' |
Latest revision as of 20:38, 14 July 2016
Logging in as an Admin
The Admin login API endpoint is api/v2/system/admin/session
Request URL:
POST https://foo.com/api/v2/system/admin/session
Request body:
{ "email": "admin@example.com", "password": "secret", "remember_me": false }
cURL:
curl -i -k -3 -X POST "https://foo.com/api/v2/system/admin/session" -d '{ "email" : "admin@example.com", "password" : "secret" }' -H "Content-Type: application/json"
Note: Set remember_me=true to get a JWT (token) that can be refreshed forever (until logout) without authentication.
Logging in as a User (Non-Admin)
The non-admin login API endpoint is api/v2/user/session
Request URL:
POST https://foo.com/api/v2/user/session
Request body:
{ "email": "user@example.com", "password": "secret", "remember_me": false }
cURL:
curl -i -k -3 -X POST "https://foo.com/api/v2/user/session" -d '{ "email" : "user@example.com", "password" : "secret" }' -H "Content-Type: application/json"
Note: Set remember_me=true to get a JWT (token) that can be refreshed forever (until logout) without authentication.