Skip to content

Commit 504de57

Browse files
Merge pull request #12173 from rabbitmq/mergify/bp/v3.13.x/pr-12171
Support tokens without kid when using multiple oauth providers and/or resource servers (backport #11965) (backport #12171)
2 parents d97fbe9 + 6d7236f commit 504de57

21 files changed

+2667
-1218
lines changed

deps/oauth2_client/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ rabbitmq_integration_suite(
108108
size = "small",
109109
additional_beam = [
110110
"test/oauth_http_mock.beam",
111+
"test/oauth2_client_test_util.beam",
111112
],
112113
runtime_deps = [
113114
"@cowboy//:erlang_app",

deps/oauth2_client/include/oauth2_client.hrl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,19 @@
4848
%% The closest we have to a type import in Erlang
4949
-type option(T) :: rabbit_types:option(T).
5050

51+
-type oauth_provider_id() :: root | binary().
52+
53+
-record(openid_configuration, {
54+
issuer :: option(uri_string:uri_string()),
55+
token_endpoint :: option(uri_string:uri_string()),
56+
authorization_endpoint :: option(uri_string:uri_string()),
57+
end_session_endpoint :: option(uri_string:uri_string()),
58+
jwks_uri :: option(uri_string:uri_string())
59+
}).
60+
-type openid_configuration() :: #openid_configuration{}.
61+
5162
-record(oauth_provider, {
63+
id :: oauth_provider_id(),
5264
issuer :: option(uri_string:uri_string()),
5365
token_endpoint :: option(uri_string:uri_string()),
5466
authorization_endpoint :: option(uri_string:uri_string()),
@@ -58,7 +70,6 @@
5870
}).
5971

6072
-type oauth_provider() :: #oauth_provider{}.
61-
-type oauth_provider_id() :: binary().
6273

6374
-record(access_token_request, {
6475
client_id :: string() | binary(),

deps/oauth2_client/src/oauth2_client.erl

Lines changed: 167 additions & 98 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)