ch.elca.el4j.tests.services.security.provider
Class ExtendedTestingAuthenticationProvider

java.lang.Object
  extended by ch.elca.el4j.tests.services.security.provider.TestingAuthenticationProvider
      extended by ch.elca.el4j.tests.services.security.provider.ExtendedTestingAuthenticationProvider
All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider

public class ExtendedTestingAuthenticationProvider
extends TestingAuthenticationProvider

Provider for testing reasons. This class throws a BadCredentialsException in case the username is not equal to the password.

Author:
Raphael Boog (RBO)
File-location:
ExtendedTestingAuthenticationProvider
Last check-in date:
2010-01-15 12:21:07 +0100 (Fr, 15. Jan 2010) by jonasha for revision 4091

Field Summary
private  RSACipher m_cipher
           
private static int m_keyLength
          Length of the RSA key pair.
 
Constructor Summary
ExtendedTestingAuthenticationProvider()
          Default constructor in which the cipher will be initialized.
 
Method Summary
 org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
          
 String getPublicKey()
          Obtain the public key to encrypt the password to avoid passing it in clear over the network.
 
Methods inherited from class ch.elca.el4j.tests.services.security.provider.TestingAuthenticationProvider
supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_cipher

private RSACipher m_cipher

m_keyLength

private static final int m_keyLength
Length of the RSA key pair.

See Also:
Constant Field Values
Constructor Detail

ExtendedTestingAuthenticationProvider

public ExtendedTestingAuthenticationProvider()
Default constructor in which the cipher will be initialized.

Method Detail

authenticate

public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
                                                              throws org.springframework.security.core.AuthenticationException

Specified by:
authenticate in interface org.springframework.security.authentication.AuthenticationProvider
Overrides:
authenticate in class TestingAuthenticationProvider
Throws:
org.springframework.security.core.AuthenticationException

getPublicKey

public String getPublicKey()
Obtain the public key to encrypt the password to avoid passing it in clear over the network.

Returns:
The public key suitable to encrypt the password with


Copyright © 2005-2011 ELCA. All Rights Reserved.