org.tynamo.shiro.extension.authc.pam
Class FirstExceptionStrategy

java.lang.Object
  extended by org.apache.shiro.authc.pam.AbstractAuthenticationStrategy
      extended by org.apache.shiro.authc.pam.FirstSuccessfulStrategy
          extended by org.tynamo.shiro.extension.authc.pam.FirstExceptionStrategy
All Implemented Interfaces:
org.apache.shiro.authc.pam.AuthenticationStrategy

public class FirstExceptionStrategy
extends org.apache.shiro.authc.pam.FirstSuccessfulStrategy

AuthenticationStrategy implementation that throws the first exception it gets and ignores all subsequent realms. If there is no exceptions it works as the FirstSuccessfulStrategy WARN: This approach works fine as long as there is ONLY ONE Realm per Token type.

Since:
0.4.5
See Also:
FirstSuccessfulStrategy

Constructor Summary
FirstExceptionStrategy()
           
 
Method Summary
 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)
           
 
Methods inherited from class org.apache.shiro.authc.pam.FirstSuccessfulStrategy
beforeAllAttempts, merge
 
Methods inherited from class org.apache.shiro.authc.pam.AbstractAuthenticationStrategy
afterAllAttempts, beforeAttempt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstExceptionStrategy

public FirstExceptionStrategy()
Method Detail

afterAttempt

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)
                                                       throws org.apache.shiro.authc.AuthenticationException
Specified by:
afterAttempt in interface org.apache.shiro.authc.pam.AuthenticationStrategy
Overrides:
afterAttempt in class org.apache.shiro.authc.pam.AbstractAuthenticationStrategy
Throws:
org.apache.shiro.authc.AuthenticationException


Copyright © 2004-2013. All Rights Reserved.