Fix test cases
This commit is contained in:
parent
f7e25b4611
commit
175ee2ccc7
|
|
@ -328,7 +328,7 @@ extract_ssl_options_as_list(Map) ->
|
||||||
% Replace peer_verification with verify to make it more consistent with other
|
% Replace peer_verification with verify to make it more consistent with other
|
||||||
% ssl_options in RabbitMQ and Erlang's ssl options
|
% ssl_options in RabbitMQ and Erlang's ssl options
|
||||||
% Eventually, peer_verification will be removed. For now, both are allowed
|
% Eventually, peer_verification will be removed. For now, both are allowed
|
||||||
-spec get_verify_or_peer_verification(#{atom() => any()}, any()) -> proplists:proplist().
|
-spec get_verify_or_peer_verification(#{atom() => any()}, verify_none | verify_peer ) -> verify_none | verify_peer.
|
||||||
get_verify_or_peer_verification(Ssl_options, Default) ->
|
get_verify_or_peer_verification(Ssl_options, Default) ->
|
||||||
case maps:get(verify, Ssl_options, undefined) of
|
case maps:get(verify, Ssl_options, undefined) of
|
||||||
undefined ->
|
undefined ->
|
||||||
|
|
@ -443,8 +443,7 @@ map_to_oauth_provider(PropList) when is_list(PropList) ->
|
||||||
token_endpoint = proplists:get_value(token_endpoint, PropList),
|
token_endpoint = proplists:get_value(token_endpoint, PropList),
|
||||||
authorization_endpoint = proplists:get_value(authorization_endpoint, PropList, undefined),
|
authorization_endpoint = proplists:get_value(authorization_endpoint, PropList, undefined),
|
||||||
jwks_uri = proplists:get_value(jwks_uri, PropList, undefined),
|
jwks_uri = proplists:get_value(jwks_uri, PropList, undefined),
|
||||||
ssl_options = extract_ssl_options_as_list(maps:from_list(
|
ssl_options = extract_ssl_options_as_list(maps:from_list(proplists:get_value(https, PropList, [])))
|
||||||
proplists:get_value(https, PropList, [])))
|
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -463,8 +463,14 @@ build_https_oauth_provider(CaCertFile) ->
|
||||||
}.
|
}.
|
||||||
oauth_provider_to_proplist(#oauth_provider{ issuer = Issuer, token_endpoint = TokenEndpoint,
|
oauth_provider_to_proplist(#oauth_provider{ issuer = Issuer, token_endpoint = TokenEndpoint,
|
||||||
ssl_options = SslOptions, jwks_uri = Jwks_url}) ->
|
ssl_options = SslOptions, jwks_uri = Jwks_url}) ->
|
||||||
[ { issuer, Issuer}, {token_endpoint, TokenEndpoint},
|
[ { issuer, Issuer},
|
||||||
{ https, SslOptions}, {jwks_url, Jwks_url} ].
|
{token_endpoint, TokenEndpoint},
|
||||||
|
{ https,
|
||||||
|
case SslOptions of
|
||||||
|
undefined -> [];
|
||||||
|
Value -> Value
|
||||||
|
end},
|
||||||
|
{jwks_url, Jwks_url} ].
|
||||||
|
|
||||||
start_http_oauth_server(Port, Expectations) when is_list(Expectations) ->
|
start_http_oauth_server(Port, Expectations) when is_list(Expectations) ->
|
||||||
Dispatch = cowboy_router:compile([
|
Dispatch = cowboy_router:compile([
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue