1

User Session Management- - How do we maintain the user sessions by using only SlashDB?
- Is there any other resources required for that or only SlashDb is sufficient?

1 Answers1

0

SlashDB has cookie based session management. Whenever a user logs into the GUI with username/password a cookie is generated/checked. Although generally a stateless mechanism of API keys is preferred, the cookie-based method can be used from a client apps.

curl 'https://your-slashdb-host/login' -v
-H 'Pragma: no-cache'
-H 'Origin: https://demo.slashdb.com'
-H 'Accept-Encoding: gzip, deflate'
-H 'Accept-Language: en-US,en;q=0.8,pl;q=0.6,fr;q=0.4'
-H 'Content-Type: application/json;charset=UTF-8'
-H 'Accept: application/json, text/plain, */*'
-H 'Cache-Control: no-cache'
-H 'Referer: http://myslashdbhost/'
-H 'Connection: keep-alive'
--data-binary '{"login":"someuser","password":"secret-password"}'
--compressed

The response will contain cookie headers

Set-Cookie: auth_tkt=ffeef88c70bda165db830dxxb35b503559a6c5b0YWRtaW4%3D!userid_type:b64unicode; Max-Age=3600; Path=/; expires=Wed, 30-Aug-2017 15:03:28 GMT
Victor Olex
  • 1,458
  • 1
  • 13
  • 28