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 Details

  • Constructor Details

    • Gs2

      public Gs2()
  • Method Details

    • 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 mechanism
      plus - true if the PLUS-variant of the SASL mechanism name should be returned and false 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