} catch (IOException e) {
throw new LoginException("Cannot handle http callback: "
+ e.getMessage());
+ } catch (ThreadDeath e) {
+ throw new ThreadDeathLoginException(
+ "Callbackhandler thread died", e);
} catch (UnsupportedCallbackException e) {
return false;
}
public boolean commit() throws LoginException {
Authorization authorization = subject
.getPrivateCredentials(Authorization.class).iterator().next();
- if (request != null) {
+ if (request != null && authorization.getName() != null) {
request.setAttribute(HttpContext.REMOTE_USER,
authorization.getName());
request.setAttribute(HttpContext.AUTHORIZATION, authorization);