<commit_before>(function(){
	'use strict';
	
	angular
		.module('PLMApp')
		.config(config);
	
	function config ($httpProvider, $authProvider) {
	    
	    $httpProvider.interceptors.push(function($q, $injector) {
			return {
				request: function(request) {
					var $auth = $injector.get('$auth');
					if ($auth.isAuthenticated()) {
						request.headers['X-Auth-Token'] = $auth.getToken();
					}

					return request;
					},

				responseError: function(rejection) {
					if (rejection.status === 401) {
						$injector.get('$state').go('signIn');
					}
					return $q.reject(rejection);
					}
			};
		});

		// Auth config
		$authProvider.httpInterceptor = true; // Add Authorization header to HTTP request
		$authProvider.loginOnSignup = true;
		$authProvider.loginRedirect = '/home';
		$authProvider.logoutRedirect = '/';
		$authProvider.signupRedirect = '/home';
		$authProvider.loginUrl = '/signIn';
		$authProvider.signupUrl = '/signUp';
		$authProvider.loginRoute = '/signIn';
		$authProvider.signupRoute = '/signUp';
		$authProvider.tokenName = 'token';
		$authProvider.tokenPrefix = 'satellizer'; // Local Storage name prefix
		$authProvider.authHeader = 'X-Auth-Token';

		// Facebook
		$authProvider.facebook({
			clientId: '1503078423241610',
			url: '/authenticate/facebook',
			authorizationEndpoint: 'https://www.facebook.com/dialog/oauth',
			redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host + '/',
			scope: 'email',<commit_msg>Logout user if its server-side token was deleted but not its client-side one<commit_after>(function(){
	'use strict';
	
	angular
		.module('PLMApp')
		.config(config);
	
	function config ($httpProvider, $authProvider) {
	    
	    $httpProvider.interceptors.push(function($q, $injector) {
			return {
				request: function(request) {
					var $auth = $injector.get('$auth');
					if ($auth.isAuthenticated()) {
						request.headers['X-Auth-Token'] = $auth.getToken();
					}

					return request;
					},

				responseError: function(rejection) {
					var $auth = $injector.get('$auth');
					if (rejection.status === 401) {
						if($auth.isAuthenticated()) {
							$auth.logout();
						}
					}
					return $q.reject(rejection);
					}
			};
		});

		// Auth config
		$authProvider.httpInterceptor = true; // Add Authorization header to HTTP request
		$authProvider.loginOnSignup = true;
		$authProvider.loginRedirect = '/home';
		$authProvider.logoutRedirect = '/';
		$authProvider.signupRedirect = '/home';
		$authProvider.loginUrl = '/signIn';
		$authProvider.signupUrl = '/signUp';
		$authProvider.loginRoute = '/signIn';
		$authProvider.signupRoute = '/signUp';
		$authProvider.tokenName = 'token';
		$authProvider.tokenPrefix = 'satellizer'; // Local Storage name prefix
		$authProvider.authHeader = 'X-Auth-Token';

		// Facebook
		$authProvider.facebook({
			clientId: '1503078423241610',
			url: '/authenticate/facebook',
			authorizationEndpoint: 'https://www.facebook.com/dialog/oauth',
			redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host + '/',
			scope: 'email',
{'fraction_non_alphanumeric': 0.1601024655779699, 'fraction_numerical': 0.012167787383925712, 'mean_word_length': 3.5341074020319305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7112725', 'n_tokens_mistral': 1211, 'n_tokens_neox': 977, 'n_words': 177}