KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > TestLogin


1 /*
2 * JBoss, the OpenSource J2EE webOS
3 *
4 * Distributable under LGPL license.
5 * See terms of license at gnu.org.
6 */

7 package org.jboss.test;
8
9 import java.security.*;
10 import javax.security.auth.*;
11
12 public class TestLogin
13 {
14     public static void main(String JavaDoc[] args) throws Exception JavaDoc
15     {
16         System.setProperty("java.security.policy", "policy");
17         System.out.println("java.security.manager = "+System.getProperty("java.security.manager"));
18         Permission p = new AuthPermission("getLoginConfiguration");
19         AccessController.checkPermission(p);
20     }
21 }
22
Popular Tags