Auth - Login
/auth/login/{user}/{pass}&returnurl={url}
/auth/login/?username={user}&password={pass}&returnurl={url}
/auth/login/{user}/{pass}&override=false
/auth/login/{user}/{pass}&multi=true (admin only)
Authenticates a session for the current user/environment. This will return a cookie that is active for 30m from last action.
If an API key is specifed (via REST or the GUI) then any API command can be authenticated with the URL parameter "infinite_api_key" instead of logging in. API keys can be used in cookies also, in the format "infinitecookie=api:API_KEY;"
Authentication
Not required (this call provides authorization)
Arguments
user (required)
username required to login, usually in the format of bob@ikanow.com
pass (required)
password required to login, encrypted with SHA-256 (base 64) and URL-encoded
return_tmp_key (optional)
If set to true or "1" (default: false), them the temporary authentication cookie is returned in the "data" parameter. This can then be used in the "infinite_api_key" parameter (with "tmp:" prepended, eg "&infinite_api_key=tmp:541ad994eca9d8e1b387bf2c") as an alternative to using cookies (in fact this is the only way of performing cross-domain authentication from the browser)
override (optional)
If set to false or "0" (true is default), then login will fail if user is already logged in elsewhere (default is that the other location's login will be invalidated)
multi (optional, admin only)
If set to true or "1" (false is default), then multiple logins are allowed.
returnurl (optional)
after login browser will redirect to this location
if a returnurl is supplied, &success=true/false will be appended to the url string to indicate success or failure
Example
http://infinite.ikanow.com/api/auth/login/bob@ikanow.com/7nrsLRbgCQOZEpmJclExmK5vRVN9%2FgeopIuojZBFmNU%3B
http://infinite.ikanow.com/api/auth/login?username=bob@ikanow.com&password=7nrsLRbgCQOZEpmJclExmK5vRVN9%2FgeopIuojZBFmNU%3B&return_tmp_key=true
Example Response
{ "response": { "action": "Login", "success": true, "time": 0 }, "data": "541ad994eca9d8e1b387bf2c" }