Skip to content

Commit 1a0fa5e

Browse files
committed
Deprecated Acegi
1 parent 5c7e080 commit 1a0fa5e

File tree

7 files changed

+30
-16
lines changed

7 files changed

+30
-16
lines changed

security/src/main/java/org/springframework/ws/soap/security/support/AcegiUtils.java

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
1+
/*
2+
* Copyright 2002-2009 the original author or authors.
23
*
34
* Licensed under the Apache License, Version 2.0 (the "License");
45
* you may not use this file except in compliance with the License.
56
* You may obtain a copy of the License at
67
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
89
*
910
* Unless required by applicable law or agreed to in writing, software
1011
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,27 +16,33 @@
1516

1617
package org.springframework.ws.soap.security.support;
1718

18-
import org.acegisecurity.userdetails.UserDetails;
19-
import org.acegisecurity.LockedException;
20-
import org.acegisecurity.DisabledException;
2119
import org.acegisecurity.AccountExpiredException;
2220
import org.acegisecurity.CredentialsExpiredException;
21+
import org.acegisecurity.DisabledException;
22+
import org.acegisecurity.LockedException;
23+
import org.acegisecurity.userdetails.UserDetails;
2324

2425
/**
2526
* Generic utility methods for Spring Security
2627
*
2728
* @author Tareq Abedrabbo
2829
* @since 1.5.8
30+
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
2931
*/
3032
public abstract class AcegiUtils {
3133

3234
/**
3335
* Checks the validity of a user's account and credentials.
36+
*
3437
* @param user the user to check
35-
* @throws org.springframework.security.AccountExpiredException if the account has expired
36-
* @throws org.springframework.security.CredentialsExpiredException if the credentials have expired
37-
* @throws org.springframework.security.DisabledException if the account is disabled
38-
* @throws org.springframework.security.LockedException if the account is locked
38+
* @throws org.springframework.security.AccountExpiredException
39+
* if the account has expired
40+
* @throws org.springframework.security.CredentialsExpiredException
41+
* if the credentials have expired
42+
* @throws org.springframework.security.DisabledException
43+
* if the account is disabled
44+
* @throws org.springframework.security.LockedException
45+
* if the account is locked
3946
*/
4047
public static void checkUserValidity(UserDetails user)
4148
throws AccountExpiredException, CredentialsExpiredException, DisabledException, LockedException {

security/src/main/java/org/springframework/ws/soap/security/wss4j/callback/acegi/AcegiDigestPasswordValidationCallbackHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
import org.springframework.dao.DataAccessException;
3434
import org.springframework.util.Assert;
3535
import org.springframework.ws.soap.security.callback.CleanupCallback;
36+
import org.springframework.ws.soap.security.support.AcegiUtils;
3637
import org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler;
3738
import org.springframework.ws.soap.security.wss4j.callback.UsernameTokenPrincipalCallback;
38-
import org.springframework.ws.soap.security.support.AcegiUtils;
3939

4040
/**
4141
* Callback handler that validates a password digest using an Acegi <code>UserDetailsService</code>. Logic based on
@@ -48,6 +48,7 @@
4848
* @see org.acegisecurity.userdetails.UserDetailsService
4949
* @see org.acegisecurity.ui.digestauth.DigestProcessingFilter
5050
* @since 1.5.0
51+
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
5152
*/
5253
public class AcegiDigestPasswordValidationCallbackHandler extends AbstractWsPasswordCallbackHandler
5354
implements InitializingBean {

security/src/main/java/org/springframework/ws/soap/security/wss4j/callback/acegi/AcegiPlainTextPasswordValidationCallbackHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* @see org.acegisecurity.providers.UsernamePasswordAuthenticationToken
4545
* @see org.acegisecurity.ui.basicauth.BasicProcessingFilter
4646
* @since 1.5.0
47+
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
4748
*/
4849
public class AcegiPlainTextPasswordValidationCallbackHandler extends AbstractWsPasswordCallbackHandler
4950
implements InitializingBean {

security/src/main/java/org/springframework/ws/soap/security/xwss/callback/acegi/AcegiCertificateValidationCallbackHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006 the original author or authors.
2+
* Copyright 2002-2009 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,6 +48,7 @@
4848
* @see org.acegisecurity.ui.x509.X509ProcessingFilter
4949
* @see CertificateValidationCallback
5050
* @since 1.0.0
51+
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
5152
*/
5253
public class AcegiCertificateValidationCallbackHandler extends AbstractCallbackHandler implements InitializingBean {
5354

security/src/main/java/org/springframework/ws/soap/security/xwss/callback/acegi/AcegiDigestPasswordValidationCallbackHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006 the original author or authors.
2+
* Copyright 2002-2009 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,8 +35,8 @@
3535
import org.springframework.util.Assert;
3636
import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
3737
import org.springframework.ws.soap.security.callback.CleanupCallback;
38-
import org.springframework.ws.soap.security.xwss.callback.DefaultTimestampValidator;
3938
import org.springframework.ws.soap.security.support.AcegiUtils;
39+
import org.springframework.ws.soap.security.xwss.callback.DefaultTimestampValidator;
4040

4141
/**
4242
* Callback handler that validates a password digest using an Acegi <code>UserDetailsService</code>. Logic based on
@@ -54,6 +54,7 @@
5454
* @see com.sun.xml.wss.impl.callback.PasswordValidationCallback.DigestPasswordRequest
5555
* @see org.acegisecurity.ui.digestauth.DigestProcessingFilter
5656
* @since 1.0.0
57+
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
5758
*/
5859
public class AcegiDigestPasswordValidationCallbackHandler extends AbstractCallbackHandler implements InitializingBean {
5960

security/src/main/java/org/springframework/ws/soap/security/xwss/callback/acegi/AcegiPlainTextPasswordValidationCallbackHandler.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006 the original author or authors.
2+
* Copyright 2002-2009 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,6 +49,7 @@
4949
* @see com.sun.xml.wss.impl.callback.PasswordValidationCallback.PlainTextPasswordRequest
5050
* @see org.acegisecurity.ui.basicauth.BasicProcessingFilter
5151
* @since 1.0.0
52+
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
5253
*/
5354
public class AcegiPlainTextPasswordValidationCallbackHandler extends AbstractCallbackHandler
5455
implements InitializingBean {
@@ -98,8 +99,9 @@ public boolean validate(PasswordValidationCallback.Request request)
9899
PasswordValidationCallback.PlainTextPasswordRequest plainTextRequest =
99100
(PasswordValidationCallback.PlainTextPasswordRequest) request;
100101
try {
101-
Authentication authResult = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(
102-
plainTextRequest.getUsername(), plainTextRequest.getPassword()));
102+
Authentication authResult = authenticationManager.authenticate(
103+
new UsernamePasswordAuthenticationToken(plainTextRequest.getUsername(),
104+
plainTextRequest.getPassword()));
103105
if (logger.isDebugEnabled()) {
104106
logger.debug("Authentication success: " + authResult.toString());
105107
}

security/src/main/java/org/springframework/ws/soap/security/xwss/callback/acegi/AcegiUsernamePasswordCallbackHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
*
3737
* @author Arjen Poutsma
3838
* @since 1.5.0
39+
* @deprecated As of Spring-WS 1.5, in favor of Spring Security
3940
*/
4041
public class AcegiUsernamePasswordCallbackHandler extends AbstractCallbackHandler {
4142

0 commit comments

Comments
 (0)