Openmaize v2.1.0 Openmaize.Authenticate
Authenticate the current user, using sessions.
Options
There is one option:
db_module - the module that is used to query the database
- the default is MyApp.OpenmaizeEcto - the name of the module generated by
mix openmaize.gen.ectodb
- if you implement your own database module, it needs to implement the Openmaize.Database behaviour
- the default is MyApp.OpenmaizeEcto - the name of the module generated by
Example using Phoenix
Add the following line to the pipeline in the web/router.ex
file:
plug Openmaize.Authenticate