001package org.tynamo.security.internal; 002 003import org.apache.shiro.authc.AuthenticationListener; 004import org.tynamo.security.Authenticator; 005import org.tynamo.shiro.extension.authc.pam.FirstExceptionStrategy; 006 007public class ModularRealmAuthenticator extends org.apache.shiro.authc.pam.ModularRealmAuthenticator implements Authenticator { 008 009 public ModularRealmAuthenticator() { 010 super(); 011 setAuthenticationStrategy(new FirstExceptionStrategy()); 012 } 013 014 @Override 015 public void addAuthenticationListener(AuthenticationListener authenticationListener) { 016 getAuthenticationListeners().add(authenticationListener); 017 } 018 019 @Override 020 public void removeAuthenticationListener(AuthenticationListener authenticationListener) { 021 getAuthenticationListeners().remove(authenticationListener); 022 } 023}