public class NegotiateAuthenticationStrategy
extends org.apache.shiro.authc.pam.AbstractAuthenticationStrategy
NegotiateAuthenticationRealm
. When the negotiate logic is executing, one of more round trips with the client
occur. When the NegotiateAuthenticationRealm
determines another handshake is needed, it throws the exception:
AuthenticationInProgressException
. This custom strategy detects this exception, and immediately re-throws it
so classes higher up in the call stack will allow the handshake to proceed. Without this added logic, the handshake
could be halted after the first connection by the existing error handling. NegotiateAuthenticationFilter
and more than one realm is configured in
shiro.ini. If only one realm is defined, the current error handling in
ModularRealmAuthenticator.doSingleRealmAuthentication(org.apache.shiro.realm.Realm, org.apache.shiro.authc.AuthenticationToken)
works fine without requiring this strategy. However, the current error handling in
ModularRealmAuthenticator.doMultiRealmAuthentication(java.util.Collection, org.apache.shiro.authc.AuthenticationToken)
does require the NegotiateAuthenticationStrategy
to ensure negotiate 'continue' calls will proceed. So for
now, the most reliable approach is to use this strategy.afterAttempt(org.apache.shiro.realm.Realm,
org.apache.shiro.authc.AuthenticationToken, org.apache.shiro.authc.AuthenticationInfo,
org.apache.shiro.authc.AuthenticationInfo, Throwable)
Constructor and Description |
---|
NegotiateAuthenticationStrategy() |
Modifier and Type | Method and Description |
---|---|
org.apache.shiro.authc.AuthenticationInfo |
afterAttempt(org.apache.shiro.realm.Realm realm,
org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.authc.AuthenticationInfo singleRealmInfo,
org.apache.shiro.authc.AuthenticationInfo aggregateInfo,
Throwable t)
When the negotiate logic is executing, one of more round trips with the client occur.
|
public org.apache.shiro.authc.AuthenticationInfo afterAttempt(org.apache.shiro.realm.Realm realm, org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.authc.AuthenticationInfo singleRealmInfo, org.apache.shiro.authc.AuthenticationInfo aggregateInfo, Throwable t)
negotiate realm
determines another handshake is needed, it throws the
exception: AuthenticationInProgressException
. This custom strategy detects this exception, and
immediately re-throws it so classes higher up in the call stack will allow the handshake to proceed. Without this
added logic, the handshake would be halted after the first connection by the existing error handling.
afterAttempt
in interface org.apache.shiro.authc.pam.AuthenticationStrategy
afterAttempt
in class org.apache.shiro.authc.pam.AbstractAuthenticationStrategy
Copyright © 2010–2015 com.github.dblock. All rights reserved.