Bug 311641 no CallerPrincipalCallback is valid
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1709 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
6e395884a6
commit
e565312464
|
@ -115,12 +115,15 @@ public class JaspiAuthenticator implements Authenticator
|
|||
{
|
||||
Set<UserIdentity> ids = clientSubject.getPrivateCredentials(UserIdentity.class);
|
||||
UserIdentity userIdentity;
|
||||
if (ids.size() > 0) {
|
||||
if (ids.size() > 0)
|
||||
{
|
||||
userIdentity = ids.iterator().next();
|
||||
// return new FormAuthenticator.FormAuthentication(this,ids.iterator().next());
|
||||
} else {
|
||||
CallerPrincipalCallback principalCallback = _callbackHandler.getThreadCallerPrincipalCallback();
|
||||
if (principalCallback == null) throw new NullPointerException("No CallerPrincipalCallback");
|
||||
if (principalCallback == null)
|
||||
{
|
||||
return Authentication.UNAUTHENTICATED;
|
||||
}
|
||||
Principal principal = principalCallback.getPrincipal();
|
||||
if (principal == null) {
|
||||
String principalName = principalCallback.getName();
|
||||
|
|
Loading…
Reference in New Issue