@IocBean(name="authenticationStrategy")
public class AnySuccessfulStrategy
extends org.apache.shiro.authc.pam.AbstractAuthenticationStrategy
| 构造器和说明 |
|---|
AnySuccessfulStrategy() |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
org.apache.shiro.authc.AuthenticationInfo |
beforeAllAttempts(Collection<? extends org.apache.shiro.realm.Realm> realms,
org.apache.shiro.authc.AuthenticationToken token)
Returns
null immediately, relying on this class's merge implementation to return only the first info object it
encounters, ignoring all subsequent ones. |
protected org.apache.shiro.authc.AuthenticationInfo |
merge(org.apache.shiro.authc.AuthenticationInfo info,
org.apache.shiro.authc.AuthenticationInfo aggregate)
Returns the specified
aggregate instance if is non null and valid
(that is, has principals and they are not empty) immediately, or, if it
is null or not valid, the info argument is returned instead. |
public org.apache.shiro.authc.AuthenticationInfo beforeAllAttempts(Collection<? extends org.apache.shiro.realm.Realm> realms, org.apache.shiro.authc.AuthenticationToken token) throws org.apache.shiro.authc.AuthenticationException
null immediately, relying on this class's merge implementation to return only the first info object it
encounters, ignoring all subsequent ones.beforeAllAttempts 在接口中 org.apache.shiro.authc.pam.AuthenticationStrategybeforeAllAttempts 在类中 org.apache.shiro.authc.pam.AbstractAuthenticationStrategyorg.apache.shiro.authc.AuthenticationExceptionprotected org.apache.shiro.authc.AuthenticationInfo merge(org.apache.shiro.authc.AuthenticationInfo info,
org.apache.shiro.authc.AuthenticationInfo aggregate)
aggregate instance if is non null and valid
(that is, has principals and they are not empty) immediately, or, if it
is null or not valid, the info argument is returned instead.
This logic ensures that the first valid info encountered is the one retained and all subsequent ones are ignored, since this strategy mandates that only the info from the first successfully authenticated realm be used.
merge 在类中 org.apache.shiro.authc.pam.AbstractAuthenticationStrategypublic 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)
throws org.apache.shiro.authc.AuthenticationException
afterAttempt 在接口中 org.apache.shiro.authc.pam.AuthenticationStrategyafterAttempt 在类中 org.apache.shiro.authc.pam.AbstractAuthenticationStrategyorg.apache.shiro.authc.AuthenticationExceptionCopyright © 2020. All rights reserved.