All Packages  This Package  Class Hierarchy  Class Search  Index

Class app.authkit.test.TestTwo
java.lang.Object
   |
   +----app.authkit.test.AuthTest
           |
           +----app.authkit.test.TestTwo

  Summary

public class  TestTwo
     extends app.authkit.test.AuthTest
{
          // Constructors 1
     public TestTwo();

          // Methods 2
     public static void main(String[]);

     public void testAuthOne(Authorization, boolean, String);
}

TestTwo tests the independence of two distinct Authorizations, connected to two different underlying sessions, within a single process. The two sessions should be entirely distinct. That is, privileges granted in one should not appear in the other unless the privilege is shared according to the authorization-policy rules.

Args are taken to be privilege-names, which are authorized (with interaction) first in one Authorization and then in the other. Failures and successes are displayed.

On Mac OS X, the default policy rule is for a privilege to be shared and have a 5-minute timeout. One privilege that isn't shared is "system.privilege.admin". It has a 5-minute timeout. The "sys.openfile." privilege is also unshared, and is a wildcard rule. The "system.preferences" privilege is shared, and has no timeout.

For information on the default policy rules on Mac OS X, see "/etc/authorization" on your machine. It is only readable by root or admin. It is only writable by root. Its contents are in XML property-list (plist) form, with important comments included. You should read it in a plain-text editor, such as TextEdit, rather than in Property List Editor.

The property "authkit.imp" is the fully qualified class name of an Authorization to instantiate and use.




  Constructors

· TestTwo

Summary  |  Top

   public TestTwo() 

Default constructor



  Methods

· main

Summary  |  Top
   public static void main(String[] args) 

Static entry point, when used as an application.



· testAuthOne

Summary  |  Top
   public void testAuthOne(Authorization auth, 
                           boolean interact, 
                           String arg) 

Do the test on one arg.

The concrete Authorization's Class is used to construct the new instance of myOther. We naively assume that Class.newInstance() will work for this. A smarter approach would be to use a Constructor.

Overrides:
testAuthOne in class AuthTest


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7