authentication - How do you require an api token in elixir? -


building basic api accepts posts on endpoint add data , display on dashboard. api require token posts permitted not sure how so... using sugar framework handle http requests.

you use route guards suppose:

post "/resource/:api_key" when api_key == @api_key, controller, :dostuff 

sugar still alpha, don't know if supports middleware yet or not. might better off using plug directly until sugar stabilizes.


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -