public AuthenticateUserOpImpl(Connection con, ExecutablePool pool) {
super(MessageType.USER_CREDENTIAL_MESSAGE, 1);
byte[] credentialBytes = null;
DistributedMember server = new InternalDistributedMember(con.getSocket().getInetAddress(),
con.getSocket().getPort(), false);
DistributedSystem sys = InternalDistributedSystem.getConnectedInstance();
String authInitMethod = sys.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT);
Properties tmpSecurityProperties = sys.getSecurityProperties();
Properties credentials = Handshake.getCredentials(authInitMethod, tmpSecurityProperties,
server, false, (InternalLogWriter) sys.getLogWriter(),
(InternalLogWriter) sys.getSecurityLogWriter());
getMessage().setMessageHasSecurePartFlag();
HeapDataOutputStream heapdos = new HeapDataOutputStream(Version.CURRENT);
try {
DataSerializer.writeProperties(credentials, heapdos);
credentialBytes = ((ConnectionImpl) con).encryptBytes(heapdos.toByteArray());
} catch (Exception e) {
throw new ServerOperationException(e);
} finally {
heapdos.close();
}
getMessage().addBytesPart(credentialBytes);
}