mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-31 06:38:42 +00:00 
			
		
		
		
	Correct issue with encoding on Linux platforms.
This commit is contained in:
		
							parent
							
								
									d47a2190f7
								
							
						
					
					
						commit
						70b7e3c2bc
					
				| @ -1,4 +1,4 @@ | |||||||
| /* Copyright 2004 Acegi Technology Pty Limited | /* Copyright 2004, 2005 Acegi Technology Pty Limited | ||||||
|  * |  * | ||||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); |  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
|  * you may not use this file except in compliance with the License. |  * you may not use this file except in compliance with the License. | ||||||
| @ -15,11 +15,11 @@ | |||||||
| 
 | 
 | ||||||
| package net.sf.acegisecurity.adapters.jboss; | package net.sf.acegisecurity.adapters.jboss; | ||||||
| 
 | 
 | ||||||
|  | import net.sf.acegisecurity.AccountExpiredException; | ||||||
| import net.sf.acegisecurity.Authentication; | import net.sf.acegisecurity.Authentication; | ||||||
| import net.sf.acegisecurity.AuthenticationException; | import net.sf.acegisecurity.AuthenticationException; | ||||||
| import net.sf.acegisecurity.CredentialsExpiredException; |  | ||||||
| import net.sf.acegisecurity.AccountExpiredException; |  | ||||||
| import net.sf.acegisecurity.AuthenticationManager; | import net.sf.acegisecurity.AuthenticationManager; | ||||||
|  | import net.sf.acegisecurity.CredentialsExpiredException; | ||||||
| import net.sf.acegisecurity.adapters.PrincipalAcegiUserToken; | import net.sf.acegisecurity.adapters.PrincipalAcegiUserToken; | ||||||
| import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken; | import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken; | ||||||
| 
 | 
 | ||||||
| @ -58,7 +58,7 @@ import javax.security.auth.login.LoginException; | |||||||
|  * </p> |  * </p> | ||||||
|  * |  * | ||||||
|  * @author Ben Alex |  * @author Ben Alex | ||||||
|  * @author Sergio Berná |  * @author Sergio Bern<EFBFBD> | ||||||
|  * @version $Id$ |  * @version $Id$ | ||||||
|  */ |  */ | ||||||
| public class JbossAcegiLoginModule extends AbstractServerLoginModule { | public class JbossAcegiLoginModule extends AbstractServerLoginModule { | ||||||
| @ -212,17 +212,22 @@ public class JbossAcegiLoginModule extends AbstractServerLoginModule { | |||||||
|                 if (super.log.isDebugEnabled()) { |                 if (super.log.isDebugEnabled()) { | ||||||
|                     super.log.debug("authentication succeded"); |                     super.log.debug("authentication succeded"); | ||||||
|                 } |                 } | ||||||
|             }catch(CredentialsExpiredException cee){ |             } catch (CredentialsExpiredException cee) { | ||||||
|                 if (super.log.isDebugEnabled()) { |                 if (super.log.isDebugEnabled()) { | ||||||
|                     super.log.debug("Credential has expired"); |                     super.log.debug("Credential has expired"); | ||||||
|                 } |                 } | ||||||
|                 throw new javax.security.auth.login.CredentialExpiredException("The credential used to identify the user has expired"); | 
 | ||||||
| 			}catch(AccountExpiredException cee){ |                 throw new javax.security.auth.login.CredentialExpiredException( | ||||||
|  |                     "The credential used to identify the user has expired"); | ||||||
|  |             } catch (AccountExpiredException cee) { | ||||||
|                 if (super.log.isDebugEnabled()) { |                 if (super.log.isDebugEnabled()) { | ||||||
|                     super.log.debug("Account has expired, throwing jaas exception"); |                     super.log.debug( | ||||||
|  |                         "Account has expired, throwing jaas exception"); | ||||||
|                 } |                 } | ||||||
|                 throw new javax.security.auth.login.AccountExpiredException("The account specified in login has expired"); | 
 | ||||||
| 			}catch (AuthenticationException failed) { |                 throw new javax.security.auth.login.AccountExpiredException( | ||||||
|  |                     "The account specified in login has expired"); | ||||||
|  |             } catch (AuthenticationException failed) { | ||||||
|                 if (super.log.isDebugEnabled()) { |                 if (super.log.isDebugEnabled()) { | ||||||
|                     super.log.debug("Bad password for username=" + username); |                     super.log.debug("Bad password for username=" + username); | ||||||
|                 } |                 } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user