Initiate de-authorization process
17978
public function deauthorize()
    {
        // Tell all ancestors that we are out
        foreach (self::$ancestors as & $ancestor) {
            $ancestor->authorized = false;
            unset($ancestor->user);
            // TODO: Remove session dependency as storage can be different
            unset($_SESSION[$ancestor->identifier()]);
            setcookie('_cookie_accessToken');
        }
    }
1172496
protected void runAuthorization()
    {
        // Install the decision
        for (Iterator iter = controlledObjects.iterator(); iter.hasNext();)
        {
            WeakReference ref = (WeakReference) iter.next();

            Authorizable controlledObject = (Authorizable) ref.get();
            if (controlledObject == null)
            {
                // Has been GCed, remove from our list
                iter.remove();
            }
            else
            {
                updateControlledObject(controlledObject, shouldAuthorize(getLastAuthentication(),
                        controlledObject));
            }
        }
    }
770345
private void removeFromPermissionsCache(IAuthorizationPrincipal[] principals)
            throws AuthorizationException {
        for (int i = 0; i < principals.length; i++) {
            cacheRemove(principals[i]);
        }
    }
753256
def auth_remove(name, drop, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('auth:group:remove', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
        'drop': drop,
    })
1248912
def action_inactivate(self, ids):
        """"""
        try:
            count = 0
            for user_id in ids:
                user = _datastore.get_user(user_id)
                if user is None:
                    raise ValueError(_("Cannot find user."))
                if _datastore.deactivate_user(user):
                    count += 1
            if count > 0:
                flash(_('User(s) were successfully inactivated.'), 'success')
        except Exception as exc:
            if not self.handle_view_exception(exc):
                raise

            current_app.logger.exception(str(exc))  # pragma: no cover
            flash(_('Failed to inactivate users.'),
                  'error')
968944
def cli(env, identifier, credential_id):
    """"""

    mgr = SoftLayer.ObjectStorageManager(env.client)
    credential = mgr.delete_credential(identifier, credential_id=credential_id)

    env.fout(credential)
1225154
def disassociate(options = {})
      options = options.merge(
        user_name: @user_name,
        serial_number: @serial_number
      )
      resp = @client.deactivate_mfa_device(options)
      resp.data
    end
496520
function () {
    this.log('Deauthorizing...');
    return this.Request.delete('/auth').auth().execute()
      .then(function (response) {
        // Clear auth data from storage upon deauthorization
        this.storage.clear();
        clearAuthData.call(this);

        this.log('Deauthorized and cleared from storage.');

        return response;
      }.bind(this));
  }
151178
def reset(self):
        

        self._is_impersonating = False
        self._impersonation = None

        self.user = None
        self.password = None
        self.api_key = None
        self.enterprise = None
        self.url = None
452666
def finish_user(self, subid):
    ''''''        

    p = self.revoke_token(subid)
    p.token = "finished"
    self.session.commit()
    return p
1253757
def unprocessable_authorization(exp)
      errors = exp.errors
      if not (errors.nil? or errors.empty?)
        error_hash = errors[0]
        if error_hash[:resource] == 'OauthAccess'
          # error_hash[:code]
          return ask_about_resetting_authorization
        else
          raise exp
        end
      else
        raise exp
      end
    end
393869
protected void createDefaultAuthorizations(ProcessDefinition processDefinition) {
    if(isAuthorizationEnabled()) {
      ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
      AuthorizationEntity[] authorizations = provider.newProcessDefinition(processDefinition);
      saveDefaultAuthorizations(authorizations);
    }
  }
1074537
def reject():
    """"""

    auth_message = ('Could not verify your access level for that URL.'
                    'Please login with proper credentials.')
    auth_message = json.dumps({'_status': 'Unauthorized',
                               'message': auth_message})

    headers = {'WWW-Authenticate': 'Basic realm="Login required"'}
    return flask.Response(auth_message, 401, headers=headers,
                          content_type='application/json')
680758
function authorizedHandler(value) {
    if (! value) return value;

    delete value.public_id;
    delete value.version;
    delete value.signature;
    delete value.resource_type;

    return value;
}
134788
function freezeAuthorization(authorization) {
    authorization.roles = Object.freeze(authorization.roles);
    return Object.freeze(authorization);
}
740859
def attempt_reauthorization(blink):
    """"""
    _LOGGER.info("Auth token expired, attempting reauthorization.")
    headers = blink.get_auth_token(is_retry=True)
    return headers
215973
async def deactivate(cls, access_key: str) -> dict:
        '''
        
        '''
        q = 'mutation($access_key: String!, $input: ModifyKeyPairInput!) {' + \
            '  modify_keypair(access_key: $access_key, props: $input) {' \
            '    ok msg' \
            '  }' \
            '}'
        variables = {
            'access_key': access_key,
            'input': {
                'is_active': False,
                'is_admin': None,
                'resource_policy': None,
                'rate_limit': None,
            },
        }
        rqst = Request(cls.session, 'POST', '/admin/graphql')
        rqst.set_json({
            'query': q,
            'variables': variables,
        })
        async with rqst.fetch() as resp:
            data = await resp.json()
            return data['modify_keypair']