56 private byte[] challengeData = null; |
56 private byte[] challengeData = null; |
57 private String authzid; |
57 private String authzid; |
58 private CallbackHandler cbh; |
58 private CallbackHandler cbh; |
59 |
59 |
60 /** |
60 /** |
61 * Creates a SASL mechanism with client credentials that it needs |
61 * Creates a CRAM-MD5 SASL server. |
62 * to participate in CRAM-MD5 authentication exchange with the server. |
|
63 * |
62 * |
64 * @param authID A non-null string representing the principal |
63 * @param protocol ignored in CRAM-MD5 |
65 * being authenticated. |
64 * @param serverFqdn non-null, used in generating a challenge |
66 * |
65 * @param props ignored in CRAM-MD5 |
67 * @param pw A non-null String or byte[] |
66 * @param cbh find password, authorize user |
68 * containing the password. If it is an array, it is first cloned. |
|
69 */ |
67 */ |
70 CramMD5Server(String protocol, String serverFqdn, Map<String, ?> props, |
68 CramMD5Server(String protocol, String serverFqdn, Map<String, ?> props, |
71 CallbackHandler cbh) throws SaslException { |
69 CallbackHandler cbh) throws SaslException { |
72 if (serverFqdn == null) { |
70 if (serverFqdn == null) { |
73 throw new SaslException( |
71 throw new SaslException( |