com.tivoli.pd.jazn
Class PDAuthorizationContext

java.lang.Object
  extended by com.tivoli.pd.jutil.PDBasicContext
      extended by com.tivoli.pd.jutil.PDContext
          extended by com.tivoli.pd.jazn.PDAuthorizationContext
All Implemented Interfaces:
com.tivoli.pd.jutil.IPDBasicContext, java.io.Serializable

public class PDAuthorizationContext
extends PDContext

This class encapsulates the locally cached information needed to provide Security Access Manager authentication and authorization services. It extends the PDContext class which provides information necessary to establish a communication session between the client application and the Security Access Manager policy server.

Modes: Local,Remote

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.tivoli.pd.jutil.PDContext
PDAUTHTYPE_CERT, PDAUTHTYPE_ID
 
Fields inherited from class com.tivoli.pd.jutil.PDBasicContext
defaultCtxt
 
Constructor Summary
PDAuthorizationContext(java.util.Locale locale, java.lang.String userid, char[] password, java.lang.String domain, java.net.URL configURL)
          Constructs a PDAuthorizationContext based on a userid-password authentication to the specified domain and configuration information, other than domain, contained in the input configuration URL.
PDAuthorizationContext(java.util.Locale locale, java.lang.String userid, char[] password, java.net.URL configURL)
          Constructs a PDAuthorizationContext based on a userid-password authentication and configuration information, including the domain, contained in the input configuration URL.
PDAuthorizationContext(java.util.Locale locale, java.net.URL configURL)
          Constructs a PDAuthorizationContext based on a certificate authentication and configuration information, including the domain, contained in the input configuration URL.
PDAuthorizationContext(java.lang.String userid, char[] password, java.lang.String domain, java.net.URL configURL)
          Constructs a PDAuthorizationContext based on a userid-password authentication to the specified domain and configuration information, other than domain, contained in the input configuration URL.
PDAuthorizationContext(java.lang.String userid, char[] password, java.net.URL configURL)
          Constructs a PDAuthorizationContext based on a userid-password authentication and configuration information, including the domain, contained in the input configuration URL.
PDAuthorizationContext(java.net.URL configURL)
          Constructs a PDAuthorizationContext based on a certificate authentication and configuration information, including the domain, contained in the input configuration URL.
 
Method Summary
 void close()
          Close this context.
 java.lang.String getMode()
          Return the mode this application is configured for.
 
Methods inherited from class com.tivoli.pd.jutil.PDContext
clearDelegatedCred, domainIsManagement, equals, getAuthType, getDomainid, getLocale, getUserid, hasDelegatedCred, hashCode, pre96701, setDelegatedCred, setServer, toString
 
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
 

Constructor Detail

PDAuthorizationContext

public PDAuthorizationContext(java.util.Locale locale,
                              java.lang.String userid,
                              char[] password,
                              java.net.URL configURL)
                       throws PDException
Constructs a PDAuthorizationContext based on a userid-password authentication and configuration information, including the domain, contained in the input configuration URL. If the configuration URL does not specify a domain, the JRE's Local Domain is used. Message data returned from operations using this context will be translated into the input locale.

Only one instance of a PDAuthorizationContext created from a given configuration URL can be active at a time. Before creating a second PDAuthorizationContext from the same configuration URL, you must close the first PDAuthorizationContext.

Parameters:
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.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAuthorizationContext

public PDAuthorizationContext(java.util.Locale locale,
                              java.lang.String userid,
                              char[] password,
                              java.lang.String domain,
                              java.net.URL configURL)
                       throws PDException
Constructs a PDAuthorizationContext based on a userid-password authentication to the specified domain and configuration information, other than domain, contained in the input configuration URL. Message data returned from operations using this context will be translated into the input locale.

Only one instance of a PDAuthorizationContext created from a given configuration URL can be active at a time. Before creating a second PDAuthorizationContext from the same configuration URL, you must close the first PDAuthorizationContext.

Parameters:
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. This parameter must match the domain that was configured using SrvSslCfg or PDAppSvrConfig.
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.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAuthorizationContext

public PDAuthorizationContext(java.lang.String userid,
                              char[] password,
                              java.net.URL configURL)
                       throws PDException
Constructs a PDAuthorizationContext based on a userid-password authentication and configuration information, including the domain, contained in the input configuration URL. If the configuration URL does not specify a domain, the JRE's Local Domain is used. Message data returned from operations using this context will be translated into the default locale.

Only one instance of a PDAuthorizationContext created from a given configuration URL can be active at a time. Before creating a second PDAuthorizationContext from the same configuration URL, you must close the first PDAuthorizationContext.

Parameters:
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.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAuthorizationContext

public PDAuthorizationContext(java.lang.String userid,
                              char[] password,
                              java.lang.String domain,
                              java.net.URL configURL)
                       throws PDException
Constructs a PDAuthorizationContext based on a userid-password authentication to the specified domain and configuration information, other than domain, contained in the input configuration URL. Message data returned from operations using this context will be translated into the default locale.

Only one instance of a PDAuthorizationContext created from a given configuration URL can be active at a time. Before creating a second PDAuthorizationContext from the same configuration URL, you must close the first PDAuthorizationContext.

Parameters:
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. This parameter must match the domain that was configured using SrvSslCfg or PDAppSvrConfig.
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.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAuthorizationContext

public PDAuthorizationContext(java.util.Locale locale,
                              java.net.URL configURL)
                       throws PDException
Constructs a PDAuthorizationContext based on a certificate authentication and configuration information, including the domain, contained in the input configuration URL. Message data returned from operations using this context will be translated into the input locale.

Only one instance of a PDAuthorizationContext created from a given configuration URL can be active at a time. Before creating a second PDAuthorizationContext from the same configuration URL, you must close the first PDAuthorizationContext.

Parameters:
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.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAuthorizationContext

public PDAuthorizationContext(java.net.URL configURL)
                       throws PDException
Constructs a PDAuthorizationContext based on a certificate authentication and configuration information, including the domain, contained in the input configuration URL. Message data returned from operations using this context will be translated into the default locale.

Only one instance of a PDAuthorizationContext created from a given configuration URL can be active at a time. Before creating a second PDAuthorizationContext from the same configuration URL, you must close the first PDAuthorizationContext.

Parameters:
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.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.
Method Detail

getMode

public java.lang.String getMode()
Return the mode this application is configured for.

Returns:
local or remote

close

public void close()
           throws PDException
Close this context.

A context should always be closed when it is no longer needed. This will release any runtime data associated with this context.

Overrides:
close in class PDContext
Throws:
PDException - on errors. This exception may contain error and message codes defined in the product Error Message Reference document.