public class JaasGssUtil extends Object
| Constructor and Description |
|---|
JaasGssUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Subject |
createSubject(GSSCredential cred)
Creates a new
Subject object from specified
GSSCredential. |
static Subject |
createSubject(GSSName name,
GSSCredential cred)
Creates a new
Subject object from specified
GSSCredential and GSSName. |
static GSSCredential |
getCredential(Subject subject)
Retrieves the first
GSSCredential from the
private credential set of the specified Subject
object. |
static GlobusPrincipal |
toGlobusPrincipal(GSSName name)
Converts the specified GSSName to GlobusPrincipal.
|
public static Subject createSubject(GSSCredential cred) throws GSSException
Subject object from specified
GSSCredential. The GSSCredential is added
to the private credential set of the Subject object.
Also, if the GSSCredential.getName() is of type
org.globus.gsi.gssapi.GlobusGSSName
a org.globus.gsi.jaas.GlobusPrincipal
is added to the principals set of the Subject object.GSSExceptionpublic static Subject createSubject(GSSName name, GSSCredential cred) throws GSSException
Subject object from specified
GSSCredential and GSSName.
If the GSSCredential is specified it is added
to the private credential set of the Subject object.
Also, if the GSSCredential.getName() is of type
org.globus.gsi.gssapi.GlobusGSSName and the
GSSName parameter was not specified a
org.globus.gsi.jaas.GlobusPrincipal
is added to the principals set of the Subject object.
If the GSSName parameter was specified of type
org.globus.gsi.gssapi.GlobusGSSName a
org.globus.gsi.jaas.GlobusPrincipal
is added to the principals set of the Subject object.GSSExceptionpublic static GlobusPrincipal toGlobusPrincipal(GSSName name)
org.globus.gsi.gssapi.GlobusGSSName
and the name is not anonymous.public static GSSCredential getCredential(Subject subject)
GSSCredential from the
private credential set of the specified Subject
object.GSSCredential. Might be null.Copyright © 2015. All rights reserved.