File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ export default class LocalScheme {
9
9
_setToken ( token ) {
10
10
if ( this . options . globalToken ) {
11
11
// Set Authorization token for all axios requests
12
- this . $auth . ctx . app . $axios . setToken ( token )
12
+ this . $auth . ctx . app . $axios . setHeader ( this . options . tokenName , token )
13
13
}
14
14
}
15
15
16
16
_clearToken ( ) {
17
17
if ( this . options . globalToken ) {
18
18
// Clear Authorization token for all axios requests
19
- this . $auth . ctx . app . $axios . setToken ( false )
19
+ this . $auth . ctx . app . $axios . setHeader ( this . options . tokenName , false )
20
20
}
21
21
}
22
22
@@ -99,5 +99,6 @@ export default class LocalScheme {
99
99
const DEFAULTS = {
100
100
tokenRequired : true ,
101
101
tokenType : 'Bearer' ,
102
- globalToken : true
102
+ globalToken : true ,
103
+ tokenName : 'Authorization'
103
104
}
You can’t perform that action at this time.
0 commit comments