File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
deps/rabbitmq_auth_backend_oauth2/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 16
16
-define (AUTH_OAUTH2_RESOURCE_SERVERS , ? AUTH_OAUTH2 ++ " ." ++ ? RESOURCE_SERVERS ).
17
17
-define (AUTH_OAUTH2_OAUTH_PROVIDERS , ? AUTH_OAUTH2 ++ " ." ++ ? OAUTH_PROVIDERS ).
18
18
-define (AUTH_OAUTH2_SIGNING_KEYS , ? AUTH_OAUTH2 ++ " ." ++ ? SIGNING_KEYS ).
19
+ -define (RESOURCE_SERVERS_SYNONYMS , #{
20
+ " additional_scopes_key" => " extra_scopes_source"
21
+ }).
19
22
20
23
-export ([
21
24
translate_oauth_providers /1 ,
25
28
translate_scope_aliases /1
26
29
]).
27
30
28
- -define (RESOURCE_SERVERS_SYNONYMS , #{
29
- " additional_scopes_key" => " extra_scopes_source"
30
- }).
31
-
32
- resource_servers_key_synonym (Name ) ->
33
- case maps :find (Name , ? RESOURCE_SERVERS_SYNONYMS ) of {ok , Synonym } -> Synonym ;
34
- error -> Name
35
- end .
31
+ resource_servers_key_synonym (Key ) -> maps :get (Key , ? RESOURCE_SERVERS_SYNONYMS , Key ).
36
32
37
33
extract_key_as_binary ({Name ,_ }) -> list_to_binary (Name ).
38
34
extract_value ({_Name ,V }) -> V .
You can’t perform that action at this time.
0 commit comments