import org.springframework.security.GrantedAuthorityImpl;
import org.springframework.security.userdetails.User;
+/** User details wrapping a home node. */
public class JcrUserDetails extends User {
private static final long serialVersionUID = -3594542993773402380L;
private final String homePath;
this.homePath = homePath;
}
- public String getHomePath() {
- return homePath;
- }
-
+ /** Clone immutable with new roles */
public JcrUserDetails cloneWithNewRoles(List<String> roles) {
List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();
for (String role : roles) {
authorities.toArray(new GrantedAuthority[authorities.size()]));
}
+ /** Clone immutable with new password */
public JcrUserDetails cloneWithNewPassword(String password) {
return new JcrUserDetails(homePath, getUsername(), password,
isEnabled(), isAccountNonExpired(), isAccountNonExpired(),
isAccountNonLocked(), getAuthorities());
}
+
+ public String getHomePath() {
+ return homePath;
+ }
+
}
Bundle-SymbolicName: org.argeo.server.catalina
Import-Package: org.apache.commons.logging.impl;resolution:=optional,
org.argeo.security.core;resolution:=optional,
- org.argeo.security.nature;resolution:=optional,
+ org.argeo.security.jcr;resolution:=optional,
org.springframework.beans.factory.support;resolution:=optional,
org.springframework.context.annotation;resolution:=optional,
org.springframework.orm.jpa.support;resolution:=optional,