mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-24 11:00:41 -08:00
reset-page-on-authentication-change change to set-on
This commit is contained in:
parent
47057b5000
commit
421ee95bf1
1 changed files with 9 additions and 9 deletions
|
|
@ -16,10 +16,10 @@
|
||||||
|
|
||||||
(defsection @clog-auth (:title "CLOG Auth Objects")
|
(defsection @clog-auth (:title "CLOG Auth Objects")
|
||||||
"CLOG-AUTH - authorization abstraction for CLOG"
|
"CLOG-AUTH - authorization abstraction for CLOG"
|
||||||
(get-authentication-token function)
|
(get-authentication-token function)
|
||||||
(store-authentication-token function)
|
(store-authentication-token function)
|
||||||
(remove-authentication-token function)
|
(remove-authentication-token function)
|
||||||
(reset-page-on-authentication-change function))
|
(set-on-authentication-change function))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Implementation - clog-auth
|
;; Implementation - clog-auth
|
||||||
|
|
@ -56,15 +56,15 @@
|
||||||
(defun remove-authentication-token (body)
|
(defun remove-authentication-token (body)
|
||||||
(storage-remove (window body) :local *clog-auth-key*))
|
(storage-remove (window body) :local *clog-auth-key*))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; reset-page-on-authentication-change ;;
|
;; set-on-authentication-change ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defun reset-page-on-authentication-change (obj)
|
(defun set-on-authentication-change (obj handler)
|
||||||
(let ((body (connection-body obj)))
|
(let ((body (connection-body obj)))
|
||||||
(set-on-storage (window body) (lambda (obj data)
|
(set-on-storage (window body) (lambda (obj data)
|
||||||
(set-on-storage (window body) nil)
|
(set-on-storage (window body) nil)
|
||||||
(when (equalp (getf data :key)
|
(when (equalp (getf data :key)
|
||||||
"clog-auth-token")
|
"clog-auth-token")
|
||||||
(reload (location body)))))))
|
(funcall handler body))))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue