Is restful API going to be used by humans that can actually login, or by machines?
Implementing functionality you're talking about is easy: for RESTful mutations, check Cookie header for auth info. If not present, send redirect to login. Login page would send credentials, and server replies with Set-Cookie. On Wed, Oct 8, 2014 at 4:04 PM, Carlos Tangerino <[email protected] > wrote: > Thank you Sergey. > The use case is: > mongoose server a REST. > User can view all the site if he is in a guest mode (no authentication). > Once he try to save (post/put/delete) anything, the rest will decide if he > can do or not, so maybe showing an error message and redirecting him to the > login page. > Thanks > > On Sunday, October 5, 2014 6:28:41 PM UTC+2, Sergey Lyubka wrote: >> >> chat.c has been removed. You can take a look at the older releases for >> the reference: >> https://github.com/cesanta/mongoose/blob/5.0/examples/chat.c >> >> We'll add a separate example for cookie-based auth soon. >> >> >> On Sun, Oct 5, 2014 at 12:08 PM, Carlos Tangerino <[email protected]> >> wrote: >> >>> The doc states >>> several ways of implementing authentication on the server side. For >>> another, 226 >>> <https://github.com/cesanta/mongoose/blob/3a8ae7ac1735652ab1fa66d4ddd46c85b1b7faac/docs/API.md#L226>cookie-based >>> way please refer to the examples/chat.c in the source tree. 227 >>> <https://github.com/cesanta/mongoose/blob/3a8ae7ac1735652ab1fa66d4ddd46c85b1b7faac/docs/API.md#L227>If >>> password is not NULL, entry is added (or modified if already exists). >>> I could not find the chat.c file >>> >>> Thanks >>> >>> Carlos >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "mongoose-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/mongoose-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "mongoose-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/mongoose-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "mongoose-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mongoose-users. For more options, visit https://groups.google.com/d/optout.
