Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.providers.dao.salt
Class SystemWideSaltSource  view SystemWideSaltSource download SystemWideSaltSource.java

java.lang.Object
  extended byorg.acegisecurity.providers.dao.salt.SystemWideSaltSource
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.acegisecurity.providers.dao.SaltSource

public class SystemWideSaltSource
extends java.lang.Object
implements org.acegisecurity.providers.dao.SaltSource, org.springframework.beans.factory.InitializingBean

Uses a static system-wide String as the salt.

Does not supply a different salt for each User. This means users sharing the same password will still have the same digested password. Of benefit is the digested passwords will at least be more protected than if stored without any salt.

Version:
$Id: SystemWideSaltSource.java,v 1.6 2005/11/29 13:10:12 benalex Exp $

Field Summary
private  java.lang.String systemWideSalt
           
 
Constructor Summary
SystemWideSaltSource()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 java.lang.Object getSalt(org.acegisecurity.userdetails.UserDetails user)
          Returns the salt to use for the indicated user.
 java.lang.String getSystemWideSalt()
           
 void setSystemWideSalt(java.lang.String systemWideSalt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemWideSalt

private java.lang.String systemWideSalt
Constructor Detail

SystemWideSaltSource

public SystemWideSaltSource()
Method Detail

getSalt

public java.lang.Object getSalt(org.acegisecurity.userdetails.UserDetails user)
Description copied from interface: org.acegisecurity.providers.dao.SaltSource
Returns the salt to use for the indicated user.

Specified by:
getSalt in interface org.acegisecurity.providers.dao.SaltSource

setSystemWideSalt

public void setSystemWideSalt(java.lang.String systemWideSalt)

getSystemWideSalt

public java.lang.String getSystemWideSalt()

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Description copied from interface: org.springframework.beans.factory.InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean