Home | Previous Page | Next Page   Connecting to the Database > PAM Authentication Method >

Using PAM in JDBC

JDBC developers using PAM to communicate with a PAM-enabled Dynamic Server must implement the com.informix.jdbc.IfmxPAM interface. To do so, put the following on the class declaration line in a Java class file:

implements IfmxPAM

That Java class must then implement the IfmxPAM interface conforming to Java standards and the details provided above. The next step is to inform the JDBC driver what Java class has implemented the IfmxPAM interface. There are two ways to do this:

JDBC developers have a wide latitude in implementing the IfmxPAM interface. The following actions happen during authentication using PAM:

  1. The JDBC driver, when detecting communication with a PAM-enabled server, contacts the IfxPAM() method and passes it a IfxPAMChallenge object containing the PAM challenge question.
  2. A dialog box you create appears with a text question containing the challenge message that was sent by PAM.
  3. When the user furnishes the response, it is packaged into an IfxPAMResponse object, and it is returned to the JDBC driver by exiting the IfxPAM() method returning the IfxPAMResponse object.
  4. When PAM receives the response from the challenge question, it can authorize the user, deny access to the user, or issue another challenge question, in which case the above process is repeated.

This process continues until either the user is authorized or the user is denied access. The Java developer or user can terminate the PAM authorization sequence by calling the IfxPAMResponse.setTerminateConnection() method with a value of TRUE.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]