1
1
/*
2
- * Copyright (c) 2000, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2000, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
30
30
import org .ietf .jgss .GSSCredential ;
31
31
32
32
/**
33
- * GSS-API Utilities for using in conjunction with Sun Microsystem's
34
- * implementation of Java GSS-API.
33
+ * GSS-API Utilities for use in conjunction with the JDK implementation
34
+ * of Java GSS-API.
35
35
*
36
36
* @since 1.4
37
37
*/
@@ -42,37 +42,35 @@ public class GSSUtil {
42
42
private GSSUtil () {}
43
43
44
44
/**
45
- * Use this method to convert a GSSName and GSSCredential into a
46
- * Subject. Typically this would be done by a server that wants to
47
- * impersonate a client thread at the Java level by setting a client
48
- * Subject in the current access control context. If the server is merely
49
- * interested in using a principal based policy in its local JVM, then
50
- * it only needs to provide the GSSName of the client.
45
+ * Use this method to convert a {@code GSSName} and {@code GSSCredential}
46
+ * into a {@code Subject}. Typically this would be used by a server that
47
+ * wants to impersonate a client.
51
48
*
52
- * The elements from the GSSName are placed in the principals set of this
53
- * Subject and those from the GSSCredential are placed in the private
54
- * credentials set of the Subject. Any Kerberos specific elements that
55
- * are added to the subject will be instances of the standard Kerberos
56
- * implementation classes defined in javax.security.auth.kerberos.
49
+ * The elements from the {@code GSSName} are placed in the principals set
50
+ * of this {@code Subject} and those from the {@code GSSCredential} are
51
+ * placed in the private credentials set of the {@code Subject}. Any
52
+ * Kerberos specific elements that are added to the subject will be
53
+ * instances of the standard Kerberos implementation classes defined in
54
+ * {@link javax.security.auth.kerberos}.
57
55
*
58
- * @return a Subject with the entries that contain elements from the
59
- * given GSSName and GSSCredential.
56
+ * @param principals a {@code GSSName} containing one or more mechanism
57
+ * specific representations of the same entity. These mechanism specific
58
+ * representations will be populated in the returned {@code Subject}'s
59
+ * principal set.
60
60
*
61
- * @param principals a GSSName containing one or more mechanism specific
62
- * representations of the same entity. These mechanism specific
63
- * representations will be populated in the returned Subject's principal
64
- * set.
61
+ * @param credentials a {@code GSSCredential} containing one or more
62
+ * mechanism specific credentials for the same entity. These mechanism
63
+ * specific credentials will be populated in the returned {@code Subject}'s
64
+ * private credential set. Passing in a value of {@code null} will imply
65
+ * that the private credential set should be left empty.
65
66
*
66
- * @param credentials a GSSCredential containing one or more mechanism
67
- * specific credentials for the same entity. These mechanism specific
68
- * credentials will be populated in the returned Subject's private
69
- * credential set. Passing in a value of null will imply that the private
70
- * credential set should be left empty.
67
+ * @return a {@code Subject} with the entries that contain elements from
68
+ * the given {@code GSSName} and {@code GSSCredential}.
71
69
*/
72
70
public static Subject createSubject (GSSName principals ,
73
- GSSCredential credentials ) {
71
+ GSSCredential credentials ) {
74
72
75
- return sun .security .jgss .GSSUtil .getSubject (principals ,
76
- credentials );
73
+ return sun .security .jgss .GSSUtil .getSubject (principals ,
74
+ credentials );
77
75
}
78
76
}
0 commit comments