1 7 8 package com.sun.security.auth.module; 9 10 import javax.security.auth.login.LoginException ; 11 12 18 public class NTSystem { 19 20 private native void getCurrent(boolean debug); 21 22 private String userName; 23 private String domain; 24 private String domainSID; 25 private String userSID; 26 private String groupIDs[]; 27 private String primaryGroupID; 28 private long impersonationToken; 29 30 34 public NTSystem() { 35 this(false); 36 } 37 38 42 NTSystem(boolean debug) { 43 loadNative(); 44 getCurrent(debug); 45 } 46 47 54 public String getName() { 55 return userName; 56 } 57 58 65 public String getDomain() { 66 return domain; 67 } 68 69 76 public String getDomainSID() { 77 return domainSID; 78 } 79 80 87 public String getUserSID() { 88 return userSID; 89 } 90 91 98 public String getPrimaryGroupID() { 99 return primaryGroupID; 100 } 101 102 109 public String [] getGroupIDs() { 110 return groupIDs; 111 } 112 113 120 public long getImpersonationToken() { 121 return impersonationToken; 122 } 123 124 private void loadNative() { 125 System.loadLibrary("jaas_nt"); 126 } 127 } 128 | Popular Tags |