text: /*!
   * @websanova/vue-auth v3.3.7
   * https://websanova.com/docs/vue-auth
   * Released under the MIT License.
   */
  
  'use strict';
  
  var bearer = {
    request: function (req, token) {
      this.http.setHeaders.call(this, req, {
        Authorization: 'Bearer ' + token
      });
    },
    response: function (res) {
      var headers = this.http.getHeaders.call(this, res),
          token = headers.Authorization || headers.authorization;
  
      if (token) {
        token = token.split(/Bearer:?\s?/i);
        return token[token.length > 1 ? 1 : 0].trim();
      }
    }
  };
  
  module.exports = bearer;
  