mirror of
https://github.com/valitydev/erlang_uac.git
synced 2024-11-06 01:35:23 +00:00
Drop accidentally duplicated testcase
This commit is contained in:
parent
3e7e46f93a
commit
502e3ac8de
@ -20,8 +20,7 @@
|
||||
unknown_resources_ok_test/1,
|
||||
unknown_resources_fail_encode_test/1,
|
||||
cant_authorize_without_resource_access/1,
|
||||
no_expiration_claim_allowed/1,
|
||||
multiple_domains_test/1
|
||||
no_expiration_claim_allowed/1
|
||||
]).
|
||||
|
||||
-type test_case_name() :: atom().
|
||||
@ -49,8 +48,7 @@ all() ->
|
||||
unknown_resources_ok_test,
|
||||
unknown_resources_fail_encode_test,
|
||||
cant_authorize_without_resource_access,
|
||||
no_expiration_claim_allowed,
|
||||
multiple_domains_test
|
||||
no_expiration_claim_allowed
|
||||
].
|
||||
|
||||
-spec init_per_suite(config()) -> config().
|
||||
@ -189,22 +187,6 @@ no_expiration_claim_allowed(_) ->
|
||||
{ok, Token} = uac_authorizer_jwt:issue(unique_id(), PartyID, #{}, test),
|
||||
{ok, _} = uac:authorize_api_key(<<"Bearer ", Token/binary>>, #{}).
|
||||
|
||||
-spec multiple_domains_test(config()) -> _.
|
||||
multiple_domains_test(_) ->
|
||||
ACL = ?TEST_SERVICE_ACL(read),
|
||||
Domain1 = <<"api-1">>,
|
||||
Domain2 = <<"api-2">>,
|
||||
{ok, Token} = issue_token(
|
||||
#{
|
||||
Domain1 => uac_acl:from_list(ACL),
|
||||
Domain2 => uac_acl:from_list(ACL)
|
||||
},
|
||||
unlimited
|
||||
),
|
||||
{ok, AccessContext} = uac:authorize_api_key(<<"Bearer ", Token/binary>>, #{}),
|
||||
ok = uac:authorize_operation([], AccessContext, Domain1),
|
||||
{error, unauthorized} = uac:authorize_operation(?TEST_SERVICE_ACL(write), AccessContext, Domain2).
|
||||
|
||||
%%
|
||||
|
||||
issue_token(DomainRoles, Expiration) when is_map(DomainRoles) ->
|
||||
|
Loading…
Reference in New Issue
Block a user