Log out of Anchore service
189248
def logout(anchore_config):
    
    ecode = 0
    try:
        aa = contexts['anchore_auth']
        if aa:
            anchore_auth.anchore_auth_invalidate(aa)
            if 'auth_file' in aa:
                os.remove(aa['auth_file'])
        print "Logout successful."
    except Exception as err:
        anchore_print_err('operation failed')
        ecode = 1

    sys.exit(ecode)
991440
def logout(self):
        
        self.client.global_sign_out(
            AccessToken=self.access_token
        )

        self.id_token = None
        self.refresh_token = None
        self.access_token = None
        self.token_type = None
648837
function cmd_logout(args, done) {
    var seneca = this
    var userent = seneca.make(user_canon)
    var loginent = seneca.make(login_canon)

    var q = { id: args.token }

    loginent.load$(q, function(err, login) {
      if (err) return done(err)

      if (!login) {
        return done(null, { ok: true })
      }

      login.active = false
      login.ended = new Date().getTime()
      login.save$(function(err, login) {
        if (err) {
          return done(err)
        }

        userent.load$({ id: login.user }, function(err, user) {
          if (err) {
            return done(err)
          }

          seneca.log.debug('logout', user, login)
          done(null, { user: user, login: login, ok: true })
        })
      })
    })
  }
813537
def eject(self, auth_no_user_interaction=None):
        """"""
        return self._assocdrive._M.Drive.Eject(
            '(a{sv})',
            filter_opt({
                'auth.no_user_interaction': ('b', auth_no_user_interaction),
            })
        )
834875
function handleForceLogout(req, res, next) {
		var p = new Promise(function (resolve, reject) {

			// Lookup the user by Id and do the logout.
			AclUser.findOne({
				_id: req.params.id,
				local_auth_type: 'password'
			}, function (err, user) {
				if (err) {
					return reject(new restifyErrors.InternalError(err));
				}
				if (!user) {
					return reject(new restifyErrors.NotFoundError());
				}
				user.modifiedBy = req.locals.user;
				user.last_logout_date = new Date();

				// Destroy ALL the current Bearer tokens 
				user.bearer = [];

				// Save the User back to the database
				debug(`Forcing logout of ${user.email}`);
				user.save(function (err, result) {
					if (err) {
						debug('Error in force logout', err);
						return reject(new restifyErrors.InternalError(err));
					}
					resolve({
						success: true,
						message: 'success'
					});
				});
			});
		}).then(function (data) {
			res.json(data);
			next();
		}).catch(function (err) {
			debug('Error in force logout', err);
			next(err);
		});
	}
620543
function logoff() {
    var token = cache.get('token');
    var dfrd = Q.defer();
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      request(format(URLs.logoff, PROTOCOL, conf.host, token),
        function(err) {
          if (err) {
            dfrd.reject(err);
          } else {
            dfrd.resolve(true);
          }
        });
    }
    return dfrd.promise;
  }
610883
def logout(cookie=None):
    '''
    
    '''
    payload = '<aaaLogout cookie="{0}" inCookie="{0}"></aaaLogout>'.format(cookie)
    __utils__['http.query'](DETAILS['url'],
                            data=payload,
                            method='POST',
                            decode_type='plain',
                            decode=True,
                            verify_ssl=False,
                            raise_error=True,
                            headers=DETAILS['headers'])
    return
