View Javadoc

1   package ch.odi.pam;
2   
3   /**
4    * Callback interface for Pam. Pam will query the application for credentials through
5    * this interface.
6    *
7    * @author Ortwin Gl?ck
8    */
9   public interface PamCallback {
10      /**
11       * Implementing methods should examine the messages and create appropriate responses.
12       * 
13       * @param messages The messages.
14       * @param responses An empty array of the same size as messages.
15       * @return PAM_SUCCESS is the expected return value of this function. However, should an error
16       *  occur the application should not set the responses but simply return PAM_CONV_ERR.
17       */
18      int handle(PamMessage[] messages, PamResponse[] responses);
19  }