Class jabberwerx.SASLPlainMechanism (MINIMAL)
Extends
jabberwerx.SASLMechanism.
Implements the PLAIN SASL mechanism.
Constructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.SASLPlainMechanism(client)
Creates a new SASLPlainMechanism with the given client.
|
- Fields borrowed from class jabberwerx.SASLMechanism:
- client, complete, mechanismName, started
Method Attributes | Method Name and Description |
---|---|
evaluateChallenge(inb)
Called by jabberwerx.SASLMechanism#evaluate to process a challenge. |
|
Called by jabberwerx.SASLMechanism#evaluate to generate initial data.
|
- Methods borrowed from class jabberwerx.SASLMechanism:
- evaluate, getProperties
- Methods borrowed from class jabberwerx.JWBase:
- destroy, getClassName, graphUnserialized, init, invocation, shouldBeSavedWithGraph, shouldBeSerializedInline, toString, wasUnserialized, willBeSerialized
Class Detail
jabberwerx.SASLPlainMechanism(client)
Creates a new SASLPlainMechanism with the given client.
- Parameters:
- {jabberwerx.Client} client
- The client
- Throws:
- {TypeError}
- If {client} is not valid
Method Detail
evaluateChallenge(inb)
Called by jabberwerx.SASLMechanism#evaluate to process a challenge. This implementation throws a SASLAuthFailure if {inb} is a non-empty string, or if this mechanism is already complete.
- Parameters:
- inb
- Throws:
- {jabberwerx.SASLMechanism.SASLAuthFailure}
- If the challenge is invalid (non-empty)
{String}
evaluateStart()
Called by jabberwerx.SASLMechanism#evaluate to generate initial data. This method
creates the string "\\u0000username\\u0000password", using
the connection parameters specified in jabberwerx.SASLMechanism#client.
NOTE: If the BOSH connection is not made over a secure connection, or if the jabberwerx_config.unsecureAllowed flag is false, this method throws a SASLAuthFailure ("{urn:ietf:params:xml:ns:xmpp-sasl}mechanism-too-weak").
- Throws:
- {jabberwerx.SASLMechanism.SASLAuthFailure}
- If PLAIN is not supported by current configuration
- Returns:
- {String} The credential data