Class SASLExternalMechanism
- java.lang.Object
-
- org.jivesoftware.smack.sasl.SASLMechanism
-
- org.jivesoftware.smack.sasl.javax.SASLJavaXMechanism
-
- org.jivesoftware.smack.sasl.javax.SASLExternalMechanism
-
- All Implemented Interfaces:
Comparable<SASLMechanism>
public class SASLExternalMechanism extends SASLJavaXMechanism
Implementation of the SASL EXTERNAL mechanism. To effectively use this mechanism, Java must be configured to properly supply a client SSL certificate (of some sort) to the server. It is up to the implementer to determine how to do this. Here is one method: Create a java keystore with your SSL certificate in it: keytool -genkey -alias username -dname "cn=username,ou=organizationalUnit,o=organizationaName,l=locality,s=state,c=country" Next, set the System Properties:- javax.net.ssl.keyStore to the location of the keyStore
- javax.net.ssl.keyStorePassword to the password of the keyStore
- javax.net.ssl.trustStore to the location of the trustStore
- javax.net.ssl.trustStorePassword to the the password of the trustStore
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from class org.jivesoftware.smack.sasl.javax.SASLJavaXMechanism
sc
-
Fields inherited from class org.jivesoftware.smack.sasl.SASLMechanism
authenticationId, authorizationId, connection, connectionConfiguration, CRAMMD5, DIGESTMD5, EXTERNAL, GSSAPI, host, password, PLAIN, serviceName, sslSession
-
-
Constructor Summary
Constructors Constructor Description SASLExternalMechanism()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthzidSupported()StringgetName()Returns the common name of the SASL mechanism.intgetPriority()Get the priority of this SASL mechanism.SASLExternalMechanismnewInstance()-
Methods inherited from class org.jivesoftware.smack.sasl.javax.SASLJavaXMechanism
authenticateInternal, authenticateInternal, checkIfSuccessfulOrThrow, evaluateChallenge, getAuthenticationText, getSaslProps, getServerName
-
Methods inherited from class org.jivesoftware.smack.sasl.SASLMechanism
afterFinalSaslChallenge, authenticate, authenticate, challengeReceived, compareTo, instanceForAuthentication, isAuthenticationSuccessful, isFinished, saslPrep, setException, throwExceptionIfRequired, toBytes, toString
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SASLExternalMechanism
public SASLExternalMechanism()
-
-
Method Detail
-
authzidSupported
public boolean authzidSupported()
- Overrides:
authzidSupportedin classSASLMechanism
-
getName
public String getName()
Description copied from class:SASLMechanismReturns the common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or GSSAPI.- Specified by:
getNamein classSASLJavaXMechanism- Returns:
- the common name of the SASL mechanism.
-
getPriority
public int getPriority()
Description copied from class:SASLMechanismGet the priority of this SASL mechanism. Lower values mean higher priority.- Specified by:
getPriorityin classSASLMechanism- Returns:
- the priority of this SASL mechanism.
-
newInstance
public SASLExternalMechanism newInstance()
- Specified by:
newInstancein classSASLMechanism
-
-