Class DefaultRoleUserDetailsServiceDecorator.DefaultRoleUserDetailsProxy
- java.lang.Object
-
- org.pentaho.platform.engine.security.DefaultRoleUserDetailsServiceDecorator.DefaultRoleUserDetailsProxy
-
- All Implemented Interfaces:
Serializable
,org.springframework.security.core.userdetails.UserDetails
- Enclosing class:
- DefaultRoleUserDetailsServiceDecorator
public static class DefaultRoleUserDetailsServiceDecorator.DefaultRoleUserDetailsProxy extends Object implements org.springframework.security.core.userdetails.UserDetails
AUserDetails
that has an extra role. The extra role is added to the end of the original role list and only if it is not already in the original role list.- Author:
- mlowery
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultRoleUserDetailsProxy(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.core.GrantedAuthority defaultRole)
DefaultRoleUserDetailsProxy(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.core.GrantedAuthority defaultRole, org.pentaho.platform.api.engine.security.IAuthenticationRoleMapper roleMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends org.springframework.security.core.GrantedAuthority>
getAuthorities()
protected Collection<? extends org.springframework.security.core.GrantedAuthority>
getNewRoles(org.springframework.security.core.GrantedAuthority defaultRole)
Since UserDetails is immutable, we can safely pre-calculate the new roles.String
getPassword()
String
getUsername()
boolean
isAccountNonExpired()
boolean
isAccountNonLocked()
boolean
isCredentialsNonExpired()
boolean
isEnabled()
-
-
-
Constructor Detail
-
DefaultRoleUserDetailsProxy
public DefaultRoleUserDetailsProxy(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.core.GrantedAuthority defaultRole)
-
DefaultRoleUserDetailsProxy
public DefaultRoleUserDetailsProxy(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.core.GrantedAuthority defaultRole, org.pentaho.platform.api.engine.security.IAuthenticationRoleMapper roleMapper)
-
-
Method Detail
-
getNewRoles
protected Collection<? extends org.springframework.security.core.GrantedAuthority> getNewRoles(org.springframework.security.core.GrantedAuthority defaultRole)
Since UserDetails is immutable, we can safely pre-calculate the new roles.
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getUsername
public String getUsername()
- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonExpired
public boolean isAccountNonExpired()
- Specified by:
isAccountNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonLocked
public boolean isAccountNonLocked()
- Specified by:
isAccountNonLocked
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()
- Specified by:
isCredentialsNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
-