mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 07:12:32 +00:00
Reinstated missing author tag and some minor tidying (de-jalopying). Removed unused logger.
This commit is contained in:
parent
22a64c1555
commit
7258d30e13
@ -15,30 +15,28 @@
|
|||||||
|
|
||||||
package org.springframework.security.providers.anonymous;
|
package org.springframework.security.providers.anonymous;
|
||||||
|
|
||||||
import org.springframework.security.SpringSecurityMessageSource;
|
|
||||||
import org.springframework.security.Authentication;
|
|
||||||
import org.springframework.security.AuthenticationException;
|
|
||||||
import org.springframework.security.BadCredentialsException;
|
|
||||||
import org.springframework.security.providers.AuthenticationProvider;
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
import org.springframework.context.MessageSourceAware;
|
import org.springframework.context.MessageSourceAware;
|
||||||
import org.springframework.context.support.MessageSourceAccessor;
|
import org.springframework.context.support.MessageSourceAccessor;
|
||||||
|
import org.springframework.security.Authentication;
|
||||||
|
import org.springframework.security.AuthenticationException;
|
||||||
|
import org.springframework.security.BadCredentialsException;
|
||||||
|
import org.springframework.security.SpringSecurityMessageSource;
|
||||||
|
import org.springframework.security.providers.AuthenticationProvider;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An {@link AuthenticationProvider} implementation that validates {@link
|
* An {@link AuthenticationProvider} implementation that validates {@link AnonymousAuthenticationToken}s.
|
||||||
* org.springframework.security.providers.anonymous.AnonymousAuthenticationToken}s.<p>To be successfully validated, the
|
* <p>
|
||||||
* {@link org.springframework.security.providers.anonymous.AnonymousAuthenticationToken#getKeyHash()} must match this class'
|
* To be successfully validated, the {@link AnonymousAuthenticationToken#getKeyHash()} must match this class'
|
||||||
* {@link #getKey()}.</p>
|
* {@link #getKey()}.
|
||||||
|
*
|
||||||
|
* @author Ben Alex
|
||||||
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class AnonymousAuthenticationProvider implements AuthenticationProvider, InitializingBean, MessageSourceAware {
|
public class AnonymousAuthenticationProvider implements AuthenticationProvider, InitializingBean, MessageSourceAware {
|
||||||
//~ Static fields/initializers =====================================================================================
|
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(AnonymousAuthenticationProvider.class);
|
|
||||||
|
|
||||||
//~ Instance fields ================================================================================================
|
//~ Instance fields ================================================================================================
|
||||||
|
|
||||||
@ -47,7 +45,7 @@ public class AnonymousAuthenticationProvider implements AuthenticationProvider,
|
|||||||
|
|
||||||
//~ Methods ========================================================================================================
|
//~ Methods ========================================================================================================
|
||||||
|
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
Assert.hasLength(key, "A Key is required");
|
Assert.hasLength(key, "A Key is required");
|
||||||
Assert.notNull(this.messages, "A message source must be set");
|
Assert.notNull(this.messages, "A message source must be set");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user