datopian / frontend-v2

CKAN / Data Portal frontend as microservice in pure Javascript (Node).
http://tech.datopian.com/frontend/
MIT License
38 stars 18 forks source link

Feature/user session #156

Closed starsinmypockets closed 4 years ago

starsinmypockets commented 4 years ago

Use USER_ACCOUNTS_ENABLED in .env to enable account management routes:

Internally, we use req.session.ckan_user to store logged user's API Key and profile info.

Logout deletes user from express session.

Implementer is responsible for exposing user_login method on CKAN Classic backend (see ckanext-nationalgrid for example)

Tests could be improved -- need to find a way to mock sessions to check creation / destruction of user on session (open to suggestions here!)

starsinmypockets commented 4 years ago

@anuveyatsu I'll see what I can do about test coverage. In the meantime your review will be greatly appreciated!