HTTPBasicAuthenticationProvider.js (466B)
1 /** 2 * HTTP Basic Authentication Provider 3 */ 4 Ext.define('PartKeepr.Auth.HTTPBasicAuthenticationProvider', { 5 extend: 'PartKeepr.Auth.AuthenticationProvider', 6 7 /** 8 * @method add 9 * @inheritdoc PartKeepr.Auth.AuthenticationProvider#getHeaders 10 */ 11 getHeaders: function () 12 { 13 var hash = base64_encode(this.getUsername() + ":" + this.getPassword()); 14 15 return { 16 "Authorization": "Basic " + hash 17 }; 18 19 } 20 });