summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-12-20 18:06:05 +0000
committerSimon MacMullen <simon@rabbitmq.com>2010-12-20 18:06:05 +0000
commitda12ce881233558f234d74a61bb26ed9f73087da (patch)
tree1c6884a06c4e2164034870ba9c429e6074b98ba1
parentd58725a5e6045b809614dade49c1a346091ed225 (diff)
downloadrabbitmq-server-da12ce881233558f234d74a61bb26ed9f73087da.tar.gz
More comments
-rw-r--r--src/rabbit_auth_backend.erl30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/rabbit_auth_backend.erl b/src/rabbit_auth_backend.erl
index 18f32873..002818d4 100644
--- a/src/rabbit_auth_backend.erl
+++ b/src/rabbit_auth_backend.erl
@@ -35,13 +35,41 @@
behaviour_info(callbacks) ->
[
- %% A description (TODO should this be here if we're not using registry?).
+ %% A description proplist as with auth mechanisms,
+ %% exchanges. Currently unused.
{description, 0},
+ %% Check a user can log in, given a username and a proplist of
+ %% authentication information (e.g. [{password, Password}]).
+ %%
+ %% Possible responses:
+ %% {ok, User}
+ %% Authentication succeeded, and here's the user record.
+ %% {error, Msg, Args}
+ %% Something went wrong. Log and die.
+ %% {refused, Msg, Args}
+ %% Client failed authentication. Log and die.
{check_user_login, 2},
+ %% Given #user, vhost path and permission, can a user access a vhost?
+ %% Permission is read - learn of the existence of (only relevant for
+ %% management plugin)
+ %% or write - log in
+ %%
+ %% Possible responses:
+ %% true
+ %% false
+ %% {error, Msg}
+ %% Something went wrong. Log and die.
{check_vhost_access, 3},
+ %% Given #user, resource and permission, can a user access a resource?
+ %%
+ %% Possible responses:
+ %% true
+ %% false
+ %% {error, Msg}
+ %% Something went wrong. Log and die.
{check_resource_access, 3}
];
behaviour_info(_Other) ->