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
|
@ -245,6 +245,7 @@ public class SimpleServletDispatcher extends HttpServlet
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
* TODO
|
||||||
//
|
//
|
||||||
response.setContentType ("text/html");
|
response.setContentType ("text/html");
|
||||||
PrintWriter out = response.getWriter();
|
PrintWriter out = response.getWriter();
|
|
@ -1,4 +1,4 @@
|
||||||
package fr.devinsy.xidvc.security;
|
package fr.devinsy.kiss4web.security;
|
||||||
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -8,8 +8,6 @@ import java.util.*;
|
||||||
*/
|
*/
|
||||||
public class Group
|
public class Group
|
||||||
{
|
{
|
||||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Group.class);
|
|
||||||
|
|
||||||
protected String name;
|
protected String name;
|
||||||
protected Vector<String> members;
|
protected Vector<String> members;
|
||||||
|
|
||||||
|
@ -49,6 +47,7 @@ public class Group
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -76,6 +75,7 @@ public class Group
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -84,6 +84,7 @@ public class Group
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
|
@ -1,4 +1,4 @@
|
||||||
package fr.devinsy.xidvc.security;
|
package fr.devinsy.kiss4web.security;
|
||||||
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -9,8 +9,6 @@ import java.util.*;
|
||||||
public class Groups extends Vector<Group>
|
public class Groups extends Vector<Group>
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 6238581648850758903L;
|
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.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -9,13 +9,10 @@ import java.util.*;
|
||||||
*/
|
*/
|
||||||
public class GroupsFileReader
|
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;
|
Groups result;
|
||||||
|
|
||||||
|
@ -26,7 +23,7 @@ public class GroupsFileReader
|
||||||
{
|
{
|
||||||
properties.load (new FileInputStream(fileName));
|
properties.load (new FileInputStream(fileName));
|
||||||
|
|
||||||
Iterator iterator = properties.keySet ().iterator ();
|
Iterator<Object> iterator = properties.keySet ().iterator ();
|
||||||
while (iterator.hasNext ())
|
while (iterator.hasNext ())
|
||||||
{
|
{
|
||||||
String key = (String) iterator.next ();
|
String key = (String) iterator.next ();
|
||||||
|
@ -45,9 +42,9 @@ public class GroupsFileReader
|
||||||
result.add (group);
|
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.*;
|
import java.util.*;
|
||||||
|
@ -10,8 +10,6 @@ import java.util.*;
|
||||||
*/
|
*/
|
||||||
public class SecurityAgent
|
public class SecurityAgent
|
||||||
{
|
{
|
||||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (SecurityAgent.class);
|
|
||||||
|
|
||||||
protected Users users;
|
protected Users users;
|
||||||
protected Groups groups;
|
protected Groups groups;
|
||||||
protected Groups permissions;
|
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.users = UsersFileReader.load (path + "users.conf");
|
||||||
this.groups = GroupsFileReader.load (path + "groups.conf");
|
this.groups = GroupsFileReader.load (path + "groups.conf");
|
||||||
|
@ -78,7 +76,6 @@ public class SecurityAgent
|
||||||
|
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
logger.info ("unknow login try to connect.");
|
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
else if (user.password ().equals (password))
|
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
|
public class User
|
||||||
{
|
{
|
||||||
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (User.class);
|
|
||||||
|
|
||||||
protected String login;
|
protected String login;
|
||||||
protected String password;
|
protected String password;
|
||||||
protected String realName;
|
protected String realName;
|
Loading…
Reference in a new issue