info.informatica.security.auth
Class SQLAuthenticationDatabase

java.lang.Object
  extended by info.informatica.security.auth.AuthenticationDatabase
      extended by info.informatica.security.auth.SQLAuthenticationDatabase
All Implemented Interfaces:
RoleDatabase

public final class SQLAuthenticationDatabase
extends AuthenticationDatabase
implements RoleDatabase

Encapsulación de base de datos de usuarios

Version:
1.01
Author:
amengual

Constructor Summary
SQLAuthenticationDatabase(Authenticator auth, CryptFactory cryptfact, AuthenticationMetaData authmd, RoleMetaData rolemd)
          Constructor con arg Properties
 
Method Summary
 void add(UserInfo user)
           
 void addRole(Role role)
          Add a role
 void addRoleToUser(Role role, LoginPrincipal user)
          Adds user to a group, creating it if does not exist.
 void close()
          Closes the database.
 void delete(LoginPrincipal name)
           
 Set<Role> getRoles(LoginPrincipal name)
          Gets a set of roles
 String getUserAttribute(LoginPrincipal name, String attribname)
           
 UserInfo getUserInfo(LoginPrincipal name)
           
 void open(Connection con)
           
 void update(UserInfo user)
           
 
Methods inherited from class info.informatica.security.auth.AuthenticationDatabase
getAuthenticator, getCryptFactory, getRoleDatabase, getSubject, setRoleDatabase
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLAuthenticationDatabase

public SQLAuthenticationDatabase(Authenticator auth,
                                 CryptFactory cryptfact,
                                 AuthenticationMetaData authmd,
                                 RoleMetaData rolemd)
                          throws AuthenticationDatabaseException
Constructor con arg Properties

Throws:
AuthenticationDatabaseException
Method Detail

open

public void open(Connection con)
          throws SQLException
Throws:
SQLException

addRole

public void addRole(Role role)
Description copied from interface: RoleDatabase
Add a role

Specified by:
addRole in interface RoleDatabase

addRoleToUser

public void addRoleToUser(Role role,
                          LoginPrincipal user)
                   throws AuthenticationDatabaseException
Description copied from interface: RoleDatabase
Adds user to a group, creating it if does not exist.

Specified by:
addRoleToUser in interface RoleDatabase
Throws:
AuthenticationDatabaseException

getRoles

public Set<Role> getRoles(LoginPrincipal name)
                   throws AuthenticationDatabaseException
Description copied from interface: RoleDatabase
Gets a set of roles

Specified by:
getRoles in interface RoleDatabase
Throws:
AuthenticationDatabaseException

add

public void add(UserInfo user)
         throws AuthenticationDatabaseException
Specified by:
add in class AuthenticationDatabase
Throws:
AuthenticationDatabaseException

update

public void update(UserInfo user)
            throws AuthenticationDatabaseException
Specified by:
update in class AuthenticationDatabase
Throws:
AuthenticationDatabaseException

delete

public void delete(LoginPrincipal name)
            throws AuthenticationDatabaseException
Specified by:
delete in class AuthenticationDatabase
Throws:
AuthenticationDatabaseException

getUserInfo

public UserInfo getUserInfo(LoginPrincipal name)
                     throws AuthenticationDatabaseException
Specified by:
getUserInfo in class AuthenticationDatabase
Throws:
AuthenticationDatabaseException

getUserAttribute

public String getUserAttribute(LoginPrincipal name,
                               String attribname)
                        throws AuthenticationDatabaseException
Throws:
AuthenticationDatabaseException

close

public void close()
           throws SQLException
Closes the database.

Throws:
SQLException