More generification to remove last warnings in core package.
This commit is contained in:
parent
4f33f4677b
commit
50ac9d3b05
|
@ -17,7 +17,6 @@ package org.springframework.security.access.event;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.security.access.AccessDecisionManager;
|
|
||||||
import org.springframework.security.access.AccessDeniedException;
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
import org.springframework.security.access.ConfigAttribute;
|
import org.springframework.security.access.ConfigAttribute;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
|
|
|
@ -17,8 +17,6 @@ package org.springframework.security.access.event;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationEvent;
|
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,14 +30,14 @@ import org.springframework.context.ApplicationListener;
|
||||||
* @author Ben Alex
|
* @author Ben Alex
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class LoggerListener implements ApplicationListener {
|
public class LoggerListener implements ApplicationListener<AbstractAuthorizationEvent> {
|
||||||
//~ Static fields/initializers =====================================================================================
|
//~ Static fields/initializers =====================================================================================
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(LoggerListener.class);
|
private static final Log logger = LogFactory.getLog(LoggerListener.class);
|
||||||
|
|
||||||
//~ Methods ========================================================================================================
|
//~ Methods ========================================================================================================
|
||||||
|
|
||||||
public void onApplicationEvent(ApplicationEvent event) {
|
public void onApplicationEvent(AbstractAuthorizationEvent event) {
|
||||||
if (event instanceof AuthenticationCredentialsNotFoundEvent) {
|
if (event instanceof AuthenticationCredentialsNotFoundEvent) {
|
||||||
AuthenticationCredentialsNotFoundEvent authEvent = (AuthenticationCredentialsNotFoundEvent) event;
|
AuthenticationCredentialsNotFoundEvent authEvent = (AuthenticationCredentialsNotFoundEvent) event;
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,6 @@
|
||||||
|
|
||||||
package org.springframework.security.authentication;
|
package org.springframework.security.authentication;
|
||||||
|
|
||||||
import org.springframework.security.core.Authentication;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a {@link org.springframework.security.core.Authentication#getDetails()} object for
|
* Provides a {@link org.springframework.security.core.Authentication#getDetails()} object for
|
||||||
* a given web request.
|
* a given web request.
|
||||||
|
|
|
@ -17,7 +17,6 @@ package org.springframework.security.authentication.event;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.context.ApplicationEvent;
|
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
|
@ -30,7 +29,7 @@ import org.springframework.util.ClassUtils;
|
||||||
* @author Ben Alex
|
* @author Ben Alex
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class LoggerListener implements ApplicationListener {
|
public class LoggerListener implements ApplicationListener<AbstractAuthenticationEvent> {
|
||||||
//~ Static fields/initializers =====================================================================================
|
//~ Static fields/initializers =====================================================================================
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(LoggerListener.class);
|
private static final Log logger = LogFactory.getLog(LoggerListener.class);
|
||||||
|
@ -40,7 +39,7 @@ public class LoggerListener implements ApplicationListener {
|
||||||
|
|
||||||
//~ Methods ========================================================================================================
|
//~ Methods ========================================================================================================
|
||||||
|
|
||||||
public void onApplicationEvent(ApplicationEvent event) {
|
public void onApplicationEvent(AbstractAuthenticationEvent event) {
|
||||||
if (event instanceof AbstractAuthenticationEvent) {
|
if (event instanceof AbstractAuthenticationEvent) {
|
||||||
AbstractAuthenticationEvent authEvent = (AbstractAuthenticationEvent) event;
|
AbstractAuthenticationEvent authEvent = (AbstractAuthenticationEvent) event;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ import javax.security.auth.login.LoginException;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.context.ApplicationEvent;
|
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.context.ApplicationEventPublisherAware;
|
import org.springframework.context.ApplicationEventPublisherAware;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
|
@ -127,7 +126,7 @@ import org.springframework.util.Assert;
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class JaasAuthenticationProvider implements AuthenticationProvider, ApplicationEventPublisherAware,
|
public class JaasAuthenticationProvider implements AuthenticationProvider, ApplicationEventPublisherAware,
|
||||||
InitializingBean, ApplicationListener {
|
InitializingBean, ApplicationListener<SessionDestroyedEvent> {
|
||||||
//~ Static fields/initializers =====================================================================================
|
//~ Static fields/initializers =====================================================================================
|
||||||
|
|
||||||
protected static final Log log = LogFactory.getLog(JaasAuthenticationProvider.class);
|
protected static final Log log = LogFactory.getLog(JaasAuthenticationProvider.class);
|
||||||
|
@ -339,11 +338,8 @@ public class JaasAuthenticationProvider implements AuthenticationProvider, Appli
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onApplicationEvent(ApplicationEvent applicationEvent) {
|
public void onApplicationEvent(SessionDestroyedEvent event) {
|
||||||
if (applicationEvent instanceof SessionDestroyedEvent) {
|
handleLogout(event);
|
||||||
SessionDestroyedEvent event = (SessionDestroyedEvent) applicationEvent;
|
|
||||||
handleLogout(event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,20 +15,17 @@
|
||||||
|
|
||||||
package org.springframework.security.authentication.jaas;
|
package org.springframework.security.authentication.jaas;
|
||||||
|
|
||||||
|
import org.springframework.context.ApplicationListener;
|
||||||
|
import org.springframework.security.authentication.jaas.event.JaasAuthenticationEvent;
|
||||||
import org.springframework.security.authentication.jaas.event.JaasAuthenticationFailedEvent;
|
import org.springframework.security.authentication.jaas.event.JaasAuthenticationFailedEvent;
|
||||||
import org.springframework.security.authentication.jaas.event.JaasAuthenticationSuccessEvent;
|
import org.springframework.security.authentication.jaas.event.JaasAuthenticationSuccessEvent;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationEvent;
|
|
||||||
import org.springframework.context.ApplicationListener;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DOCUMENT ME!
|
|
||||||
*
|
|
||||||
* @author Ray Krueger
|
* @author Ray Krueger
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class JaasEventCheck implements ApplicationListener {
|
public class JaasEventCheck implements ApplicationListener<JaasAuthenticationEvent> {
|
||||||
//~ Instance fields ================================================================================================
|
//~ Instance fields ================================================================================================
|
||||||
|
|
||||||
JaasAuthenticationFailedEvent failedEvent;
|
JaasAuthenticationFailedEvent failedEvent;
|
||||||
|
@ -36,7 +33,7 @@ public class JaasEventCheck implements ApplicationListener {
|
||||||
|
|
||||||
//~ Methods ========================================================================================================
|
//~ Methods ========================================================================================================
|
||||||
|
|
||||||
public void onApplicationEvent(ApplicationEvent event) {
|
public void onApplicationEvent(JaasAuthenticationEvent event) {
|
||||||
if (event instanceof JaasAuthenticationFailedEvent) {
|
if (event instanceof JaasAuthenticationFailedEvent) {
|
||||||
failedEvent = (JaasAuthenticationFailedEvent) event;
|
failedEvent = (JaasAuthenticationFailedEvent) event;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue