1212
1313-include_lib (" oauth2_client.hrl" ).
1414-import (oauth2_client , [
15- build_openid_discovery_endpoint /1 ,
16- build_openid_discovery_endpoint /2 ]).
15+ build_openid_discovery_endpoint /3 ]).
1716
1817-compile (export_all ).
1918
@@ -150,7 +149,6 @@ init_per_group(_, Config) ->
150149get_http_oauth_server_expectations (TestCase , Config ) ->
151150 case ? config (TestCase , Config ) of
152151 undefined ->
153- ct :log (" get_openid_configuration_http_expectation : ~p " , [get_openid_configuration_http_expectation (TestCase )]),
154152 [ {token_endpoint , build_http_mock_behaviour (build_http_access_token_request (),
155153 build_http_200_access_token_response ())},
156154 {get_openid_configuration , get_openid_configuration_http_expectation (TestCase )}
@@ -247,7 +245,6 @@ init_per_testcase(TestCase, Config) ->
247245
248246 case ? config (group , Config ) of
249247 https ->
250- ct :log (" Start https with expectations ~p " , [ListOfExpectations ]),
251248 start_https_oauth_server (? AUTH_PORT , ? config (rmq_certsdir , Config ),
252249 ListOfExpectations );
253250 _ ->
@@ -280,6 +277,12 @@ end_per_group(with_default_oauth_provider, Config) ->
280277end_per_group (_ , Config ) ->
281278 Config .
282279
280+ build_openid_discovery_endpoint (Issuer ) ->
281+ build_openid_discovery_endpoint (Issuer , undefined , undefined ).
282+
283+ build_openid_discovery_endpoint (Issuer , Path ) ->
284+ build_openid_discovery_endpoint (Issuer , Path , undefined ).
285+
283286get_openid_configuration (Config ) ->
284287 ExpectedOAuthProvider = ? config (oauth_provider , Config ),
285288 SslOptions = [{ssl , ExpectedOAuthProvider # oauth_provider .ssl_options }],
@@ -468,7 +471,6 @@ verify_get_oauth_provider_returns_default_oauth_provider(DefaultOAuthProviderId)
468471 {ok , OAuthProvider2 } =
469472 oauth2_client :get_oauth_provider (DefaultOAuthProviderId ,
470473 [issuer , token_endpoint , jwks_uri ]),
471- ct :log (" verify_get_oauth_provider_returns_default_oauth_provider ~p vs ~p " , [OAuthProvider1 , OAuthProvider2 ]),
472474 ? assertEqual (OAuthProvider1 , OAuthProvider2 ).
473475
474476get_oauth_provider (Config ) ->
@@ -622,8 +624,6 @@ start_https_oauth_server(Port, CertsDir, Expectations) when is_list(Expectations
622624 {'_' , [{Path , oauth_http_mock , Expected } || #{request := #{path := Path }}
623625 = Expected <- Expectations ]}
624626 ]),
625- ct :log (" start_https_oauth_server with expectation list : ~p -> dispatch: ~p " ,
626- [Expectations , Dispatch ]),
627627 {ok , _ } = cowboy :start_tls (
628628 mock_http_auth_listener ,
629629 [{port , Port },
@@ -634,8 +634,6 @@ start_https_oauth_server(Port, CertsDir, Expectations) when is_list(Expectations
634634
635635start_https_oauth_server (Port , CertsDir , #{request := #{path := Path }} = Expected ) ->
636636 Dispatch = cowboy_router :compile ([{'_' , [{Path , oauth_http_mock , Expected }]}]),
637- ct :log (" start_https_oauth_server with expectation : ~p -> dispatch: ~p " ,
638- [Expected , Dispatch ]),
639637 {ok , _ } = cowboy :start_tls (
640638 mock_http_auth_listener ,
641639 [{port , Port },
0 commit comments