RestAuth v0.9.5 API Reference

Modules

RestAuth is a declarative ACL library for Phoenix. It functions by declaring a controller level plug with a set of roles specified for the given action. It also provides a framework for doing per-item-ACL with ETS backed caching built in

An authority struct. Used to hold information about the current user/authority granted

Generic caching service to be used by the user implemented handler module. Has API style meant to be used by the handler and most access should be routed through there

Generic controller handling login and logout

Sample Handler module showing intended flow and a sample set of internal helpers. Will throw warnings if used in an actual app. Intention is to be inspiration for your own handler module

This behavior is a requirement to use RestAUth. Please refer to the docs for each function to see how to implement the callbacks

RestAuth.Restrict is where the magic happens

Module is responsible for taking a set of user roles and checking them against required roles on action