Testing security impl

This commit is contained in:
Admin
2017-03-30 15:55:36 -05:00
parent ba621fcb85
commit cd5417c2e0
28 changed files with 274 additions and 116 deletions

View File

@@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
public class BridgeSecurity {
public class BridgeSecurity extends AuthFramework {
private static final Logger log = LoggerFactory.getLogger(BridgeSecurity.class);
private char[] habridgeKey;
private static final byte[] SALT = {
@@ -105,6 +105,24 @@ public class BridgeSecurity {
return error;
}
public String delUser(User aUser) throws IOException {
String error = null;
if(aUser != null) {
if(securityDescriptor.getUsers() != null) {
if(securityDescriptor.getUsers().get(aUser.getUsername()) != null) {
securityDescriptor.getUsers().remove(aUser.getUsername());
settingsChanged = true;
}
else
error = "User not found";
}
}
else
error = "invalid user object given";
return error;
}
public void setExecGarden(String theGarden) {
securityDescriptor.setExecGarden(theGarden);
settingsChanged = true;