| | |
| | | /* |
| | | * @Author : yuan |
| | | * @Date : 2026-01-06 09:47:09 |
| | | * @LastEditors : yuan |
| | | * @LastEditTime : 2026-01-06 11:03:04 |
| | | * @FilePath : \applications\drone-command\src\utils\auth.js |
| | | * @Description : |
| | | * Copyright 2026 OBKoro1, All Rights Reserved. |
| | | * 2026-01-06 09:47:09 |
| | | */ |
| | | import Cookies from 'js-cookie'; |
| | | import Cookies from 'js-cookie' |
| | | |
| | | const TokenKey = 'command-access-token'; |
| | | const TokenKey = 'command-access-token' |
| | | const RefreshTokenKey = 'command-refresh-token'; |
| | | const SessionId = 'JSESSIONID'; |
| | | const UserId = 'b-user-id'; |
| | | |
| | | export function getToken() { |
| | | return Cookies.get(TokenKey, { |
| | | path: '/' |
| | |
| | | } |
| | | |
| | | export function removeRefreshToken() { |
| | | return Cookies.remove(RefreshTokenKey); |
| | | } |
| | | return Cookies.remove(RefreshTokenKey) |
| | | } |
| | | |