Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dspo committed Sep 24, 2024
1 parent 36b5a36 commit c08f917
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apisix/plugins/jwt-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@ local function sign_jwt_with_RS256_ES256(key, consumer, payload)
consumer.auth_conf
)
if not public_key then
core.log.error("failed to sign jwt, err: ", err)
return nil, "missing public_key"
end
if not private_key then
core.log.error("failed to sign jwt, err: ", err)
return nil, "missing private_key"
end

Expand All @@ -300,9 +302,7 @@ local function sign_jwt_with_RS256_ES256(key, consumer, payload)
}
)
if not ok then
if jwt_token and jwt_token.reason then
return nil, "failed to sign jwt: " .. jwt_token.reason
end
core.log.warn("failed to sign jwt, err: ", jwt_token.reason)
return nil, "failed to sign jwt"
end
return jwt_token
Expand Down

0 comments on commit c08f917

Please sign in to comment.