Package org.wildfly.security.sasl.gs2
Class Gs2
- java.lang.Object
-
- org.wildfly.security.sasl.gs2.Gs2
-
public final class Gs2 extends Object
Constants and utility methods for the GS2 mechanism family.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description static String
GS2_KRB5
static String
GS2_KRB5_PLUS
static String
GS2_PREFIX
static String
PLUS_SUFFIX
static String
SPNEGO
static String
SPNEGO_PLUS
-
Constructor Summary
Constructors Constructor Description Gs2()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Oid
getMechanismForSaslName(GSSManager gssManager, String saslMechanismName)
Get the GSS-API mechanism object identifier that corresponds to the given SASL mechanism name.static String
getSaslNameForMechanism(Oid mechanismOid)
Get the SASL mechanism name that corresponds to the given GSS-API mechanism object identifier.static String
getSaslNameForMechanism(Oid mechanismOid, boolean plus)
Get the SASL mechanism name that corresponds to the given GSS-API mechanism object identifier.
-
-
-
Field Detail
-
GS2_PREFIX
public static final String GS2_PREFIX
- See Also:
- Constant Field Values
-
PLUS_SUFFIX
public static final String PLUS_SUFFIX
- See Also:
- Constant Field Values
-
GS2_KRB5
public static final String GS2_KRB5
- See Also:
- Constant Field Values
-
GS2_KRB5_PLUS
public static final String GS2_KRB5_PLUS
- See Also:
- Constant Field Values
-
SPNEGO
public static final String SPNEGO
- See Also:
- Constant Field Values
-
SPNEGO_PLUS
public static final String SPNEGO_PLUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSaslNameForMechanism
public static String getSaslNameForMechanism(Oid mechanismOid, boolean plus) throws GSSException
Get the SASL mechanism name that corresponds to the given GSS-API mechanism object identifier.- Parameters:
mechanismOid
- the object identifier for the GSS-API mechanismplus
-true
if the PLUS-variant of the SASL mechanism name should be returned andfalse
otherwise- Returns:
- the SASL mechanism name that corresponds to the given object identifier
- Throws:
GSSException
- if the given object identifier cannot be mapped to a SASL name
-
getSaslNameForMechanism
public static String getSaslNameForMechanism(Oid mechanismOid) throws GSSException
Get the SASL mechanism name that corresponds to the given GSS-API mechanism object identifier.- Parameters:
mechanismOid
- the object identifier for the GSS-API mechanism- Returns:
- the non-PLUS SASL mechanism name that corresponds to the given object identifier
- Throws:
GSSException
- if the given object identifier cannot be mapped to a SASL name
-
getMechanismForSaslName
public static Oid getMechanismForSaslName(GSSManager gssManager, String saslMechanismName) throws GSSException
Get the GSS-API mechanism object identifier that corresponds to the given SASL mechanism name.- Parameters:
saslMechanismName
- the SASL mechanism name- Returns:
- the object identifier for the GSS-API mechanism that corresponds to the given SASL mechanism name
- Throws:
GSSException
- if the given SASL name cannot be mapped to an object identifier
-
-