ticket = new MoriaTicket(MoriaTicketType.LOGIN_TICKET, servicePrincipal, loginTicketTTL, authnAttempt);
final Long expiryTime = new Long(((Long) ticketTTLs.get(MoriaTicketType.LOGIN_TICKET)).longValue() + new Date().getTime()); ticket = new MoriaTicket(MoriaTicketType.LOGIN_TICKET, servicePrincipal, expiryTime, authnAttempt);
    public String createAuthnAttempt(final String[] requestedAttributes, final String responseURLPrefix,            final String responseURLPostfix, final boolean forceInteractiveAuthentication, final String servicePrincipal)            throws MoriaStoreException {        MoriaTicket ticket = null;        MoriaAuthnAttempt authnAttempt;        if (requestedAttributes == null) {            throw new IllegalArgumentException("requestedAttributes cannot be null.");        }        if (responseURLPrefix == null || responseURLPrefix.equals("")) {            throw new IllegalArgumentException("responseURLPrefix cannot be null or empty string.");        }        if (responseURLPostfix == null) {            throw new IllegalArgumentException("responseURLPostfix cannot be null.");        }        if (servicePrincipal == null || servicePrincipal.equals("")) {            throw new IllegalArgumentException("servicePrincipal cannot be null or empty string.");        }        authnAttempt = new MoriaAuthnAttempt(requestedAttributes, responseURLPrefix, responseURLPostfix,                forceInteractiveAuthentication, servicePrincipal);        ticket = new MoriaTicket(MoriaTicketType.LOGIN_TICKET, servicePrincipal, loginTicketTTL, authnAttempt);        insertIntoStore(ticket);        return ticket.getTicketId();    }