Skip to content

Commit b27009f

Browse files
committed
clarify log message and fix spelling
1 parent 551564f commit b27009f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: lib/resty/openidc.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ local function openidc_access_token(opts, session, try_to_renew)
11271127
if store_in_session(opts, 'id_token') then
11281128
local id_token, err = openidc_load_and_validate_jwt_id_token(opts, json.id_token, session)
11291129
if err then
1130-
ngx.log(ngx.ERR, "invalid id token, discaring refreshed id token")
1130+
ngx.log(ngx.ERR, "invalid id token, discarding tokens returned while refreshing")
11311131
session.data.access_token = nil
11321132
session.data.access_token_expiration = nil
11331133
session.data.refresh_token = nil

Diff for: tests/spec/token_refresh_spec.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ describe("if refresh contains an invalid id_token", function()
197197
it ("the id token gets refreshed", function()
198198
assert.error_log_contains("id_token refreshed")
199199
end)
200-
it("the id token is rejected", function()
201-
assert.error_log_contains("invalid id token, discaring refreshed id token")
200+
it("the tokens are rejected", function()
201+
assert.error_log_contains("invalid id token, discarding tokens returned while refreshing")
202202
end)
203203
it("the access token is discarded", function()
204204
assert.error_log_contains("lost access token")

0 commit comments

Comments
 (0)