407836
function() {

		var _this = this;
		var utils = _this.utils;
		var error = utils.error;

		// Create a new promise
		var promise = utils.Promise();

		var p = utils.args({name:'s', options: 'o', callback: 'f'}, arguments);

		p.options = p.options || {};

		// Add callback to events
		promise.proxy.then(p.callback, p.callback);

		// Trigger an event on the global listener
		function emit(s, value) {
			hello.emit(s, value);
		}

		promise.proxy.then(emit.bind(this, 'auth.logout auth'), emit.bind(this, 'error'));

		// Network
		p.name = p.name || this.settings.default_service;
		p.authResponse = utils.store(p.name);

		if (p.name && !(p.name in _this.services)) {

			promise.reject(error('invalid_network', 'The network was unrecognized'));

		}
		else if (p.name && p.authResponse) {

			// Define the callback
			var callback = function(opts) {

				// Remove from the store
				utils.store(p.name, null);

				// Emit events by default
				promise.fulfill(hello.utils.merge({network:p.name}, opts || {}));
			};

			// Run an async operation to remove the users session
			var _opts = {};
			if (p.options.force) {
				var logout = _this.services[p.name].logout;
				if (logout) {
					// Convert logout to URL string,
					// If no string is returned, then this function will handle the logout async style
					if (typeof (logout) === 'function') {
						logout = logout(callback, p);
					}

					// If logout is a string then assume URL and open in iframe.
					if (typeof (logout) === 'string') {
						utils.iframe(logout);
						_opts.force = null;
						_opts.message = 'Logout success on providers site was indeterminate';
					}
					else if (logout === undefined) {
						// The callback function will handle the response.
						return promise.proxy;
					}
				}
			}

			// Remove local credentials
			callback(_opts);
		}
		else {
			promise.reject(error('invalid_session', 'There was no session to remove'));
		}

		return promise.proxy;
	}
872673
def whoami(anchore_config):
    
    ecode = 0
    try:
        aa = contexts['anchore_auth']
        if aa and 'username' in aa and 'password' in aa:
            info = {'Current user': aa['user_info'] if aa['user_info'] else 'anonymous'}

            anchore_print(info, do_formatting=True)
        else:
            anchore_print_err('No anchore auth context found. Cannot get user info. Try logging in first')
            ecode = 1

    except Exception as err:
        anchore_print_err('Cannot get user info')
        ecode = 1

    sys.exit(ecode)
587277
def logout(self):
        """"""
        warnings.warn("Database.logout() is deprecated",
                      DeprecationWarning, stacklevel=2)

        # Sockets will be deauthenticated as they are used.
        self.client._purge_credentials(self.name)
593035
def sign_out(self, redirect_url=None):
    """"""
    config = config_lib.get_config()
    key = self.handler.app.config['webapp2_extras.sessions']['secret_key']
    if redirect_url is None:
      redirect_url = self.handler.request.url
    user_id = self.handler.me.user_id()
    token = xsrfutil.generate_token(key, user_id, action_id=redirect_url)
    return '{}/signout?{}'.format(config['airlock_path'], urllib.urlencode({
        'redirect': redirect_url,
        'token': token,
    }))
852684
def _logout(self, reset=True):
        """"""
        url = '{base}/client/auth/logout'.format(base=self.base_url)
        response = self._session.get(url, params=self._parameters)
        if response.ok:
            if reset:
                self._reset()
            return True
        else:
            return False
578479
function(req, res) {
      waterlock.logger.debug('user logout');
      delete(req.session.user);

      if (req.session.authenticated) {
        this.logoutSuccess(req, res);
      } else {
        this.logoutFailure(req, res);
      }
    }
1322803
def logout(ctx):
    
    check_for_cloud_server()
    check_for_cloud_user()
    if config["cloud_server"]["farm_name"]:
        ctx.invoke(deinit_farm)
    config["cloud_server"]["username"] = None
    config["cloud_server"]["password"] = None
1199589
function logout() {
    currentUser = null;
    delete config.usr;
    delete config.pwd;
    Storage.local.set( "nigolotua", null );
    exports.eventChange.fire();
    return svc( "tfw.login.Logout" );
}
997265
function logout(_ref3) {
    var state = _ref3.state,
        commit = _ref3.commit;
    commit('c3s/user/SET_CURRENT_USER', null, {
      root: true
    });
    commit('SET_ANON', false);
  }
28230
function() {
                console.log('oauthInterface.authorization.signOut');
                delete this.params.data;
                return this.request({
                    url: this._buildUri(this.uri + '/signout'),
                    method: corbel.request.method.GET,
                    withCredentials: true
                }).then(function(res) {
                    return corbel.Services.getLocationId(res);
                });
            }