deitch / cansecurity

nodejs/expressjs authentication and security library
MIT License
150 stars 53 forks source link

How to Login #6

Closed lholmquist closed 8 years ago

lholmquist commented 9 years ago

After ready the docs, i'm failing how to see how to actually log in.

deitch commented 9 years ago

@lholmquist cansecurity is entirely server-side, in node. You request login credentials from the user in a client-side app / browser.

cansecurity doesn't understand the concept of "login" because there is no such concept.

Each and every request must contain valid credentials. Those can be one of:

For username and password, you receive the credentials from the standard HTTP Basic-Authentication header, and pass them to the validate() method that was given during cansec.init(). If it calls back with the first argument of true, then the credentials are validated, else they are not.

See this part of the docs https://github.com/deitch/cansecurity#example

Does this answer your question?

deitch commented 8 years ago

Open several years, closing this out. If still an issue, please comment.