Class GssApiMechanisms
java.lang.Object
org.eclipse.jgit.internal.transport.sshd.GssApiMechanisms
Global repository of GSS-API mechanisms that we can use.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPrefix to use withGSSName.NT_HOSTBASED_SERVICE.static final OidTheOidof Kerberos 5.private static final ObjectProtectssupportedMechanisms.static final OidSGNEGO is not to be used with ssh.TheAtomicBooleanis set totruewhen the mechanism could be initialized successfully at least once. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcloseContextSilently(GSSContext context) Closes (disposes of) aGSSContextignoring anyGSSExceptions.static GSSContextcreateContext(Oid mechanism, String fqdn) Creates aGSSContextfor the given mechanism to authenticate with the host given byfqdn.private static Oidstatic voidMark the mechanisms as failed.static StringgetCanonicalName(InetSocketAddress remote) Determines a canonical host name for use use with GSS-API.static Collection<Oid>Retrieves an immutable collection of the supported mechanisms.static InetAddressresolve(InetSocketAddress remote) Resolves anInetSocketAddress.static voidReport that this mechanism was used successfully.
-
Field Details
-
GSSAPI_HOST_PREFIX
Prefix to use withGSSName.NT_HOSTBASED_SERVICE.- See Also:
-
KERBEROS_5
TheOidof Kerberos 5. -
SPNEGO
SGNEGO is not to be used with ssh. -
LOCK
ProtectssupportedMechanisms. -
supportedMechanisms
TheAtomicBooleanis set totruewhen the mechanism could be initialized successfully at least once.
-
-
Constructor Details
-
GssApiMechanisms
private GssApiMechanisms()
-
-
Method Details
-
getSupportedMechanisms
Retrieves an immutable collection of the supported mechanisms.- Returns:
- the supported mechanisms
-
worked
Report that this mechanism was used successfully.- Parameters:
mechanism- that worked
-
failed
Mark the mechanisms as failed.- Parameters:
mechanism- to mark
-
resolve
Resolves anInetSocketAddress.- Parameters:
remote- to resolve- Returns:
- the resolved
InetAddress, ornullif unresolved.
-
getCanonicalName
Determines a canonical host name for use use with GSS-API.- Parameters:
remote- to get the host name from- Returns:
- the canonical host name, if it can be determined, otherwise the
unprocessed host name.
-
createContext
Creates aGSSContextfor the given mechanism to authenticate with the host given byfqdn.- Parameters:
mechanism-Oidof the mechanism to usefqdn- fully qualified domain name of the host to authenticate with- Returns:
- the context, if the mechanism is available and the context could
be created, or
nullotherwise
-
closeContextSilently
Closes (disposes of) aGSSContextignoring anyGSSExceptions.- Parameters:
context- to dispose
-
createOid
-