Rajska v0.8.0 Rajska.Authorization behaviour View Source
Behaviour of an Authorization module.
Link to this section Summary
Link to this section Types
Link to this section Callbacks
Link to this callback
field_authorized?(current_user_role, scope_by, source)
View Source (optional)field_authorized?(current_user_role(), scope_by :: atom(), source :: map()) :: boolean()
Link to this callback
get_current_user(context)
View Source (optional)get_current_user(context :: map()) :: current_user()
Link to this callback
get_user_role(current_user)
View Source (optional)get_user_role(current_user()) :: role()
Link to this callback
role_authorized?(current_user_role, allowed_role)
View Source (optional)role_authorized?(current_user_role(), allowed_role :: role()) :: boolean()
Link to this callback
unauthorized_msg(resolution)
View Source (optional)unauthorized_msg(resolution :: Absinthe.Resolution.t()) :: String.t()