equal
deleted
inserted
replaced
39 import org.ietf.jgss.GSSName; |
39 import org.ietf.jgss.GSSName; |
40 import org.ietf.jgss.MessageProp; |
40 import org.ietf.jgss.MessageProp; |
41 import org.ietf.jgss.Oid; |
41 import org.ietf.jgss.Oid; |
42 import com.sun.security.jgss.ExtendedGSSContext; |
42 import com.sun.security.jgss.ExtendedGSSContext; |
43 import com.sun.security.jgss.InquireType; |
43 import com.sun.security.jgss.InquireType; |
|
44 import com.sun.security.jgss.AuthorizationDataEntry; |
44 |
45 |
45 /** |
46 /** |
46 * Context of a JGSS subject, encapsulating Subject and GSSContext. |
47 * Context of a JGSS subject, encapsulating Subject and GSSContext. |
47 * |
48 * |
48 * Three "constructors", which acquire the (private) credentials and fill |
49 * Three "constructors", which acquire the (private) credentials and fill |
286 InquireType.KRB5_GET_SESSION_KEY); |
287 InquireType.KRB5_GET_SESSION_KEY); |
287 if (k == null) { |
288 if (k == null) { |
288 throw new Exception("Session key cannot be null"); |
289 throw new Exception("Session key cannot be null"); |
289 } |
290 } |
290 System.out.println("Session key is: " + k); |
291 System.out.println("Session key is: " + k); |
|
292 boolean[] flags = (boolean[])ex.inquireSecContext( |
|
293 InquireType.KRB5_GET_TKT_FLAGS); |
|
294 if (flags == null) { |
|
295 throw new Exception("Ticket flags cannot be null"); |
|
296 } |
|
297 System.out.println("Ticket flags is: " + Arrays.toString(flags)); |
|
298 String authTime = (String)ex.inquireSecContext( |
|
299 InquireType.KRB5_GET_AUTHTIME); |
|
300 if (authTime == null) { |
|
301 throw new Exception("Auth time cannot be null"); |
|
302 } |
|
303 System.out.println("AuthTime is: " + authTime); |
|
304 if (!x.isInitiator()) { |
|
305 AuthorizationDataEntry[] ad = (AuthorizationDataEntry[])ex.inquireSecContext( |
|
306 InquireType.KRB5_GET_AUTHZ_DATA); |
|
307 System.out.println("AuthzData is: " + Arrays.toString(ad)); |
|
308 } |
291 } |
309 } |
292 } |
310 } |
293 } |
311 } |
294 |
312 |
295 /** |
313 /** |