|
4 | 4 | %% |
5 | 5 | %% Copyright (c) 2007-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved. |
6 | 6 | %% |
| 7 | + |
7 | 8 | -module(rabbit_auth_backend_oauth2). |
8 | 9 |
|
9 | 10 | -include_lib("rabbit_common/include/rabbit.hrl"). |
@@ -74,7 +75,7 @@ check_vhost_access(#auth_user{impl = DecodedTokenFun}, |
74 | 75 | with_decoded_token(DecodedTokenFun(), |
75 | 76 | fun(_Token) -> |
76 | 77 | DecodedToken = DecodedTokenFun(), |
77 | | - Scopes = get_scopes(DecodedToken), |
| 78 | + Scopes = get_scopes(DecodedToken), |
78 | 79 | ScopeString = rabbit_oauth2_scope:concat_scopes(Scopes, ","), |
79 | 80 | rabbit_log:debug("Matching virtual host '~ts' against the following scopes: ~ts", [VHost, ScopeString]), |
80 | 81 | rabbit_oauth2_scope:vhost_access(VHost, Scopes) |
@@ -182,8 +183,8 @@ check_token(Token) -> |
182 | 183 | {refused, {error, Reason}}; |
183 | 184 | {true, TargetResourceServerId, Payload} -> |
184 | 185 | Payload0 = post_process_payload(TargetResourceServerId, Payload), |
185 | | - validate_payload(TargetResourceServerId, Payload0) |
186 | | -% _ -> {refused, signature_invalid} |
| 186 | + validate_payload(TargetResourceServerId, Payload0); |
| 187 | + _ -> {refused, signature_invalid} |
187 | 188 | end. |
188 | 189 |
|
189 | 190 | post_process_payload(ResourceServerId, Payload) when is_map(Payload) -> |
|
0 commit comments