Skip to content

Commit 71d8fbf

Browse files
Teet extra token parans for additioal resource servers
1 parent 5ad0ed3 commit 71d8fbf

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

deps/rabbitmq_management/test/rabbit_mgmt_wm_auth_SUITE.erl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,15 @@ groups() ->
317317
]},
318318
{with_token_endpoint_params_0, [], [
319319
should_return_mgt_oauth_resource_rabbit_with_token_endpoint_params_0
320+
]},
321+
{with_resource_server_a, [], [
322+
{with_mgt_resource_server_a_with_authorization_endpoint_params_1, [], [
323+
should_return_mgt_oauth_resource_a_with_authorization_endpoint_params_1
324+
]},
325+
{with_mgt_resource_server_a_with_token_endpoint_params_1, [], [
326+
should_return_mgt_oauth_resource_a_with_token_endpoint_params_1
327+
]}
328+
320329
]}
321330
]}
322331
]}
@@ -472,6 +481,14 @@ init_per_group(with_token_endpoint_params_0, Config) ->
472481
set_env(rabbitmq_management, oauth_token_endpoint_params,
473482
?config(token_params_0, Config)),
474483
Config;
484+
init_per_group(with_mgt_resource_server_a_with_authorization_endpoint_params_1, Config) ->
485+
set_attribute_in_entry_for_env_variable(rabbitmq_management, oauth_resource_servers,
486+
?config(a, Config), oauth_authorization_endpoint_params, ?config(authorization_params_1, Config)),
487+
Config;
488+
init_per_group(with_mgt_resource_server_a_with_token_endpoint_params_1, Config) ->
489+
set_attribute_in_entry_for_env_variable(rabbitmq_management, oauth_resource_servers,
490+
?config(a, Config), oauth_token_endpoint_params, ?config(token_params_1, Config)),
491+
Config;
475492

476493

477494
init_per_group(_, Config) ->
@@ -583,6 +600,14 @@ end_per_group(with_authorization_endpoint_params_0, Config) ->
583600
end_per_group(with_token_endpoint_params_0, Config) ->
584601
unset_env(rabbitmq_management, oauth_token_endpoint_params),
585602
Config;
603+
end_per_group(with_mgt_resource_server_a_with_authorization_endpoint_params_1, Config) ->
604+
remove_attribute_from_entry_from_env_variable(rabbitmq_management, oauth_resource_servers,
605+
?config(a, Config), oauth_authorization_endpoint_params),
606+
Config;
607+
end_per_group(with_mgt_resource_server_a_with_token_endpoint_params_1, Config) ->
608+
remove_attribute_from_entry_from_env_variable(rabbitmq_management, oauth_resource_servers,
609+
?config(a, Config), oauth_token_endpoint_params),
610+
Config;
586611

587612

588613
end_per_group(_, Config) ->
@@ -786,6 +811,14 @@ should_return_mgt_oauth_resource_rabbit_with_token_endpoint_params_0(Config) ->
786811
assertEqual_on_attribute_for_oauth_resource_server(authSettings(),
787812
Config, rabbit, oauth_token_endpoint_params, token_params_0).
788813

814+
should_return_mgt_oauth_resource_a_with_authorization_endpoint_params_1(Config) ->
815+
assertEqual_on_attribute_for_oauth_resource_server(authSettings(),
816+
Config, a, oauth_authorization_endpoint_params, authorization_params_1).
817+
818+
should_return_mgt_oauth_resource_a_with_token_endpoint_params_1(Config) ->
819+
assertEqual_on_attribute_for_oauth_resource_server(authSettings(),
820+
Config, a, oauth_token_endpoint_params, token_params_1).
821+
789822
%% -------------------------------------------------------------------
790823
%% Utility/helper functions
791824
%% -------------------------------------------------------------------

0 commit comments

Comments
 (0)