Search in sources :

Example 1 with WireConnection

use of org.firebirdsql.gds.ng.wire.WireConnection in project jaybird by FirebirdSQL.

the class V13ParameterConverter method populateAuthenticationProperties.

@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());
    }
    IAttachProperties props = connection.getAttachProperties();
    ParameterTagMapping tagMapping = pb.getTagMapping();
    if (props.getUser() != null) {
        pb.addArgument(tagMapping.getUserNameTag(), props.getUser());
    }
    ClientAuthBlock clientAuthBlock = ((WireConnection) connection).getClientAuthBlock();
    if (clientAuthBlock.isAuthComplete()) {
        return;
    }
    clientAuthBlock.authFillParametersBlock(pb);
}
Also used : IAttachProperties(org.firebirdsql.gds.ng.IAttachProperties) WireConnection(org.firebirdsql.gds.ng.wire.WireConnection) ClientAuthBlock(org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock)

Aggregations

IAttachProperties (org.firebirdsql.gds.ng.IAttachProperties)1 WireConnection (org.firebirdsql.gds.ng.wire.WireConnection)1 ClientAuthBlock (org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock)1