org.codehaus.groovy.grails.plugins.springsecurity
Class GrailsUserImpl
java.lang.Object
org.springframework.security.userdetails.User
org.codehaus.groovy.grails.plugins.springsecurity.GrailsUserImpl
- All Implemented Interfaces:
- Serializable, GrailsUser, org.springframework.security.userdetails.UserDetails
- Direct Known Subclasses:
- GrailsLdapUser
public class GrailsUserImpl
- extends org.springframework.security.userdetails.User
- implements GrailsUser
Extends Spring Security's User
class to set Grails Domain Class at login,
to load auth class from context.
- Author:
- T.Yamamoto, Burt Beckwith
- See Also:
- Serialized Form
Constructor Summary |
GrailsUserImpl(String username,
String password,
boolean enabled,
boolean accountNonExpired,
boolean credentialsNonExpired,
boolean accountNonLocked,
org.springframework.security.GrantedAuthority[] authorities,
Object user)
Constructor. |
Methods inherited from class org.springframework.security.userdetails.User |
equals, getAuthorities, getPassword, getUsername, hashCode, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled, setAuthorities, toString |
Methods inherited from interface org.springframework.security.userdetails.UserDetails |
getAuthorities, getPassword, getUsername, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled |
GrailsUserImpl
public GrailsUserImpl(String username,
String password,
boolean enabled,
boolean accountNonExpired,
boolean credentialsNonExpired,
boolean accountNonLocked,
org.springframework.security.GrantedAuthority[] authorities,
Object user)
throws IllegalArgumentException
- Constructor.
- Parameters:
username
- the username presented to the
DaoAuthenticationProvider
password
- the password that should be presented to the
DaoAuthenticationProvider
enabled
- set to true
if the user is enabledaccountNonExpired
- set to true
if the account has not
expiredcredentialsNonExpired
- set to true
if the credentials
have not expiredaccountNonLocked
- set to true
if the account is not
lockedauthorities
- the authorities that should be granted to the caller
if they presented the correct username and password and the user
is enableduser
- the user domain instance
- Throws:
IllegalArgumentException
- if a null
value was passed
either as a parameter or as an element in the
GrantedAuthority
[] array
getDomainClass
public Object getDomainClass()
- Get the domain object representing the user.
- Specified by:
getDomainClass
in interface GrailsUser
- Returns:
- the user
- See Also:
GrailsUser.getDomainClass()