summaryrefslogtreecommitdiff
path: root/deps/rabbit/test/rabbit_dummy_protocol_connection_info.erl
diff options
context:
space:
mode:
Diffstat (limited to 'deps/rabbit/test/rabbit_dummy_protocol_connection_info.erl')
-rw-r--r--deps/rabbit/test/rabbit_dummy_protocol_connection_info.erl19
1 files changed, 19 insertions, 0 deletions
diff --git a/deps/rabbit/test/rabbit_dummy_protocol_connection_info.erl b/deps/rabbit/test/rabbit_dummy_protocol_connection_info.erl
new file mode 100644
index 0000000000..92c01d2b0e
--- /dev/null
+++ b/deps/rabbit/test/rabbit_dummy_protocol_connection_info.erl
@@ -0,0 +1,19 @@
+%% This Source Code Form is subject to the terms of the Mozilla Public
+%% License, v. 2.0. If a copy of the MPL was not distributed with this
+%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
+%%
+%% Copyright (c) 2017-2020 VMware, Inc. or its affiliates. All rights reserved.
+%%
+
+%% Dummy module to test rabbit_direct:extract_extra_auth_props
+
+-module(rabbit_dummy_protocol_connection_info).
+
+%% API
+-export([additional_authn_params/4]).
+
+additional_authn_params(_Creds, _VHost, Pid, _Infos) ->
+ case Pid of
+ -1 -> throw(error);
+ _ -> [{client_id, <<"DummyClientId">>}]
+ end.