Closed starsinmypockets closed 4 years ago
Use USER_ACCOUNTS_ENABLED in .env to enable account management routes:
USER_ACCOUNTS_ENABLED
.env
/login
/signup
/logout
/profile
Internally, we use req.session.ckan_user to store logged user's API Key and profile info.
req.session.ckan_user
Logout deletes user from express session.
Implementer is responsible for exposing user_login method on CKAN Classic backend (see ckanext-nationalgrid for example)
user_login
Tests could be improved -- need to find a way to mock sessions to check creation / destruction of user on session (open to suggestions here!)
@anuveyatsu I'll see what I can do about test coverage. In the meantime your review will be greatly appreciated!
Use
USER_ACCOUNTS_ENABLED
in.env
to enable account management routes:/login
/signup
/logout
/profile
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!)