@Override protected void populateAuthenticationProperties(final AbstractConnection connection, final ConnectionParameterBuffer pb) throws SQLException { if (!(connection instanceof WireConnection)) { throw new IllegalArgumentException( "populateAuthenticationProperties should have been called with a WireConnection instance, was " + connection.getClass().getName()); } ClientAuthBlock clientAuthBlock = ((WireConnection) connection).getClientAuthBlock(); if (clientAuthBlock == null || clientAuthBlock.isAuthComplete()) { return; } IAttachProperties props = connection.getAttachProperties(); ParameterTagMapping tagMapping = pb.getTagMapping(); if (props.getUser() != null) { pb.addArgument(tagMapping.getUserNameTag(), props.getUser()); } clientAuthBlock.authFillParametersBlock(pb); }
@Override protected void populateAuthenticationProperties(final AbstractConnection connection, final ConnectionParameterBuffer pb) throws SQLException { if (!(connection instanceof WireConnection)) { throw new IllegalArgumentException( "populateAuthenticationProperties should have been called with a WireConnection instance, was " + connection.getClass().getName()); } ClientAuthBlock clientAuthBlock = ((WireConnection) connection).getClientAuthBlock(); if (clientAuthBlock == null || clientAuthBlock.isAuthComplete()) { return; } IAttachProperties props = connection.getAttachProperties(); ParameterTagMapping tagMapping = pb.getTagMapping(); if (props.getUser() != null) { pb.addArgument(tagMapping.getUserNameTag(), props.getUser()); } clientAuthBlock.authFillParametersBlock(pb); }
@Override protected void populateAuthenticationProperties(final AbstractConnection connection, final ConnectionParameterBuffer pb) throws SQLException { IAttachProperties props = connection.getAttachProperties(); ParameterTagMapping tagMapping = pb.getTagMapping(); if (props.getUser() != null) { pb.addArgument(tagMapping.getUserNameTag(), props.getUser()); } if (props.getPassword() != null) { pb.addArgument(tagMapping.getEncryptedPasswordTag(), UnixCrypt.crypt(props.getPassword(), LEGACY_PASSWORD_SALT).substring(2, 13)); } }
@Override protected void populateAuthenticationProperties(final AbstractConnection connection, final ConnectionParameterBuffer pb) throws SQLException { IAttachProperties props = connection.getAttachProperties(); ParameterTagMapping tagMapping = pb.getTagMapping(); if (props.getUser() != null) { pb.addArgument(tagMapping.getUserNameTag(), props.getUser()); } if (props.getPassword() != null) { pb.addArgument(tagMapping.getEncryptedPasswordTag(), UnixCrypt.crypt(props.getPassword(), LEGACY_PASSWORD_SALT).substring(2, 13)); } }