Skip to content

Commit 82ed789

Browse files
Explain the heads in rabbit_auth_backend_internal:user_login_authentication/2.
[#153435857]
1 parent eed0d39 commit 82ed789

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rabbit_auth_backend_internal.erl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,14 @@ hashing_module_for_user(#internal_user{
9898
hashing_algorithm = ModOrUndefined}) ->
9999
rabbit_password:hashing_mod(ModOrUndefined).
100100

101+
%% For cases when we do not have a set of credentials,
102+
%% namely when x509 (TLS) certificates are used. This should only be
103+
%% possible when the EXTERNAL authentication mechanism is used, see
104+
%% rabbit_auth_mechanism_plain:handle_response/2 and rabbit_reader:auth_phase/2.
101105
user_login_authentication(Username, []) ->
102106
internal_check_user_login(Username, fun(_) -> true end);
107+
%% For cases when we do have a set of credentials. rabbit_auth_mechanism_plain:handle_response/2
108+
%% performs initial validation.
103109
user_login_authentication(Username, AuthProps) ->
104110
case lists:keyfind(password, 1, AuthProps) of
105111
{password, Cleartext} ->

0 commit comments

Comments
 (0)