private final String ensureDate(Date date, Context context) throws AuthzOperationalException {
   if (date == null) {
     date = context.now();
   }
   String dateAsString;
   try {
     dateAsString = dateAsString(date);
   } catch (Throwable t) {
     throw new AuthzOperationalException("couldn't make date a string", t);
   }
   return dateAsString;
 }
Ejemplo n.º 2
0
 private void writeContextNow(Context context, XMLEventWriter writer) throws XMLStreamException {
   putStartTag(writer, QNAME_TAG_NOW);
   putCharacters(writer, JournalHelper.formatDate(context.now()));
   putEndTag(writer, QNAME_TAG_NOW);
 }
Ejemplo n.º 3
0
 private String encipherPassword(Context context, String password) {
   String key = JournalHelper.formatDate(context.now());
   return PasswordCipher.encipher(key, password);
 }