|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.pd.jutil.PDBasicContext
com.tivoli.pd.jutil.PDContext
public class PDContext
This class encapsulates the information needed to establish a communication session between the client application and the Security Access Manager policy server. It includes the client authentication, the client locale used to translate any returned messages and the policy server location.
Modes: Local,Remote
Field Summary | |
---|---|
static int |
PDAUTHTYPE_CERT
Indicates a PDContext authenticated with a certficate. |
static int |
PDAUTHTYPE_ID
Indicates a PDContext authenticated with a user id and password. |
Fields inherited from class com.tivoli.pd.jutil.PDBasicContext |
---|
defaultCtxt |
Constructor Summary | |
---|---|
PDContext(java.util.Locale locale,
java.lang.String userid,
char[] password,
java.lang.String domain,
java.net.URL configURL)
Constructs a PDContext based on a userid-password authentication to the specified domain and configuration information, other than domain, contained in the input configuration URL. |
|
PDContext(java.util.Locale locale,
java.lang.String userid,
char[] password,
java.lang.String domain,
java.net.URL configURL,
boolean usecert)
Constructs a PDContext based on a userid-password authentication to the specified domain and configuration information, other than domain, contained in the input configuration URL. |
|
PDContext(java.util.Locale locale,
java.lang.String userid,
char[] password,
java.net.URL configURL)
Constructs a PDContext based on a userid-password authentication and configuration information, including the domain, contained in the input configuration URL. |
|
PDContext(java.util.Locale locale,
java.lang.String userid,
char[] password,
java.net.URL configURL,
boolean usecert)
Constructs a PDContext based on a userid-password authentication and configuration information, including the domain, contained in the input configuration URL. |
|
PDContext(java.util.Locale locale,
java.net.URL configURL)
Constructs a PDContext based on a certificate authentication and configuration information, including the domain, contained in the input configuration URL. |
|
PDContext(com.tivoli.pd.jutil.PDConfig pdconfig,
com.tivoli.pd.jutil.PDSslServices pdss)
Constructs a PDContext using certificate authentication, based on existing PDConfig configuration and PDSslServices. |
|
PDContext(java.lang.String userid,
char[] password,
java.lang.String domain,
java.net.URL configURL)
Constructs a PDContext based on a userid-password authentication to the specified domain and configuration information, other than domain, contained in the input configuration URL. |
|
PDContext(java.lang.String userid,
char[] password,
java.net.URL configURL)
Constructs a PDContext based on a userid-password authentication and configuration information, including the domain, contained in the input configuration URL. |
|
PDContext(java.net.URL configURL)
Constructs a PDContext based on a certificate authentication and configuration information, including the domain, contained in the input configuration URL. |
Method Summary | |
---|---|
void |
clearDelegatedCred()
Clears any delegated credential that might be associated with this context. |
void |
close()
Closes this context. |
boolean |
domainIsManagement()
Indicates whether or not this context is authenticated to the Management Domain. |
boolean |
equals(java.lang.Object obj)
Determines whether this PDContext is equivalent to the input object. |
int |
getAuthType()
Returns the authentication type used in this context. |
java.lang.String |
getDomainid()
Returns name of the domain to which this context is authenticated. |
java.util.Locale |
getLocale()
Returns the locale that any return messages or error text will be translated into. |
java.lang.String |
getUserid()
Returns the user whose authentication was used to establish this context. |
boolean |
hasDelegatedCred()
Returns whether or not delegated credential is associated with this context. |
int |
hashCode()
|
boolean |
pre96701()
|
void |
setDelegatedCred(byte[] creds,
boolean base64)
Associates a delegated credential with this context. |
void |
setServer(com.tivoli.pd.jts.MtsServer server)
|
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class com.tivoli.pd.jutil.PDBasicContext |
---|
getMessageLogger, getProperties, getTraceLogger, getValue |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PDAUTHTYPE_ID
public static final int PDAUTHTYPE_CERT
Constructor Detail |
---|
public PDContext(java.util.Locale locale, java.lang.String userid, char[] password, java.net.URL configURL) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission
and permission to read the configuration URL.
locale
- locale for any data that is returned.userid
- id of the user to be authenticated as.password
- password of the user to be authenticated as.configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(java.util.Locale locale, java.lang.String userid, char[] password, java.net.URL configURL, boolean usecert) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission
and permission to read the configuration URL.
locale
- locale for any data that is returned.userid
- id of the user to be authenticated as.password
- password of the user to be authenticated as.configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.usecert
- if usecert is false, info related to cert will not be
included
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(java.util.Locale locale, java.lang.String userid, char[] password, java.lang.String domain, java.net.URL configURL) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission
and permission to read the configuration URL.
locale
- locale for any data that is returned.userid
- id of the user to be authenticated as.password
- password of the user to be authenticated as.domain
- the domain to which the user will be authenticated.configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(java.util.Locale locale, java.lang.String userid, char[] password, java.lang.String domain, java.net.URL configURL, boolean usecert) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission
and permission to read the configuration URL.
locale
- locale for any data that is returned.userid
- id of the user to be authenticated as.password
- password of the user to be authenticated as.domain
- the domain to which the user will be authenticated.configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.usecert
- if usecert is false, info related to the cert will not be
included
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(java.lang.String userid, char[] password, java.net.URL configURL) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission
and permission to read the configuration URL.
userid
- id of the user to be authenticated as.password
- password of the user to be authenticated as.configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(java.lang.String userid, char[] password, java.lang.String domain, java.net.URL configURL) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission
and permission to read the configuration URL.
userid
- id of the user to be authenticated as.password
- password of the user to be authenticated as.domain
- the domain to which the user will be authenticated.configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(java.util.Locale locale, java.net.URL configURL) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission.
locale
- locale for any data that is returned.configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(com.tivoli.pd.jutil.PDConfig pdconfig, com.tivoli.pd.jutil.PDSslServices pdss) throws PDException
pdconfig
- existing PDConfig object.pdss
- existing PDSslServices object.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDContext(java.net.URL configURL) throws PDException
This method requires the
javax.security.auth.AuthPermission("PDAdmin")
permission
and permission to read the configuration URL.
configURL
- a URL reference to configuration data. The caller must
have permission to access and read this URL. This URL is the same as the
one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration
program. Currently, the only protocol supported is the "file" protocol;
this restriction may be removed in a future release.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.Method Detail |
---|
public java.util.Locale getLocale()
getLocale
in class PDBasicContext
public java.lang.String getUserid()
public boolean hasDelegatedCred()
public void setDelegatedCred(byte[] creds, boolean base64) throws PDException
g
(delegate)
permission on the /Management/Proxy
object in order to
use delegated credentials. By default, the
/Management/Proxy
object is protected by the
default-management-proxy
access control list.
If a delegated credential is already associated with this context, the existing credential is overwritten.
creds
- the delegated credentials. May not be null or empty. To
clear existing delegated credentials use
clearDelegatedCred
.base64
- true, if the input creds are BASE64 encoded; false,
otherwise.
PDException
- on input argument errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public void clearDelegatedCred() throws PDException
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public int getAuthType()
PDAUTHTYPE_ID
if this context has been
authenticated with a userid and password or
PDAUTHTYPE_CERT
if this context has been
authenticated with a certificate.public java.lang.String getDomainid()
public boolean domainIsManagement() throws PDException
PDException
- on input argument errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public void close() throws PDException
A context should always be closed when it is no longer needed. This will release any runtime data associated with this context.
close
in class PDBasicContext
PDException
- on errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void setServer(com.tivoli.pd.jts.MtsServer server)
public boolean pre96701()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |