You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
256B

  1. export function resolveToken(authorization) {
  2. /**
  3. * * jwt token
  4. * * Bearer + token
  5. * ! 认证方案: Bearer
  6. */
  7. const reqTokenSplit = authorization.split(' ')
  8. if (reqTokenSplit.length === 2) {
  9. return reqTokenSplit[1]
  10. }
  11. return ''
  12. }