Deprecated Acegi

This commit is contained in:
Arjen Poutsma
2009-08-24 10:46:53 +00:00
parent 5c7e08051c
commit 1a0fa5ec27
7 changed files with 30 additions and 16 deletions

View File

@@ -1,10 +1,11 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,27 +16,33 @@
package org.springframework.ws.soap.security.support;
import org.acegisecurity.userdetails.UserDetails;
import org.acegisecurity.LockedException;
import org.acegisecurity.DisabledException;
import org.acegisecurity.AccountExpiredException;
import org.acegisecurity.CredentialsExpiredException;
import org.acegisecurity.DisabledException;
import org.acegisecurity.LockedException;
import org.acegisecurity.userdetails.UserDetails;
/**
* Generic utility methods for Spring Security
*
* @author Tareq Abedrabbo
* @since 1.5.8
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
*/
public abstract class AcegiUtils {
/**
* Checks the validity of a user's account and credentials.
*
* @param user the user to check
* @throws org.springframework.security.AccountExpiredException if the account has expired
* @throws org.springframework.security.CredentialsExpiredException if the credentials have expired
* @throws org.springframework.security.DisabledException if the account is disabled
* @throws org.springframework.security.LockedException if the account is locked
* @throws org.springframework.security.AccountExpiredException
* if the account has expired
* @throws org.springframework.security.CredentialsExpiredException
* if the credentials have expired
* @throws org.springframework.security.DisabledException
* if the account is disabled
* @throws org.springframework.security.LockedException
* if the account is locked
*/
public static void checkUserValidity(UserDetails user)
throws AccountExpiredException, CredentialsExpiredException, DisabledException, LockedException {

View File

@@ -33,9 +33,9 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.dao.DataAccessException;
import org.springframework.util.Assert;
import org.springframework.ws.soap.security.callback.CleanupCallback;
import org.springframework.ws.soap.security.support.AcegiUtils;
import org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler;
import org.springframework.ws.soap.security.wss4j.callback.UsernameTokenPrincipalCallback;
import org.springframework.ws.soap.security.support.AcegiUtils;
/**
* Callback handler that validates a password digest using an Acegi <code>UserDetailsService</code>. Logic based on
@@ -48,6 +48,7 @@ import org.springframework.ws.soap.security.support.AcegiUtils;
* @see org.acegisecurity.userdetails.UserDetailsService
* @see org.acegisecurity.ui.digestauth.DigestProcessingFilter
* @since 1.5.0
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
*/
public class AcegiDigestPasswordValidationCallbackHandler extends AbstractWsPasswordCallbackHandler
implements InitializingBean {

View File

@@ -44,6 +44,7 @@ import org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCal
* @see org.acegisecurity.providers.UsernamePasswordAuthenticationToken
* @see org.acegisecurity.ui.basicauth.BasicProcessingFilter
* @since 1.5.0
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
*/
public class AcegiPlainTextPasswordValidationCallbackHandler extends AbstractWsPasswordCallbackHandler
implements InitializingBean {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,6 +48,7 @@ import org.springframework.ws.soap.security.callback.CleanupCallback;
* @see org.acegisecurity.ui.x509.X509ProcessingFilter
* @see CertificateValidationCallback
* @since 1.0.0
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
*/
public class AcegiCertificateValidationCallbackHandler extends AbstractCallbackHandler implements InitializingBean {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,8 +35,8 @@ import org.springframework.dao.DataAccessException;
import org.springframework.util.Assert;
import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
import org.springframework.ws.soap.security.callback.CleanupCallback;
import org.springframework.ws.soap.security.xwss.callback.DefaultTimestampValidator;
import org.springframework.ws.soap.security.support.AcegiUtils;
import org.springframework.ws.soap.security.xwss.callback.DefaultTimestampValidator;
/**
* Callback handler that validates a password digest using an Acegi <code>UserDetailsService</code>. Logic based on
@@ -54,6 +54,7 @@ import org.springframework.ws.soap.security.support.AcegiUtils;
* @see com.sun.xml.wss.impl.callback.PasswordValidationCallback.DigestPasswordRequest
* @see org.acegisecurity.ui.digestauth.DigestProcessingFilter
* @since 1.0.0
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
*/
public class AcegiDigestPasswordValidationCallbackHandler extends AbstractCallbackHandler implements InitializingBean {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,6 +49,7 @@ import org.springframework.ws.soap.security.callback.CleanupCallback;
* @see com.sun.xml.wss.impl.callback.PasswordValidationCallback.PlainTextPasswordRequest
* @see org.acegisecurity.ui.basicauth.BasicProcessingFilter
* @since 1.0.0
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
*/
public class AcegiPlainTextPasswordValidationCallbackHandler extends AbstractCallbackHandler
implements InitializingBean {
@@ -98,8 +99,9 @@ public class AcegiPlainTextPasswordValidationCallbackHandler extends AbstractCal
PasswordValidationCallback.PlainTextPasswordRequest plainTextRequest =
(PasswordValidationCallback.PlainTextPasswordRequest) request;
try {
Authentication authResult = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(
plainTextRequest.getUsername(), plainTextRequest.getPassword()));
Authentication authResult = authenticationManager.authenticate(
new UsernamePasswordAuthenticationToken(plainTextRequest.getUsername(),
plainTextRequest.getPassword()));
if (logger.isDebugEnabled()) {
logger.debug("Authentication success: " + authResult.toString());
}

View File

@@ -36,6 +36,7 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
*
* @author Arjen Poutsma
* @since 1.5.0
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
*/
public class AcegiUsernamePasswordCallbackHandler extends AbstractCallbackHandler {