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 | be0644ab97c719612b1752c1548cac70ad5b98a7 (patch) | |
| tree | 1c6884a06c4e2164034870ba9c429e6074b98ba1 /src | |
| parent | 79126cdd252ae20adeb8bb1f634f0dfa5b47688c (diff) | |
| download | rabbitmq-server-git-be0644ab97c719612b1752c1548cac70ad5b98a7.tar.gz | |
More comments
Diffstat (limited to 'src')
| -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 18f32873fc..002818d4f5 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) -> |
