{
// Deny POSTDATED tickets in policy.
config.setPaEncTimestampRequired( false );
config.setPostdatedAllowed( false );
KdcReqBody kdcReqBody = new KdcReqBody();
kdcReqBody.setCName( getPrincipalName( "hnelson" ) );
kdcReqBody.setSName( getPrincipalName( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" ) );
kdcReqBody.setRealm( "EXAMPLE.COM" );
kdcReqBody.setEType( config.getEncryptionTypes() );
KdcOptions kdcOptions = new KdcOptions();
kdcOptions.set( KdcOptions.ALLOW_POSTDATE );
kdcReqBody.setKdcOptions( kdcOptions );
long now = System.currentTimeMillis();
KerberosTime requestedEndTime = new KerberosTime( now + 1 * KerberosTime.DAY );
kdcReqBody.setTill( requestedEndTime );
KdcReq message = new AsReq();
message.setKdcReqBody( kdcReqBody );
handler.messageReceived( session, message );