Package org.jboss.security.client
Class SecurityClient
- java.lang.Object
-
- org.jboss.security.client.SecurityClient
-
- Direct Known Subclasses:
JBossSecurityClient
public abstract class SecurityClient extends Object
Generic Security Client class
Basic Users:
Basic users will just use the methods that set the username and credential
- Since:
- May 1, 2007
- Version:
- $Revision$
- Author:
- Anil.Saldhana@redhat.com
-
-
Field Summary
Fields Modifier and Type Field Description protected CallbackHandler
callbackHandler
protected Object
credential
protected boolean
jaasDesired
protected String
loginConfigName
protected String
saslAuthorizationId
protected boolean
saslDesired
protected String
saslMechanism
protected Object
userPrincipal
protected boolean
vmwideAssociation
Perform a VMWide association of security context
-
Constructor Summary
Constructors Constructor Description SecurityClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
cleanUp()
Provide an opportunity for client implementations to clean upboolean
isVmwideAssociation()
Is the Security Context establishment vm wide?void
login()
Login with the desired methodvoid
logout()
Log Outprotected abstract void
peformSASLLogin()
protected abstract void
performJAASLogin()
protected abstract void
performSimpleLogin()
void
setJAAS(String configName, CallbackHandler cbh)
Set the JAAS Login Configuration Name and Call back handlervoid
setSASL(String mechanism, String authorizationId, CallbackHandler cbh)
Set the mechanism and other parameters for SASL Clientvoid
setSimple(Object username, Object credential)
Set the user name and credential for simple login (non-jaas, non-sasl)void
setVmwideAssociation(boolean vmwideAssociation)
Set the vm wide association of security context (Default : false)s
-
-
-
Field Detail
-
userPrincipal
protected Object userPrincipal
-
credential
protected Object credential
-
callbackHandler
protected CallbackHandler callbackHandler
-
loginConfigName
protected String loginConfigName
-
saslMechanism
protected String saslMechanism
-
saslAuthorizationId
protected String saslAuthorizationId
-
jaasDesired
protected boolean jaasDesired
-
saslDesired
protected boolean saslDesired
-
vmwideAssociation
protected boolean vmwideAssociation
Perform a VMWide association of security context
-
-
Method Detail
-
login
public void login() throws LoginException
Login with the desired method- Throws:
LoginException
-
logout
public void logout()
Log Out
-
setSimple
public void setSimple(Object username, Object credential)
Set the user name and credential for simple login (non-jaas, non-sasl)- Parameters:
username
- (Can be null)credential
- (Can be null)
-
setJAAS
public void setJAAS(String configName, CallbackHandler cbh)
Set the JAAS Login Configuration Name and Call back handler- Parameters:
configName
- can be nullcbh
- can be null
-
setSASL
public void setSASL(String mechanism, String authorizationId, CallbackHandler cbh)
Set the mechanism and other parameters for SASL Client- Parameters:
mechanism
-authorizationId
-cbh
-
-
performJAASLogin
protected abstract void performJAASLogin() throws LoginException
- Throws:
LoginException
-
peformSASLLogin
protected abstract void peformSASLLogin()
-
performSimpleLogin
protected abstract void performSimpleLogin()
-
isVmwideAssociation
public boolean isVmwideAssociation()
Is the Security Context establishment vm wide?- Returns:
-
setVmwideAssociation
public void setVmwideAssociation(boolean vmwideAssociation)
Set the vm wide association of security context (Default : false)s- Parameters:
vmwideAssociation
-
-
cleanUp
protected abstract void cleanUp()
Provide an opportunity for client implementations to clean up
-
-