Former-commit-id: a0b8ed91061292e0f155cee9a7865609daacf836 [formerly e6bb9eaa82b5704f3fe29bdec50f6bb4f55304b2] [formerly b443cbf5c6d7946ff3cfa44493449b5f0d75d830 [formerly 02df167434]]
Former-commit-id: c193caff6faaf78a16375960893be9e253869d3c [formerly 6c84d234c9e1db432027bc159dbeeb77e9c35031]
Former-commit-id: a48c3851511472efc47bce07ee2509fdd8a44c4a
pull/726/head
Henrique Dias 2018-01-04 13:49:41 +00:00
parent 1575fafec8
commit 58dd812008
3 changed files with 3 additions and 3 deletions

View File

@ -1,14 +1,14 @@
import cookie from './cookie'
import store from '@/store'
import router from '@/router'
import { Base64 } from 'js-base64'
function parseToken (token) {
let path = store.state.baseURL
if (path === '') path = '/'
document.cookie = `auth=${token}; max-age=86400; path=${path}`
let res = token.split('.')
let user = JSON.parse(window.atob(res[1]))
let user = JSON.parse(Base64.decode(res[1]))
if (!user.commands) {
user.commands = []
}

View File

@ -12,6 +12,7 @@
"clipboard": "^1.7.1",
"codemirror": "^5.31.0",
"filesize": "^3.5.11",
"js-base64": "^2.4.0",
"moment": "^2.19.2",
"normalize.css": "^7.0.0",
"noty": "^3.1.3",

View File

@ -1 +0,0 @@
474eed09fbf9deaa03192fe70126e083536dad7e