equal
deleted
inserted
replaced
243 if new and new.expires_at >= curr_time and (not last_password_change or last_password_change < new.issued_at) then |
243 if new and new.expires_at >= curr_time and (not last_password_change or last_password_change < new.issued_at) then |
244 return true; |
244 return true; |
245 end |
245 end |
246 return false; |
246 return false; |
247 end |
247 end |
|
248 |
|
249 function revoke_fast_tokens(username, client_id) |
|
250 local client_id_hash = hash.sha256(client_id, true); |
|
251 local cur_ok = token_store:set(username, client_id_hash.."-cur", nil); |
|
252 local new_ok = token_store:set(username, client_id_hash.."-new", nil); |
|
253 return cur_ok and new_ok; |
|
254 end |