|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jguard.ext.authentication.manager.AbstractAuthenticationManager
net.sf.jguard.ext.authentication.manager.XmlAuthenticationManager
public class XmlAuthenticationManager
AuthenticationManager implementation which persists in an XML repository file.
| Field Summary | |
|---|---|
static java.lang.String |
AUTHENTICATION
|
| Fields inherited from class net.sf.jguard.ext.authentication.manager.AbstractAuthenticationManager |
|---|
applicationName, debug, defaultOrganization, localPrincipals, localPrincipalsSet, organizations, organizationTemplate |
| Constructor Summary | |
|---|---|
XmlAuthenticationManager(java.util.Map options)
initialise the DAO by reading the XML file, and converting it in objects. |
|
| Method Summary | |
|---|---|
void |
deleteOrganization(net.sf.jguard.core.organization.Organization organisation)
|
boolean |
deletePrincipal(java.security.Principal principal)
|
void |
deleteUser(javax.security.auth.Subject user)
remove the user from the XML repository. |
void |
exportAsXMLFile(java.lang.String fileName)
|
java.lang.String |
exportAsXMLString()
|
net.sf.jguard.core.organization.Organization |
findOrganization(java.lang.String organizationId)
|
java.util.Collection |
findOrganizations(java.util.Collection credentials)
|
java.util.Set |
findUsers(java.util.Collection privateCredentials,
java.util.Collection publicCredentials)
search the users which matches credentials criterions. |
java.util.Set |
getAllPrincipalsSet()
|
java.util.Set |
getOrganizations()
|
net.sf.jguard.core.provisioning.SubjectTemplate |
getSubjectTemplate(org.dom4j.Element organizationNode)
construct from configuration file the subjectTemplate. |
java.util.Set |
getUsers()
|
boolean |
isEmpty()
|
protected void |
persistOrganization(net.sf.jguard.core.organization.Organization organization)
persist role in the datasource backend. |
protected void |
persistPrincipal(java.security.Principal principal)
persist principal in the XML repository. |
void |
persistSubjectTemplate(org.dom4j.Element organizationElement,
net.sf.jguard.core.provisioning.SubjectTemplate template)
define and persist the SubjectTemplate for registration. |
protected void |
persistUser(javax.security.auth.Subject user)
persist user into the XML repository file. |
void |
persistUserLoginAttempt(java.lang.String login,
java.lang.String hostAddress,
java.lang.String hostName,
boolean succeeded,
long timeStamp)
|
void |
persistUserLogoutAttempt(java.lang.String login,
java.lang.String hostAddress,
java.lang.String hostName,
long timeStamp)
|
void |
setOrganizationTemplate(net.sf.jguard.core.provisioning.OrganizationTemplate organizationTemplate)
|
void |
updateOrganization(java.lang.String organizationId,
net.sf.jguard.core.organization.Organization organization)
|
void |
updatePrincipal(java.lang.String oldPrincipalName,
java.security.Principal principal)
|
protected void |
updateUserImpl(net.sf.jguard.core.authentication.credentials.JGuardCredential identityCred,
javax.security.auth.Subject user)
update user's informations in the XML repository file. |
void |
writeAsHTML(java.io.OutputStream outputStream)
|
void |
writeAsXML(java.io.OutputStream outputStream,
java.lang.String encodingScheme)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.jguard.core.authentication.manager.AuthenticationManager |
|---|
clonePrincipal, clonePrincipal, createOrganization, createPrincipal, createUser, createUser, findUser, getApplicationName, getCredentialId, getCredentialPassword, getDefaultOrganization, getLocalPrincipal, getLocalPrincipals, getOrganizationTemplate, hasPrincipal, hasPrincipal, importAuthenticationManager, setActiveOnRolePrincipal, updateRoleDefinition, updateUser, userAlreadyExists |
| Field Detail |
|---|
public static final java.lang.String AUTHENTICATION
| Constructor Detail |
|---|
public XmlAuthenticationManager(java.util.Map options)
net.sf.jguard.core.authentication.manager.AuthenticationManager#init(java.util.Map)| Method Detail |
|---|
protected void persistPrincipal(java.security.Principal principal)
throws net.sf.jguard.core.authentication.AuthenticationException
persistPrincipal in class AbstractAuthenticationManagerprincipal - to persist
net.sf.jguard.core.authentication.AuthenticationExceptionnet.sf.jguard.core.authentication.manager.AuthenticationManager#createPrincipal(net.sf.jguard.core.principals.RolePrincipal)
protected void updateUserImpl(net.sf.jguard.core.authentication.credentials.JGuardCredential identityCred,
javax.security.auth.Subject user)
throws net.sf.jguard.core.authentication.AuthenticationException
updateUserImpl in class AbstractAuthenticationManagernet.sf.jguard.core.authentication.AuthenticationExceptionAuthenticationManager.updateUser(JGuardCredential, javax.security.auth.Subject)
public void deleteUser(javax.security.auth.Subject user)
throws net.sf.jguard.core.authentication.AuthenticationException
deleteUser in interface net.sf.jguard.core.authentication.manager.AuthenticationManageruser - to remove
net.sf.jguard.core.authentication.AuthenticationExceptionAuthenticationManager.deleteUser(javax.security.auth.Subject)public net.sf.jguard.core.provisioning.SubjectTemplate getSubjectTemplate(org.dom4j.Element organizationNode)
net.sf.jguard.core.authentication.AuthenticationException
protected void persistUser(javax.security.auth.Subject user)
throws net.sf.jguard.core.authentication.AuthenticationException
persistUser in class AbstractAuthenticationManageruser -
net.sf.jguard.core.authentication.AuthenticationException
public void persistSubjectTemplate(org.dom4j.Element organizationElement,
net.sf.jguard.core.provisioning.SubjectTemplate template)
template - public boolean isEmpty()
isEmpty in interface net.sf.jguard.core.authentication.manager.AuthenticationManagerpublic java.util.Set getAllPrincipalsSet()
getAllPrincipalsSet in interface net.sf.jguard.core.authentication.manager.AuthenticationManager
public java.util.Set findUsers(java.util.Collection privateCredentials,
java.util.Collection publicCredentials)
findUsers in interface net.sf.jguard.core.authentication.manager.AuthenticationManagerfindUsers in class AbstractAuthenticationManagercredentials - crierions used to grab the users
public java.util.Set getUsers()
getUsers in interface net.sf.jguard.core.authentication.manager.AuthenticationManagergetUsers in class AbstractAuthenticationManager
public void updatePrincipal(java.lang.String oldPrincipalName,
java.security.Principal principal)
updatePrincipal in interface net.sf.jguard.core.authentication.manager.AuthenticationManager
public boolean deletePrincipal(java.security.Principal principal)
throws net.sf.jguard.core.authentication.AuthenticationException
deletePrincipal in interface net.sf.jguard.core.authentication.manager.AuthenticationManagernet.sf.jguard.core.authentication.AuthenticationExceptionpublic java.lang.String exportAsXMLString()
public void writeAsXML(java.io.OutputStream outputStream,
java.lang.String encodingScheme)
throws java.io.IOException
java.io.IOException
public void writeAsHTML(java.io.OutputStream outputStream)
throws java.io.IOException
java.io.IOException
public void exportAsXMLFile(java.lang.String fileName)
throws java.io.IOException
java.io.IOException
public void persistUserLoginAttempt(java.lang.String login,
java.lang.String hostAddress,
java.lang.String hostName,
boolean succeeded,
long timeStamp)
throws net.sf.jguard.core.authentication.AuthenticationException
persistUserLoginAttempt in interface net.sf.jguard.core.authentication.manager.AuthenticationManagernet.sf.jguard.core.authentication.AuthenticationException
public void persistUserLogoutAttempt(java.lang.String login,
java.lang.String hostAddress,
java.lang.String hostName,
long timeStamp)
throws net.sf.jguard.core.authentication.AuthenticationException
persistUserLogoutAttempt in interface net.sf.jguard.core.authentication.manager.AuthenticationManagernet.sf.jguard.core.authentication.AuthenticationExceptionpublic void deleteOrganization(net.sf.jguard.core.organization.Organization organisation)
deleteOrganization in interface net.sf.jguard.core.authentication.manager.AuthenticationManager
public void updateOrganization(java.lang.String organizationId,
net.sf.jguard.core.organization.Organization organization)
throws net.sf.jguard.core.authentication.AuthenticationException
updateOrganization in interface net.sf.jguard.core.authentication.manager.AuthenticationManagernet.sf.jguard.core.authentication.AuthenticationExceptionpublic net.sf.jguard.core.organization.Organization findOrganization(java.lang.String organizationId)
findOrganization in interface net.sf.jguard.core.authentication.manager.AuthenticationManager
protected void persistOrganization(net.sf.jguard.core.organization.Organization organization)
throws net.sf.jguard.core.authentication.AuthenticationException
AbstractAuthenticationManager
persistOrganization in class AbstractAuthenticationManagernet.sf.jguard.core.authentication.AuthenticationException
public java.util.Set getOrganizations()
throws net.sf.jguard.core.authentication.AuthenticationException
getOrganizations in interface net.sf.jguard.core.authentication.manager.AuthenticationManagernet.sf.jguard.core.authentication.AuthenticationException
public java.util.Collection findOrganizations(java.util.Collection credentials)
throws net.sf.jguard.core.authentication.AuthenticationException
net.sf.jguard.core.authentication.AuthenticationException
public void setOrganizationTemplate(net.sf.jguard.core.provisioning.OrganizationTemplate organizationTemplate)
throws net.sf.jguard.core.authentication.AuthenticationException
setOrganizationTemplate in interface net.sf.jguard.core.authentication.manager.AuthenticationManagersetOrganizationTemplate in class AbstractAuthenticationManagernet.sf.jguard.core.authentication.AuthenticationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||