I tried this. But there is a bug. don't know where. Code: Code: Post Edited by christian ranz at 03/11/09 20:53 Code:/* * To change this template, choose Tools | Templates * and open the template in the editor. */package persis.acegisecurity.userdetails.jdbc.JdbcDaoImpl;import org.acegisecurity.GrantedAuthority;public class CustomUser implements org.acegisecurity.userdetails.UserDetails { private Object userInfo; private String username; private String password; private boolean isAccountNonExpired = true; private boolean isAccountNonLocked = true; private boolean isCredentialsNonExpired = true; private boolean isEnabled; private GrantedAuthority[] grantedAuth; public CustomUser(String username, String password, boolean isEnabled, GrantedAuthority[] authorities, Object user) { this.username = username; this.password = password; this.isEnabled = isEnabled; this.grantedAuth = authorities; this.setUserInfo(user); } public CustomUser(String username, String password, boolean isEnabled, GrantedAuthority[] arrayAuths) { this.username = username; this.password = password; this.isEnabled = isEnabled; this.grantedAuth = arrayAuths; } public Object getUserInfo() { return userInfo; } public void setUserInfo(Object userInfo) { this.userInfo = userInfo; } public GrantedAuthority[] getAuthorities() { return grantedAuth; } public String getPassword() { return password; } public String getUsername() { return username; } public boolean isAccountNonExpired() { return isAccountNonExpired; } public boolean isAccountNonLocked() { return isAccountNonLocked; } public boolean isCredentialsNonExpired() { return isCredentialsNonExpired; } public boolean isEnabled() { return isEnabled; }} Post Edited by christian ranz at 03/11/09 20:53