clientTgtReq.setPassword( oldPassword );
clientTgtReq.setServerPrincipal( "kadmin/changepw@" + KdcClientUtil.extractRealm( clientPrincipal ) );
TgTicket tgt = getTgt( clientTgtReq );
ApReq apReq = new ApReq();
ApOptions options = new ApOptions();
apReq.setApOptions( options );
apReq.setTicket( tgt.getTicket() );
Authenticator authenticator = new Authenticator();
authenticator.setCName( new PrincipalName( tgt.getClientName(), PrincipalNameType.KRB_NT_PRINCIPAL ) );
authenticator.setCRealm( tgt.getRealm() );
KerberosTime ctime = new KerberosTime();
authenticator.setCTime( ctime );
authenticator.setCusec( 0 );
authenticator.setSeqNumber( nonceGenerator.nextInt() );
EncryptionKey subKey = RandomKeyFactory.getRandomKey( usedEType );
authenticator.setSubKey( subKey );
EncryptedData authData = cipherTextHandler.encrypt( tgt.getSessionKey(), getEncoded( authenticator ), KeyUsage.AP_REQ_AUTHNT_SESS_KEY );
apReq.setAuthenticator( authData );
KrbPriv privateMessage = new KrbPriv();
EncKrbPrivPart part = new EncKrbPrivPart();