org.persvr.security
Class DefaultSecurity

java.lang.Object
  extended by org.persvr.security.DefaultSecurity
All Implemented Interfaces:
SecurityHandler

public class DefaultSecurity
extends java.lang.Object
implements SecurityHandler

This is a default implementation of security. It is uses a standard mechanism ACLs, users, and groups to enforce security and grant access to resources for users

Author:
Kris

Constructor Summary
DefaultSecurity()
           
 
Method Summary
 User authenticate(java.lang.String username, java.lang.String password)
          This performs authentication and returns the authenticated User
 User createUser(java.lang.String username, java.lang.String password)
          Creates a new user in the system
 User getPublicUser()
          This gets the public user.
 java.security.acl.Group getSupervisorGroup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSecurity

public DefaultSecurity()
Method Detail

authenticate

public User authenticate(java.lang.String username,
                         java.lang.String password)
                  throws javax.security.auth.login.LoginException
Description copied from interface: SecurityHandler
This performs authentication and returns the authenticated User

Specified by:
authenticate in interface SecurityHandler
Returns:
Throws:
javax.security.auth.login.LoginException

getSupervisorGroup

public java.security.acl.Group getSupervisorGroup()

getPublicUser

public User getPublicUser()
Description copied from interface: SecurityHandler
This gets the public user. People that connect to the system without a login will be using this user.

Specified by:
getPublicUser in interface SecurityHandler
Returns:

createUser

public User createUser(java.lang.String username,
                       java.lang.String password)
Description copied from interface: SecurityHandler
Creates a new user in the system

Specified by:
createUser in interface SecurityHandler
Returns:
the newly created user