UNPKG

@websanova/vue-auth

Version:

A simple light-weight authentication library for Vue.js

7 lines (6 loc) 558 B
/*! * @websanova/vue-auth v4.2.1 * https://websanova.com/docs/vue-auth * Released under the MIT License. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueAuth=t()}(this,function(){"use strict";return{request:function(e,t){this.drivers.http.setHeaders.call(this,e,{Authorization:"Bearer "+t})},response:function(e){e=this.drivers.http.getHeaders.call(this,e),e=e.Authorization||e.authorization;if(e)return(e=e.split(/Bearer:?\s?/i))[1<e.length?1:0].trim()}}});