Skip to content

Commit

Permalink
fix(token): fix methods setHeader and clearHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoPedroAS51 committed Mar 11, 2020
1 parent c5694c4 commit 342320c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export class Token {
}

_setHeader (token) {
if (this.$auth.options.globalToken) {
if (this.$auth.strategy.options.token.global) {
// Set Authorization token for all axios requests
this.$auth.ctx.app.$axios.setHeader(this.$auth.strategy.options.token.name, token)
}
}

_clearHeader () {
if (this.$auth.options.globalToken) {
if (this.$auth.strategy.options.token.global) {
// Clear Authorization token for all axios requests
this.$auth.ctx.app.$axios.setHeader(this.$auth.strategy.options.token.name, false)
}
Expand Down

0 comments on commit 342320c

Please sign in to comment.