コード例 #1
0
 @Override
 protected synchronized byte[] createPassword(TokenIdent identifier) {
   LOG.info("Creating password for identifier: " + identifier);
   int sequenceNum;
   long now = System.currentTimeMillis();
   sequenceNum = ++delegationTokenSequenceNumber;
   identifier.setIssueDate(now);
   identifier.setMaxDate(now + tokenMaxLifetime);
   identifier.setMasterKeyId(currentId);
   identifier.setSequenceNumber(sequenceNum);
   byte[] password = createPassword(identifier.getBytes(), currentKey.getKey());
   currentTokens.put(
       identifier, new DelegationTokenInformation(now + tokenRenewInterval, password));
   return password;
 }