Skip to content

Commit

Permalink
Merge pull request #12173 from rabbitmq/mergify/bp/v3.13.x/pr-12171
Browse files Browse the repository at this point in the history
Support tokens without kid when using multiple oauth providers and/or resource servers (backport #11965) (backport #12171)
  • Loading branch information
michaelklishin committed Aug 29, 2024
2 parents d97fbe9 + 6d7236f commit 504de57
Show file tree
Hide file tree
Showing 21 changed files with 2,667 additions and 1,218 deletions.
1 change: 1 addition & 0 deletions deps/oauth2_client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ rabbitmq_integration_suite(
size = "small",
additional_beam = [
"test/oauth_http_mock.beam",
"test/oauth2_client_test_util.beam",
],
runtime_deps = [
"@cowboy//:erlang_app",
Expand Down
13 changes: 12 additions & 1 deletion deps/oauth2_client/include/oauth2_client.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,19 @@
%% The closest we have to a type import in Erlang
-type option(T) :: rabbit_types:option(T).

-type oauth_provider_id() :: root | binary().

-record(openid_configuration, {
issuer :: option(uri_string:uri_string()),
token_endpoint :: option(uri_string:uri_string()),
authorization_endpoint :: option(uri_string:uri_string()),
end_session_endpoint :: option(uri_string:uri_string()),
jwks_uri :: option(uri_string:uri_string())
}).
-type openid_configuration() :: #openid_configuration{}.

-record(oauth_provider, {
id :: oauth_provider_id(),
issuer :: option(uri_string:uri_string()),
token_endpoint :: option(uri_string:uri_string()),
authorization_endpoint :: option(uri_string:uri_string()),
Expand All @@ -58,7 +70,6 @@
}).

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

-record(access_token_request, {
client_id :: string() | binary(),
Expand Down
265 changes: 167 additions & 98 deletions deps/oauth2_client/src/oauth2_client.erl

Large diffs are not rendered by default.

Loading

0 comments on commit 504de57

Please sign in to comment.