String key = generateKey(8);
String token = new StringBuilder(tokenTree.getPath()).append(DELIM).append(key).toString();
CoreValueFactory vf = contentSession.getCoreValueFactory();
tokenTree.setProperty(TOKEN_ATTRIBUTE_KEY, vf.createValue(PasswordUtility.buildPasswordHash(key)));
final long expirationTime = creationTime + tokenExpiration;
tokenTree.setProperty(TOKEN_ATTRIBUTE_EXPIRY, getExpirationValue(expirationTime));
Map<String, String> attributes;
for (String name : sc.getAttributeNames()) {