Skip to content

Commit

Permalink
rebar3_lint: fix for consistent_variable_casing
Browse files Browse the repository at this point in the history
  • Loading branch information
kivra-pauoli committed Aug 29, 2024
1 parent 4ea5d9d commit 72f0751
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/id_token_jws.erl
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ generate_key_for(Alg, Options) ->
_ -> generate_rsa_key(Alg, Options)
end,
Jwk0 = jose_jwk:from_key(Key),
Jwk = Jwk0#jose_jwk{fields = #{<<"kid">> => kid(Options),
JWK = Jwk0#jose_jwk{fields = #{<<"kid">> => kid(Options),
<<"use">> => <<"sig">>,
<<"iat">> => iat(Options)}},
{_, PublicKeyMap} = jose_jwk:to_public_map(Jwk),
{Jwk, PublicKeyMap}.
{_, PublicKeyMap} = jose_jwk:to_public_map(JWK),
{JWK, PublicKeyMap}.

extract_kid(IdToken) ->
Protected = jose_jwt:peek_protected(IdToken),
Expand All @@ -91,7 +91,7 @@ extract_kid(IdToken) ->

validate_signature(Key, IdToken) ->
case jose_jwt:verify(Key, IdToken) of
{true, #jose_jwt{fields = Claims}, _Jws} ->
{true, #jose_jwt{fields = Claims}, _JWS} ->
{ok, Claims};
{false, _, _} ->
{error, invalid_signature}
Expand Down

0 comments on commit 72f0751

Please sign in to comment.