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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -