Saves the changes to an authorization assignment.
@param CAuthAssignment $assignment the assignment that has been changed.
338312
public function saveAuthAssignment($assignment)
	{
		$this->db->createCommand()
			->update($this->assignmentTable, array(
				'bizrule'=>$assignment->getBizRule(),
				'data'=>serialize($assignment->getData()),
			), 'itemname=:itemname AND userid=:userid', array(
				'itemname'=>$assignment->getItemName(),
				'userid'=>$assignment->getUserId()
			));
	}
170717
public function updateBitlyAccessToken($access_token)
    {
        $activeSystem = $this->getActiveSystem();
        $activeSystem->setBitlyAccessToken($access_token);
        $this->em->persist($activeSystem);
        $this->em->flush();
    }
791009
public function refreshTokenWithAssertion($assertionCredentials = null) {
    if (!$assertionCredentials) {
      $assertionCredentials = $this->assertionCredentials;
    }

    $this->refreshTokenRequest(array(
        'grant_type' => 'assertion',
        'assertion_type' => $assertionCredentials->assertionType,
        'assertion' => $assertionCredentials->generateAssertion(),
    ));
  }
1206969
protected function visitSirelNodeAssignment(Node\Assignment $assign)
    {
        return $this->visit($assign->getLeft())
            . " = " . $this->visit($assign->getRight());
    }
332070
protected function updateCredentials()
    {
        if ($this->http) {
            $this->http->setOption(CURLOPT_USERPWD, implode(":", array(
                $this->getUsername(),
                $this->getPassword()
            )));
        }
    }
1176743
public function authorize(AuthenticationInterface $authentication)
    {
        $this->setHeader();

        $this->fetchToken();

        $this->checkTokenType();

        $authentication->addAttribute($this->token->access_token);
    }
560443
protected function saveToken(AccessToken $token)
    {
        if ($this->config['api_token'] && $this->config['api_token_type'] === 'access') {
            return;
        }
        foreach ($token->jsonSerialize() as $name => $value) {
            if (isset($this->storageKeys[$name])) {
                $this->session->set($this->storageKeys[$name], $value);
            }
        }
        $this->session->save();
    }
121761
def save(self, commit=True):
        
        instance = super(UserChangeForm, self).save(commit=commit)

        if commit:
            self.set_permissions(instance)

        return instance
894230
public void setAssignmentValue(int[] assignment, double value) {
    assert !Double.isNaN(value);
    values[getTableAccessOffset(assignment)] = value;
  }
1231643
public function assignProperty(PropertyAssignation $propertyAssignation) {
// 		if (!$this->isPropertyAssignable()) {
// 			throw new IncompatiblePropertyException('EiProp can not be assigned to a property.');
// 		}
	
		if ($this->confEntityPropertyEiProp !== null) {
			try {
				$this->confEntityPropertyEiProp->setEntityProperty(
						$propertyAssignation->getEntityProperty(false));
			} catch (\InvalidArgumentException $e) {
				throw $propertyAssignation->createEntityPropertyException(null, $e);
			}
		}
	
		if ($this->confObjectPropertyEiProp !== null) {
			try {
				$this->confObjectPropertyEiProp->setObjectPropertyAccessProxy(
						$propertyAssignation->getObjectPropertyAccessProxy(false));
			} catch (\InvalidArgumentException $e) {
				throw $propertyAssignation->createAccessProxyException(null, $e);
			} catch (ConstraintsConflictException $e) {
				throw $propertyAssignation->createAccessProxyException(null, $e);
			}
		}
		
		$this->propertyAssignation = $propertyAssignation;
	}
553449
def _save_assignment(self, node, name=None):
        """"""
        if self._global_names and node.name in self._global_names[-1]:
            node.root().set_local(node.name, node)
        else:
            node.parent.set_local(node.name, node)
269023
protected function assign($role = null, $action = null, $allow = true)
    {
        $role   = $this->roles->findKey($role);
        $action = $this->actions->findKey($action);

        if (!is_null($role) && !is_null($action)) {
            $key             = $role . ':' . $action;
            $this->acl[$key] = $allow;
        }
    }
560274
private function clearRequest(AuthorizationRequest $request)
    {
        /** @var Client $client */
        $client = $request->getClient();
        $clientId = $client->getClientKey();
        $this->session->remove("authn_request.$clientId");
    }
623216
protected function assign(?string $role = null, ?string $action = null, bool $allow = true): void
    {
        $role = $this->roles->findKey($role);
        $action = $this->actions->findKey($action);

        if (! \is_null($role) && ! \is_null($action)) {
            $this->acl["{$role}:{$action}"] = $allow;
        }
    }
435562
public function set_assign(\assign $assign) {
        if ($this->is_triggered()) {
            throw new \coding_exception('set_assign() must be done before triggerring of event');
        }
        if ($assign->get_context()->id != $this->get_context()->id) {
            throw new \coding_exception('Invalid assign isntance supplied!');
        }
        if ($assign->is_blind_marking()) {
            $this->data['anonymous'] = 1;
        }
        $this->assign = $assign;
    }
396126
public function setAuth(AuthAbstract $auth)
  {
    $this->config->setAuthClass(get_class($auth));
    $this->auth = $auth;
  }
1165638
public function setAuthCredentials($username, $password)
    {

        $this->setUsername($username);

        $this->setPassword($password);

        $this->authCredentials = base64_encode(
            "{$this->username}:{$this->password}"
        );

    }