public class GssApiMechanisms
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GSSAPI_HOST_PREFIX
Prefix to use with
GSSName.NT_HOSTBASED_SERVICE . |
static org.ietf.jgss.Oid |
KERBEROS_5
The
Oid of Kerberos 5. |
private static java.lang.Object |
LOCK
Protects
supportedMechanisms . |
static org.ietf.jgss.Oid |
SPNEGO
SGNEGO is not to be used with ssh.
|
private static java.util.Map<org.ietf.jgss.Oid,java.lang.Boolean> |
supportedMechanisms
The
AtomicBoolean is set to true when the mechanism could
be initialized successfully at least once. |
Modifier | Constructor and Description |
---|---|
private |
GssApiMechanisms() |
Modifier and Type | Method and Description |
---|---|
static void |
closeContextSilently(org.ietf.jgss.GSSContext context)
Closes (disposes of) a
GSSContext ignoring any
GSSException s. |
static org.ietf.jgss.GSSContext |
createContext(org.ietf.jgss.Oid mechanism,
java.lang.String fqdn)
Creates a
GSSContext for the given mechanism to authenticate with
the host given by fqdn . |
private static org.ietf.jgss.Oid |
createOid(java.lang.String rep) |
static void |
failed(org.ietf.jgss.Oid mechanism)
Mark the mechanisms as failed.
|
static java.lang.String |
getCanonicalName(java.net.InetSocketAddress remote)
Determines a canonical host name for use use with GSS-API.
|
static java.util.Collection<org.ietf.jgss.Oid> |
getSupportedMechanisms()
Retrieves an immutable collection of the supported mechanisms.
|
static java.net.InetAddress |
resolve(java.net.InetSocketAddress remote)
Resolves an
InetSocketAddress . |
static void |
worked(org.ietf.jgss.Oid mechanism)
Report that this mechanism was used successfully.
|
public static final java.lang.String GSSAPI_HOST_PREFIX
GSSName.NT_HOSTBASED_SERVICE
.public static final org.ietf.jgss.Oid KERBEROS_5
Oid
of Kerberos 5.public static final org.ietf.jgss.Oid SPNEGO
private static final java.lang.Object LOCK
supportedMechanisms
.private static java.util.Map<org.ietf.jgss.Oid,java.lang.Boolean> supportedMechanisms
AtomicBoolean
is set to true
when the mechanism could
be initialized successfully at least once.@NonNull public static java.util.Collection<org.ietf.jgss.Oid> getSupportedMechanisms()
public static void worked(@NonNull org.ietf.jgss.Oid mechanism)
mechanism
- that workedpublic static void failed(@NonNull org.ietf.jgss.Oid mechanism)
mechanism
- to markpublic static java.net.InetAddress resolve(@NonNull java.net.InetSocketAddress remote)
InetSocketAddress
.remote
- to resolveInetAddress
, or null
if unresolved.@NonNull public static java.lang.String getCanonicalName(@NonNull java.net.InetSocketAddress remote)
remote
- to get the host name fromunprocessed host name
.public static org.ietf.jgss.GSSContext createContext(@NonNull org.ietf.jgss.Oid mechanism, @NonNull java.lang.String fqdn)
GSSContext
for the given mechanism to authenticate with
the host given by fqdn
.mechanism
- Oid
of the mechanism to usefqdn
- fully qualified domain name of the host to authenticate withnull
otherwisepublic static void closeContextSilently(org.ietf.jgss.GSSContext context)
GSSContext
ignoring any
GSSException
s.context
- to disposeprivate static org.ietf.jgss.Oid createOid(java.lang.String rep)