diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-12-20 18:06:05 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-12-20 18:06:05 +0000 |
commit | da12ce881233558f234d74a61bb26ed9f73087da (patch) | |
tree | 1c6884a06c4e2164034870ba9c429e6074b98ba1 /src/rabbit_auth_backend.erl | |
parent | d58725a5e6045b809614dade49c1a346091ed225 (diff) | |
download | rabbitmq-server-da12ce881233558f234d74a61bb26ed9f73087da.tar.gz |
More comments
Diffstat (limited to 'src/rabbit_auth_backend.erl')
-rw-r--r-- | src/rabbit_auth_backend.erl | 30 |
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) -> |