Class FirstExceptionStrategy

java.lang.Object
org.apache.shiro.authc.pam.AbstractAuthenticationStrategy
org.apache.shiro.authc.pam.FirstSuccessfulStrategy
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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    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)
     

    Methods inherited from class org.apache.shiro.authc.pam.FirstSuccessfulStrategy

    beforeAllAttempts, beforeAttempt, getStopAfterFirstSuccess, merge, setStopAfterFirstSuccess

    Methods inherited from class org.apache.shiro.authc.pam.AbstractAuthenticationStrategy

    afterAllAttempts

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FirstExceptionStrategy

      public FirstExceptionStrategy()
  • Method Details

    • 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