mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-12 19:50:46 +01:00
remove angular jwt lib
This commit is contained in:
parent
8a3a981ac1
commit
f4bac9cffb
@ -73,10 +73,6 @@ gulp.task('lib', ['clean:lib'], function () {
|
||||
src: paths.npmDir + 'angular-ui-bootstrap/dist/*tpls*.js',
|
||||
dest: paths.libDir + 'angular-ui-bootstrap'
|
||||
},
|
||||
{
|
||||
src: paths.npmDir + 'angular-jwt/dist/*.js',
|
||||
dest: paths.libDir + 'angular-jwt'
|
||||
},
|
||||
{
|
||||
src: paths.npmDir + 'angular-ui-router/release/*.js',
|
||||
dest: paths.libDir + 'angular-ui-router'
|
||||
|
@ -3,7 +3,6 @@
|
||||
"version": "0.0.1",
|
||||
"devDependencies": {
|
||||
"sjcl": "1.0.3",
|
||||
"angular-jwt": "0.0.9",
|
||||
"jquery": "2.2.4",
|
||||
"bootstrap": "3.3.7",
|
||||
"font-awesome": "4.6.3",
|
||||
|
@ -1,16 +1,7 @@
|
||||
angular
|
||||
.module('bit')
|
||||
|
||||
.config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, toastrConfig) {
|
||||
jwtInterceptorProvider.urlParam = 'access_token';
|
||||
jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (config, appSettings, tokenService) {
|
||||
if (config.url.indexOf(appSettings.apiUri) === 0) {
|
||||
tokenService.getToken(function (token) {
|
||||
return token;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
.config(function ($stateProvider, $urlRouterProvider, toastrConfig) {
|
||||
angular.extend(toastrConfig, {
|
||||
closeButton: true,
|
||||
progressBar: true,
|
||||
@ -18,15 +9,6 @@
|
||||
positionClass: 'toast-bottom-center'
|
||||
});
|
||||
|
||||
if ($httpProvider.defaults.headers.post) {
|
||||
$httpProvider.defaults.headers.post = {};
|
||||
}
|
||||
|
||||
$httpProvider.defaults.headers.post['Content-Type'] = 'text/plain; charset=utf-8';
|
||||
|
||||
//$httpProvider.interceptors.push('apiInterceptor');
|
||||
$httpProvider.interceptors.push('jwtInterceptor');
|
||||
|
||||
$urlRouterProvider.otherwise(function ($injector, $location) {
|
||||
var $state = $injector.get('$state');
|
||||
$state.go('home');
|
||||
|
@ -20,7 +20,6 @@
|
||||
<script src="../lib/angular/angular.js"></script>
|
||||
<script src="../lib/angular-animate/angular-animate.js"></script>
|
||||
<script src="../lib/angular-ui-router/angular-ui-router.js"></script>
|
||||
<script src="../lib/angular-jwt/angular-jwt.js"></script>
|
||||
<script src="../lib/angular-toastr/angular-toastr.tpls.js"></script>
|
||||
<script src="../lib/ngclipboard/ngclipboard.js"></script>
|
||||
<script src="../lib/sweetalert/SweetAlert.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user