com.tivoli.pd.jazn.demo
Class PDJaasDemo

java.lang.Object
  extended bycom.tivoli.pd.jazn.demo.PDJaasDemo

public final class PDJaasDemo
extends java.lang.Object

IBM Tivoli Access Manager for e-business PDJaasDemo class.

This class demonstrates the use of the Java Authentication and Authorization Service related to Access Manager classes.

To use the demo you must have a configuration file. This file is the same as the one specified to the com.tivoli.pd.jcfg.SvrSslCfg configuration program.

The demo will create a PDAuthorizationContext using the configuraton file. The PDAuthorizationContext represents the connection to the Access Manager secure domain and the servers therein. A PDLoginModule is then created. The PDAuthorizationContext is set as default authorization context for the PDLoginModule.

The demo will then repeatedly prompt for whether or not a password is required. The answer to the prompt determines the type of login context the demo is to use. A LoginContext is then created with the correct login context type and a PDCallbackHandler. The login function of the LoginContext is called. The PDCallbackHandler, based on login context type, will request the user id and optionally the password. After a successful login, the demo requests the resource and actions to test for the logged in Subject. Each test will result in a true or false result which indicates the user's authorization to perform the specified actions on the specified resource.

You may quit the demo by specifying "quit" at any of the prompts except the user id and password prompts since these prompts are within the PDCallbackHandler.


Field Summary
static java.lang.String actionsDefault
           
static java.lang.String actionsPrompt
           
static java.lang.String configFilePrompt
           
static java.lang.String exitString
           
static java.lang.String pwdReqdDefault
           
static java.lang.String pwdReqdPrompt
           
static java.lang.String resourceDefault
           
static java.lang.String resourcePrompt
           
 
Constructor Summary
PDJaasDemo(java.lang.String[] argv)
          Constructs a PDJaasDemo object.
 
Method Summary
 boolean exit()
          Returns a boolean to indicate the demo should exit.
static void main(java.lang.String[] argv)
          Main program.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exitString

public static final java.lang.String exitString
See Also:
Constant Field Values

configFilePrompt

public static final java.lang.String configFilePrompt
See Also:
Constant Field Values

pwdReqdPrompt

public static final java.lang.String pwdReqdPrompt
See Also:
Constant Field Values

pwdReqdDefault

public static final java.lang.String pwdReqdDefault
See Also:
Constant Field Values

resourcePrompt

public static final java.lang.String resourcePrompt
See Also:
Constant Field Values

resourceDefault

public static final java.lang.String resourceDefault
See Also:
Constant Field Values

actionsPrompt

public static final java.lang.String actionsPrompt
See Also:
Constant Field Values

actionsDefault

public static final java.lang.String actionsDefault
See Also:
Constant Field Values
Constructor Detail

PDJaasDemo

public PDJaasDemo(java.lang.String[] argv)
Constructs a PDJaasDemo object.

Method Detail

exit

public boolean exit()
Returns a boolean to indicate the demo should exit.


main

public static void main(java.lang.String[] argv)
Main program.