logout(redirect, callApi = true) {
            const uid = secureSessionStorage.getItem(OAUTH_KEY + ':UID');
            const process = () => {
                this.clearData();

                if (redirect === true) {
                    $state.go('login');
                }
            };

            AppModel.set('loggingOut', true);

            if (callApi && uid) {
                authApi.revoke().then(process, process);
            } else {
                process();
            }
        }
/**
         * Removes all connection data
         * @param {Boolean} redirect - Redirect at the end the user to the login page
         */
Removes all connection data
@param {Boolean} redirect - Redirect at the end the user to the login page
Removes all connection data @param { Boolean } redirect - Redirect at the end the user to the login page
logout(redirect, callApi = true) {
            const uid = secureSessionStorage.getItem(OAUTH_KEY + ':UID');
            const process = () => {
                this.clearData();
                if (redirect === true) {
                    $state.go('login');
                }
            };
            AppModel.set('loggingOut', true);
            if (callApi && uid) {
                authApi.revoke().then(process, process);
            } else {
                process();
            }
        }
logout ( redirect , callApi = true ) { const uid = secureSessionStorage . getItem ( OAUTH_KEY + ':UID' ) ; const process = ( ) => { this . clearData ( ) ; if ( redirect === true ) { $state . go ( 'login' ) ; } } ; AppModel . set ( 'loggingOut' , true ) ; if ( callApi && uid ) { authApi . revoke ( ) . then ( process , process ) ; } else { process ( ) ; } }
Removes all connection data
 @param {Boolean} redirect - Redirect at the end the user to the login page
Removes all connection data @param { Boolean } redirect - Redirect at the end the user to the login page