web/src/main/java/org/springframework/security/web/authentication/rememberme/AbstractRememberMeServices.java
protected String[] decodeCookie(String cookieValue) throws InvalidCookieException {
		for (int j = 0; j < cookieValue.length() % 4; j++) {
			cookieValue = cookieValue + "=";
		}

		try {
			Base64.getDecoder().decode(cookieValue.getBytes());
		}
		catch (IllegalArgumentException e) {
			throw new InvalidCookieException(
					"Cookie token was not Base64 encoded; value was '" + cookieValue
							+ "'");
		}

		String cookieAsPlainText = new String(Base64.getDecoder().decode(cookieValue.getBytes()));

		String[] tokens = StringUtils.delimitedListToStringArray(cookieAsPlainText,
				DELIMITER);

		for (int i = 0; i < tokens.length; i++)
		{
			try
			{
				tokens[i] = URLDecoder.decode(tokens[i], StandardCharsets.UTF_8.toString());
			}
			catch (UnsupportedEncodingException e)
			{
				logger.error(e.getMessage(), e);
			}
		}

		return tokens;
	}
protected String[] decodeCookie(String cookieValue) throws InvalidCookieException {
		for (int j = 0; j < cookieValue.length() % 4; j++) {
			cookieValue = cookieValue + "=";
		}

		try {
			Base64.getDecoder().decode(cookieValue.getBytes());
		}
		catch (IllegalArgumentException e) {
			throw new InvalidCookieException(
					"Cookie token was not Base64 encoded; value was '" + cookieValue
							+ "'");
		}

		String cookieAsPlainText = new String(Base64.getDecoder().decode(cookieValue.getBytes()));

		String[] tokens = StringUtils.delimitedListToStringArray(cookieAsPlainText,
				DELIMITER);

		for (int i = 0; i < tokens.length; i++)
		{
			try
			{
				tokens[i] = URLDecoder.decode(tokens[i], StandardCharsets.UTF_8.toString());
			}
			catch (UnsupportedEncodingException e)
			{
				logger.error(e.getMessage(), e);
			}
		}

		return tokens;
	}
protected String [ ] decodeCookie ( String cookieValue ) throws InvalidCookieException { for ( int j = 0 ; j < cookieValue . length ( ) % 4 ; j ++ ) { cookieValue = cookieValue + "=" ; } try { Base64 . getDecoder ( ) . decode ( cookieValue . getBytes ( ) ) ; } catch ( IllegalArgumentException e ) { throw new InvalidCookieException ( "Cookie token was not Base64 encoded; value was '" + cookieValue + "'" ) ; } String cookieAsPlainText = new String ( Base64 . getDecoder ( ) . decode ( cookieValue . getBytes ( ) ) ) ; String [ ] tokens = StringUtils . delimitedListToStringArray ( cookieAsPlainText , DELIMITER ) ; for ( int i = 0 ; i < tokens . length ; i ++ ) { try { tokens [ i ] = URLDecoder . decode ( tokens [ i ] , StandardCharsets . UTF_8 . toString ( ) ) ; } catch ( UnsupportedEncodingException e ) { logger . error ( e . getMessage ( ) , e ) ; } } return tokens ; }
Decodes the cookie and splits it into a set of token strings using the ":"
delimiter.

@param cookieValue the value obtained from the submitted cookie
@return the array of tokens.
@throws InvalidCookieException if the cookie was not base64 encoded.
Decodes the cookie and splits it into a set of token strings using the : delimiter .