mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
rename canal-admin project to admin
This commit is contained in:
15
admin/admin-ui/src/utils/auth.js
Normal file
15
admin/admin-ui/src/utils/auth.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const TokenKey = 'canal_admin_token'
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
return Cookies.set(TokenKey, token, { maxAge: 0 })
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
||||
Reference in New Issue
Block a user