Lines 283-290
Link Here
|
283 |
LoginContext loginContext = null; |
283 |
LoginContext loginContext = null; |
284 |
try { |
284 |
try { |
285 |
loginContext = new LoginContext |
285 |
loginContext = new LoginContext |
286 |
(appName, new JAASCallbackHandler(this, username, |
286 |
(appName, createCallbackHandler(username,credentials)); |
287 |
credentials)); |
|
|
288 |
} catch (LoginException e) { |
287 |
} catch (LoginException e) { |
289 |
log(sm.getString("jaasRealm.loginException", username), e); |
288 |
log(sm.getString("jaasRealm.loginException", username), e); |
290 |
return (null); |
289 |
return (null); |
Lines 402-407
Link Here
|
402 |
|
401 |
|
403 |
} |
402 |
} |
404 |
|
403 |
|
|
|
404 |
/** |
405 |
* Constructs a CallbackHandler to be used with the JAAS LoginContext |
406 |
* to handle the information needed by the configured LoginModule. |
407 |
* |
408 |
* @param username The user's login name. |
409 |
* @param credentials The password supplied by the user. |
410 |
* @return A CallbackHandler for the configured LoginModule. |
411 |
*/ |
412 |
protected CallbackHandler createCallbackHandler(String username, |
413 |
String credentials) { |
414 |
return new JAASCallbackHandler(this, username, credentials); |
415 |
} |
405 |
|
416 |
|
406 |
// ------------------------------------------------------ Lifecycle Methods |
417 |
// ------------------------------------------------------ Lifecycle Methods |
407 |
|
418 |
|