Search in sources :

Example 6 with ParameterTagMapping

use of org.firebirdsql.gds.ParameterTagMapping in project jaybird by FirebirdSQL.

the class ClientAuthBlock method extractDataToParameterBuffer.

private void extractDataToParameterBuffer(ConnectionParameterBuffer pb) {
    byte[] clientData = getClientData();
    if (clientData == null || clientData.length == 0) {
        return;
    }
    String pluginName = getCurrentPluginName();
    ParameterTagMapping tagMapping = pb.getTagMapping();
    if (firstTime) {
        if (pluginName != null) {
            pb.addArgument(tagMapping.getAuthPluginNameTag(), pluginName);
        }
        pb.addArgument(tagMapping.getAuthPluginListTag(), getPluginNames());
        firstTime = false;
        log.debug("first time - added plugName & pluginList");
    }
    pb.addArgument(tagMapping.getSpecificAuthDataTag(), clientData);
    log.debug(String.format("Added %d bytes of spec data with tag isc_dpb_specific_auth_data", clientData.length));
}
Also used : ParameterTagMapping(org.firebirdsql.gds.ParameterTagMapping)

Aggregations

ParameterTagMapping (org.firebirdsql.gds.ParameterTagMapping)6 IAttachProperties (org.firebirdsql.gds.ng.IAttachProperties)2 HashMap (java.util.HashMap)1