Cleanup unneeded login config.
This commit is contained in:
parent
eca1cacfeb
commit
2262e0ae49
@ -1,31 +0,0 @@
|
||||
module.exports = function($httpProvider, $storageProvider) {
|
||||
// Define interceptors.
|
||||
$httpProvider.interceptors.push(function($storage) {
|
||||
return {
|
||||
request: function(config) {
|
||||
var access_token = $storage.session.get('access_token');
|
||||
|
||||
if (access_token) {
|
||||
//var tokenType = $storage.get('token_type');
|
||||
var tokenType = 'Bearer';
|
||||
var authorization = tokenType + ' ' + access_token;
|
||||
config.headers.authorization = authorization;
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
// Configure storage
|
||||
// Set global prefix for stored keys
|
||||
$storageProvider.setPrefix('accountant');
|
||||
|
||||
// Change the default storage engine
|
||||
// Defaults to 'local'
|
||||
$storageProvider.setDefaultStorageEngine('session');
|
||||
|
||||
// Change the enabled storage engines
|
||||
// Defaults to ['memory', 'cookie', 'session', 'local']
|
||||
$storageProvider.setEnabledStorageEngines(['local', 'session']);
|
||||
};
|
Loading…
Reference in New Issue
Block a user