public class SASLAuthentication extends Object
The list of available SASL mechanisms is determined by:
UserProvider
being used since
some SASL mechanisms require the server to be able to retrieve user passwordsModifier and Type | Class and Description |
---|---|
static class |
SASLAuthentication.ElementType |
static class |
SASLAuthentication.Status |
Constructor and Description |
---|
SASLAuthentication() |
Modifier and Type | Method and Description |
---|---|
static void |
addSupportedMechanism(String mechanismName)
Adds a new SASL mechanism to the list of supported SASL mechanisms by the server.
|
static List<String> |
getEnabledMechanisms()
Returns a collection of SASL mechanism names that forms the source pool from which the mechanisms that are
eventually being offered to peers are obtained.
|
static Set<String> |
getImplementedMechanisms()
Returns a collection of mechanism names for which the JVM has an implementation available.
|
static String |
getSASLMechanisms(LocalSession session)
Returns a string with the valid SASL mechanisms available for the specified session.
|
static org.dom4j.Element |
getSASLMechanismsElement(ClientSession session) |
static org.dom4j.Element |
getSASLMechanismsElement(LocalIncomingServerSession session) |
static Set<String> |
getSupportedMechanisms()
Returns the list of supported SASL mechanisms by the server.
|
static SASLAuthentication.Status |
handle(LocalSession session,
org.dom4j.Element doc)
Handles the SASL authentication packet.
|
static void |
removeSupportedMechanism(String mechanismName)
Removes a SASL mechanism from the list of supported SASL mechanisms by the server.
|
static void |
setEnabledMechanisms(List<String> mechanisms)
Sets the collection of mechanism names that the system administrator allows to be used.
|
static boolean |
verifyCertificate(X509Certificate trustedCert,
String hostname) |
static boolean |
verifyCertificates(Certificate[] chain,
String hostname,
boolean isS2S) |
public static String getSASLMechanisms(LocalSession session)
session
- The current sessionpublic static org.dom4j.Element getSASLMechanismsElement(ClientSession session)
public static org.dom4j.Element getSASLMechanismsElement(LocalIncomingServerSession session)
public static SASLAuthentication.Status handle(LocalSession session, org.dom4j.Element doc)
session
- the session that is authenticating with the server.doc
- the stanza sent by the authenticating entity.public static boolean verifyCertificate(X509Certificate trustedCert, String hostname)
public static boolean verifyCertificates(Certificate[] chain, String hostname, boolean isS2S)
public static void addSupportedMechanism(String mechanismName)
Note: this method simply registers the SASL mechanism to be advertised as a supported mechanism by Openfire. Actual SASL handling is done by Java itself, so you must add the provider to Java.
mechanismName
- the name of the new SASL mechanism (cannot be null or an empty String).public static void removeSupportedMechanism(String mechanismName)
mechanismName
- the name of the SASL mechanism to remove (cannot be null or empty, not case sensitive).public static Set<String> getSupportedMechanisms()
addSupportedMechanism(String)
to add
new SASL mechanisms.public static Set<String> getImplementedMechanisms()
public static List<String> getEnabledMechanisms()
getImplementedMechanisms()
and configuration or other characteristics of this server must not prevent a particular mechanism from being
used (see @{link getSupportedMechanisms()
}.public static void setEnabledMechanisms(List<String> mechanisms)
mechanisms
- A collection of mechanisms that are considered for use in this instance of Openfire. Null to reset the default setting.getEnabledMechanisms()
Copyright © 2003-2008 Jive Software.