Merge pull request #8139 from savonarola/authn-jwt-test

chore(jwt authn): improve tests
This commit is contained in:
JianBo He 2022-06-14 14:23:23 +08:00 committed by GitHub
commit 2ad2da082b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -72,6 +72,7 @@ fields('jwks') ->
[
{use_jwks, sc(hoconsc:enum([true]), #{required => true, desc => ?DESC(use_jwks)})},
{endpoint, fun endpoint/1},
{pool_size, fun emqx_connector_schema_lib:pool_size/1},
{refresh_interval, fun refresh_interval/1},
{ssl, #{
type => hoconsc:union([

View File

@ -61,7 +61,7 @@ t_jwt_authenticator_hmac_based(_) ->
algorithm => 'hmac-based',
secret => Secret,
secret_base64_encoded => false,
verify_claims => []
verify_claims => [{<<"username">>, <<"${username}">>}]
},
{ok, State} = emqx_authn_jwt:create(?AUTHN_ID, Config),