Rename from xidvc to kiss4web. Cleaning classes.
This commit is contained in:
parent
d05bb8fd84
commit
d44cc0bcc2
11 changed files with 15 additions and 23 deletions
|
@ -244,7 +244,8 @@ public class SimpleServletDispatcher extends HttpServlet
|
|||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* TODO
|
||||
//
|
||||
response.setContentType ("text/html");
|
||||
PrintWriter out = response.getWriter();
|
|
@ -1,4 +1,4 @@
|
|||
package fr.devinsy.xidvc.security;
|
||||
package fr.devinsy.kiss4web.security;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
@ -8,8 +8,6 @@ import java.util.*;
|
|||
*/
|
||||
public class Group
|
||||
{
|
||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Group.class);
|
||||
|
||||
protected String name;
|
||||
protected Vector<String> members;
|
||||
|
||||
|
@ -49,6 +47,7 @@ public class Group
|
|||
return (result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -76,6 +75,7 @@ public class Group
|
|||
return (result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -84,6 +84,7 @@ public class Group
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
|
@ -1,4 +1,4 @@
|
|||
package fr.devinsy.xidvc.security;
|
||||
package fr.devinsy.kiss4web.security;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
@ -9,8 +9,6 @@ import java.util.*;
|
|||
public class Groups extends Vector<Group>
|
||||
{
|
||||
private static final long serialVersionUID = 6238581648850758903L;
|
||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Groups.class);
|
||||
|
||||
|
||||
/**
|
||||
*
|
|
@ -1,4 +1,4 @@
|
|||
package fr.devinsy.xidvc.security;
|
||||
package fr.devinsy.kiss4web.security;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
@ -9,13 +9,10 @@ import java.util.*;
|
|||
*/
|
||||
public class GroupsFileReader
|
||||
{
|
||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (GroupsFileReader.class);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static public Groups load (String fileName)
|
||||
static public Groups load (String fileName) throws Exception
|
||||
{
|
||||
Groups result;
|
||||
|
||||
|
@ -26,7 +23,7 @@ public class GroupsFileReader
|
|||
{
|
||||
properties.load (new FileInputStream(fileName));
|
||||
|
||||
Iterator iterator = properties.keySet ().iterator ();
|
||||
Iterator<Object> iterator = properties.keySet ().iterator ();
|
||||
while (iterator.hasNext ())
|
||||
{
|
||||
String key = (String) iterator.next ();
|
||||
|
@ -45,9 +42,9 @@ public class GroupsFileReader
|
|||
result.add (group);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.fatal ("can't load (" + fileName + ")");
|
||||
throw new Exception ("can't load (" + fileName + ")", exception);
|
||||
}
|
||||
|
||||
//
|
|
@ -1,4 +1,4 @@
|
|||
package fr.devinsy.xidvc.security;
|
||||
package fr.devinsy.kiss4web.security;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
@ -10,8 +10,6 @@ import java.util.*;
|
|||
*/
|
||||
public class SecurityAgent
|
||||
{
|
||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (SecurityAgent.class);
|
||||
|
||||
protected Users users;
|
||||
protected Groups groups;
|
||||
protected Groups permissions;
|
||||
|
@ -20,7 +18,7 @@ public class SecurityAgent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
public SecurityAgent (String path)
|
||||
public SecurityAgent (String path) throws Exception
|
||||
{
|
||||
this.users = UsersFileReader.load (path + "users.conf");
|
||||
this.groups = GroupsFileReader.load (path + "groups.conf");
|
||||
|
@ -78,7 +76,6 @@ public class SecurityAgent
|
|||
|
||||
if (user == null)
|
||||
{
|
||||
logger.info ("unknow login try to connect.");
|
||||
result = false;
|
||||
}
|
||||
else if (user.password ().equals (password))
|
|
@ -1,4 +1,4 @@
|
|||
package fr.devinsy.xidvc.security;
|
||||
package fr.devinsy.kiss4web.security;
|
||||
|
||||
|
||||
|
||||
|
@ -8,8 +8,6 @@ package fr.devinsy.xidvc.security;
|
|||
*/
|
||||
public class User
|
||||
{
|
||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (User.class);
|
||||
|
||||
protected String login;
|
||||
protected String password;
|
||||
protected String realName;
|
Loading…
Reference in a new issue