mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-14 20:01:31 +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',
|
src: paths.npmDir + 'angular-ui-bootstrap/dist/*tpls*.js',
|
||||||
dest: paths.libDir + 'angular-ui-bootstrap'
|
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',
|
src: paths.npmDir + 'angular-ui-router/release/*.js',
|
||||||
dest: paths.libDir + 'angular-ui-router'
|
dest: paths.libDir + 'angular-ui-router'
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"sjcl": "1.0.3",
|
"sjcl": "1.0.3",
|
||||||
"angular-jwt": "0.0.9",
|
|
||||||
"jquery": "2.2.4",
|
"jquery": "2.2.4",
|
||||||
"bootstrap": "3.3.7",
|
"bootstrap": "3.3.7",
|
||||||
"font-awesome": "4.6.3",
|
"font-awesome": "4.6.3",
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
angular
|
angular
|
||||||
.module('bit')
|
.module('bit')
|
||||||
|
|
||||||
.config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, toastrConfig) {
|
.config(function ($stateProvider, $urlRouterProvider, 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;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
angular.extend(toastrConfig, {
|
angular.extend(toastrConfig, {
|
||||||
closeButton: true,
|
closeButton: true,
|
||||||
progressBar: true,
|
progressBar: true,
|
||||||
@ -18,15 +9,6 @@
|
|||||||
positionClass: 'toast-bottom-center'
|
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) {
|
$urlRouterProvider.otherwise(function ($injector, $location) {
|
||||||
var $state = $injector.get('$state');
|
var $state = $injector.get('$state');
|
||||||
$state.go('home');
|
$state.go('home');
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
<script src="../lib/angular/angular.js"></script>
|
<script src="../lib/angular/angular.js"></script>
|
||||||
<script src="../lib/angular-animate/angular-animate.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-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/angular-toastr/angular-toastr.tpls.js"></script>
|
||||||
<script src="../lib/ngclipboard/ngclipboard.js"></script>
|
<script src="../lib/ngclipboard/ngclipboard.js"></script>
|
||||||
<script src="../lib/sweetalert/SweetAlert.js"></script>
|
<script src="../lib/sweetalert/SweetAlert.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user