mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
remove angular jwt lib
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user