public class

SystemWideSaltSource

extends Object
implements InitializingBean SaltSource
java.lang.Object
   ↳ org.springframework.security.authentication.dao.SystemWideSaltSource

Class Overview

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.

Summary

Public Constructors
SystemWideSaltSource()
Public Methods
void afterPropertiesSet()
Object getSalt(UserDetails user)
Returns the salt to use for the indicated user.
String getSystemWideSalt()
void setSystemWideSalt(String systemWideSalt)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.beans.factory.InitializingBean
From interface org.springframework.security.authentication.dao.SaltSource

Public Constructors

public SystemWideSaltSource ()

Public Methods

public void afterPropertiesSet ()

Throws
Exception

public Object getSalt (UserDetails user)

Returns the salt to use for the indicated user.

Parameters
user from the AuthenticationDao
Returns
  • the salt to use for this UserDetails

public String getSystemWideSalt ()

public void setSystemWideSalt (String systemWideSalt)