Skip to content

Commit 20945a9

Browse files
Explain the heads in rabbit_auth_backend_internal:user_login_authentication/2.
[#153435857]
1 parent 641036f commit 20945a9

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
@@ -93,8 +93,14 @@ hashing_module_for_user(#internal_user{
9393
hashing_algorithm = ModOrUndefined}) ->
9494
rabbit_password:hashing_mod(ModOrUndefined).
9595

96+
%% For cases when we do not have a set of credentials,
97+
%% namely when x509 (TLS) certificates are used. This should only be
98+
%% possible when the EXTERNAL authentication mechanism is used, see
99+
%% rabbit_auth_mechanism_plain:handle_response/2 and rabbit_reader:auth_phase/2.
96100
user_login_authentication(Username, []) ->
97101
internal_check_user_login(Username, fun(_) -> true end);
102+
%% For cases when we do have a set of credentials. rabbit_auth_mechanism_plain:handle_response/2
103+
%% performs initial validation.
98104
user_login_authentication(Username, AuthProps) ->
99105
case lists:keyfind(password, 1, AuthProps) of
100106
{password, Cleartext} ->

0 commit comments

Comments
 (0)