conductor v0.2.1 Conductor.Plugs.Authorize

Plug added to controllers by Conductor macro

It takes list of scopes as option, concatenates it with list of root scopes and check assings inside conn.

If at least one scope from conn is on list of authorized scopes then action can be performed. Otherwise it will respond according to choosen failure strategy (default: raise Conductor.Error)

Summary

Functions

Callback implementation for Plug.call/2

Callback implementation for Plug.init/1

Functions

call(conn, scopes)

Callback implementation for Plug.call/2.

init(scopes)

Callback implementation for Plug.init/1.