Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Getting started example #18

Closed
wpoosanguansit opened this issue Dec 12, 2016 · 4 comments
Closed

Getting started example #18

wpoosanguansit opened this issue Dec 12, 2016 · 4 comments

Comments

@wpoosanguansit
Copy link

Hi, I am new to servant and, implicitly, servant-auth. I managed to get the code running in my local instance. However, I am still not clear on how to use the code to protect resources. Would it be possible to provide a more complete example - having user creating accounts or token + defining protected/unprotected endpoints? I do see in the current example code calling

localhost:7249/name -v

However, I still do not see where that is defined, i.e. Thanks for your help.

@wpoosanguansit wpoosanguansit changed the title More documentation. More Howto Documentation. Dec 12, 2016
@3noch
Copy link
Contributor

3noch commented May 23, 2017

I think the README is missing an example of a POST to the /login endpoint.

Here's how:

curl localhost:7249/login -H 'Content-Type: application/json' -X POST -d '{"username":"Ali Baba","password":"Open Sesame"}' -v

@wpoosanguansit
Copy link
Author

Thank you for your help. I also found that :<|> serveDirectory "example/static" was moved to last in the route as well. (it was the first argument before). Now I have got it working. Thanks again.

@domenkozar domenkozar changed the title More Howto Documentation. Getting started example Jun 18, 2018
@domenkozar
Copy link
Collaborator

@domenkozar
Copy link
Collaborator

Don't think there's much to do here :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants