wireguard-dashboard-admin/mock/_utils.js
zhangchuanlong 8d0158be7c first commit
2022-01-08 17:20:46 +08:00

13 lines
256 B
JavaScript

export function resolveToken(authorization) {
/**
* * jwt token
* * Bearer + token
* ! 认证方案: Bearer
*/
const reqTokenSplit = authorization.split(' ')
if (reqTokenSplit.length === 2) {
return reqTokenSplit[1]
}
return ''
}