Sets a particular value for a session token. If the value is null, that token is deleted from
the session.

@param tokenName the token name
@param value the new value of the token, or null, if the token has to be deleted
512864
public void setTokenValue(String tokenName, Cookie value) {
		if (value == null) {
			tokenValues.remove(tokenName);
		} else {
			tokenValues.put(tokenName, value);
		}
	}
864478
@Override
	public void setValue(StringValue value) {
		Validate.notNull(value);
		setValue(value.value, 0, value.len);
	}
268792
public function setToken($username = null)
    {
        // Only set Token if Username is supplied.
        if (! is_null($username)) {
            $this->token = new Token($username);
        }

        return $this;
    }
858512
public function setConfirmationTokenAttribute($value)
    {
        // if null - dont generate and set null in table
        if (is_null($value)) {
            $this->attributes['confirmation_token'] = null;
        }
        else {
            $this->attributes['confirmation_token'] = $this->getUniqueConfirmationToken();
        }
    }
461374
public void set(String key, Object value) {
        if (value != null) put(key, value);
        else remove(key);
    }
906639
@Deprecated
    public void setAccessToken(String token) {
        checkUserSession("setAccessToken");
        synchronized (this.lock) {
            accessToken = token;
            lastAccessUpdateMillisecondsAfterEpoch = System.currentTimeMillis();
            sessionInvalidated = true;
        }
    }
1374889
public void set(String name, String value) {
		HttpHeader header = get(name);
		if(header == null) {
			add(name,value);
		} else {
			header.setValue(value);
		}
	}
861808
@JsonAnySetter
    public void set(final String name, final String value) {
        other.put(name, value);
    }
606953
public function set($key, $value=null)
    {
        // Set the time that this token was saved for the first time
        $this->setAcquisitionTime();

        if (is_null($value) && is_array($key)) {
            // An array of attributes was passed in so save each one
            foreach($key as $attribute => $value){
                $this->setValue($attribute, $value);
            }
        } else {
            // Not an array so just set the attribute
            $this->setValue($key, $value);
        }
    }
787085
public void substitute( String token, int value )
    {
        String valueStr = Integer.toString( value );
        _tokenValuesMap.put( token, valueStr );
    }
59464
private void destroySessionByToken(String id) {
		System.out.println(new LogEntry("destroying session " + id));
		synchronized (sessions) {
			synchronized (sessionsMirror) {
				StandardSession session = (StandardSession) sessions.get(id);
				if (session != null) {
					session.onDestruction();
					sessions.remove(id);
					sessionsMirror.remove(id);
				}
			}
		}
	}
505290
public function set(string $name, $value): void
    {
        self::doInit();

        $_SESSION[$name] = $value;
    }
1158498
@Override
    public void setUserName(String userName) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            StringBuffer sb = new StringBuffer(newValueString).append(userName).append(oldValueString).append(_userName).append(appNameAndIdString);
            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "setUserName", sb.toString());
        }
        _userName = userName;
    }
1067490
public void setValue(String attributeName, Object value) {
        if (attributeName == null || value == null) {
            throw new NullPointerException();
        }
        values.put(attributeName, value);
    }
1142516
public void setToken(String completeToken) {
		clearParameters();
		id = "";
		
		if (completeToken != null) {
			StringBuilder builder = new StringBuilder();

			char[] chs = completeToken.toCharArray();
			String currentKey = null;
			TokenParseState state = TokenParseState.PARSING_ID;
			for (char ch : chs) {
				switch (state) {
				case PARSING_ID:
					if (ch == '&') {
						state = TokenParseState.PARSING_KEY;
						id = builder.toString();
						builder.delete(0, builder.length());
					} else {
						builder.append(ch);
					}
					break;
				case PARSING_KEY:
					if (ch == '=') {
						state = TokenParseState.PARSING_VALUE;
						currentKey = builder.toString();
						if (!currentKey.isEmpty()) {
							parameters.put(currentKey, "");
							builder.delete(0, builder.length());
						}
					} else if (ch == '&') {
						currentKey = builder.toString();
						if (!currentKey.isEmpty()) {
							parameters.put(currentKey, "");
							builder.delete(0, builder.length());
						}
					} else {
						builder.append(ch);
					}
					break;
				case PARSING_VALUE:
					if (ch == '\'') {
						state = TokenParseState.PARSING_COMPLEX_VALUE;
					} else if (ch == '&') {
						state = TokenParseState.PARSING_KEY;
						parameters.put(currentKey, builder.toString());
						builder.delete(0, builder.length());
					} else {
						builder.append(ch);
					}
					break;
				case PARSING_COMPLEX_VALUE:
					if (ch == '\'') {
						state = TokenParseState.PARSED_COMPLEX_VALUE;
						parameters.put(currentKey, builder.toString());
						builder.delete(0, builder.length());
					} else {
						builder.append(ch);
					}
					break;
				case PARSED_COMPLEX_VALUE:
					if (ch == '&') {
						state = TokenParseState.PARSING_KEY;
					}
					break;
				}
			}

			switch (state) {
			case PARSING_ID:
				id = builder.toString();
				break;
			case PARSING_KEY:
				currentKey = builder.toString();
				if (!currentKey.isEmpty()) {
					parameters.put(currentKey, "");
				}
				break;
			case PARSING_COMPLEX_VALUE:
			case PARSING_VALUE:
				String value = builder.toString();
				if (!value.isEmpty() && currentKey != null) {
					parameters.put(currentKey, value);
				}
				break;
			default:
				break;
			}
		}
	}
228145
public void setTokens(final String tokens) {
        if (tokens != null)
            attrMixin.setAttribute(TOKENS, tokens);
        else
            attrMixin.removeAttribute(TOKENS);
    }
1133254
def set_token(self, redirecturl):
        
        log.debug('Setting the token on %s.' % self.session)
        self.session.token_from_fragment(redirecturl)