1 19 20 package com.sslexplorer.security; 21 22 import com.sslexplorer.core.CoreServlet; 23 import com.sslexplorer.core.Database; 24 import com.sslexplorer.policyframework.Principal; 25 import com.sslexplorer.realms.Realm; 26 27 39 public interface UserDatabase extends Database { 40 41 46 public String getDatabaseDescription(); 47 48 53 public boolean isOpen(); 54 55 66 public User logon(String username, String password) throws UserDatabaseException, InvalidLoginCredentialsException, 67 AccountLockedException; 68 69 79 public boolean checkPassword(String username, String password) throws UserDatabaseException, InvalidLoginCredentialsException; 80 81 92 public void changePassword(String username, String oldPassword, String password, boolean forcePasswordChangeAtLogon) throws UserDatabaseException, 93 InvalidLoginCredentialsException; 94 95 106 public void setPassword(String username, String password, boolean forcePasswordChangeAtLogon, User adminUser, String adminPassword) throws UserDatabaseException, InvalidLoginCredentialsException; 107 108 113 public boolean supportsPasswordChange(); 114 115 120 public void logout(User user); 121 122 130 public User[] listAllUsers(String filter) throws Exception ; 131 132 138 public Principal[] listAvailablePrincipals() throws Exception ; 139 140 148 public User getAccount(String username) throws UserNotFoundException, Exception ; 149 150 157 public boolean supportsAccountCreation(); 158 159 171 public User createAccount(String username, String password, String email, String fullname, Role[] roles) throws Exception ; 172 173 184 public void updateAccount(User user, String email, String fullname, Role[] roles) throws Exception ; 185 186 194 public void deleteAccount(User user) throws Exception , UserNotFoundException; 195 196 197 204 public Role getRole(String rolename) throws Exception ; 205 206 213 public Role[] listAllRoles(String filter) throws Exception ; 214 215 222 public Role createRole(String rolename) throws Exception ; 223 224 230 public void deleteRole(String rolename) throws Exception ; 231 232 240 public User[] getUsersInRole(Role role) throws Exception ; 241 242 245 public Realm getRealm(); 246 247 252 public void open(CoreServlet controllingServlet, Realm realm) throws Exception ; 253 } | Popular Tags |