Skip to content

Commit 85e8b97

Browse files
Hathoutemergify[bot]
authored andcommitted
Update rabbit_oauth2_schema.erl
(cherry picked from commit ed5f29c) (cherry picked from commit f1ee5b5) # Conflicts: # deps/rabbitmq_auth_backend_oauth2/src/rabbit_oauth2_schema.erl
1 parent 0ed973a commit 85e8b97

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

deps/rabbitmq_auth_backend_oauth2/src/rabbit_oauth2_schema.erl

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,29 @@
77

88
-module(rabbit_oauth2_schema).
99

10+
<<<<<<< HEAD
11+
=======
12+
-define(AUTH_OAUTH2, "auth_oauth2").
13+
-define(SCOPE_ALIASES, "scope_aliases").
14+
-define(RESOURCE_SERVERS, "resource_servers").
15+
-define(OAUTH_PROVIDERS, "oauth_providers").
16+
-define(SIGNING_KEYS, "signing_keys").
17+
-define(AUTH_OAUTH2_SCOPE_ALIASES, ?AUTH_OAUTH2 ++ "." ++ ?SCOPE_ALIASES).
18+
-define(AUTH_OAUTH2_RESOURCE_SERVERS, ?AUTH_OAUTH2 ++ "." ++ ?RESOURCE_SERVERS).
19+
-define(AUTH_OAUTH2_OAUTH_PROVIDERS, ?AUTH_OAUTH2 ++ "." ++ ?OAUTH_PROVIDERS).
20+
-define(AUTH_OAUTH2_SIGNING_KEYS, ?AUTH_OAUTH2 ++ "." ++ ?SIGNING_KEYS).
21+
-define(RESOURCE_SERVERS_SYNONYMS, #{
22+
"additional_scopes_key" => "extra_scopes_source"
23+
}).
24+
>>>>>>> f1ee5b551a (Update rabbit_oauth2_schema.erl)
1025

1126
-export([
1227
translate_oauth_providers/1,
1328
translate_resource_servers/1,
1429
translate_signing_keys/1
1530
]).
1631

17-
-define(RESOURCE_SERVERS_SYNONYMS, #{
18-
"additional_scopes_key" => "extra_scopes_source"
19-
}).
20-
21-
resource_servers_key_synonym(Name) ->
22-
case maps:find(Name, ?RESOURCE_SERVERS_SYNONYMS) of {ok, Synonym} -> Synonym;
23-
error -> Name
24-
end.
32+
resource_servers_key_synonym(Key) -> maps:get(Key, ?RESOURCE_SERVERS_SYNONYMS, Key).
2533

2634
extract_key_as_binary({Name,_}) -> list_to_binary(Name).
2735
extract_value({_Name,V}) -> V.

0 commit comments

Comments
 (0)