Class Auth
- java.lang.Object
-
- rocks.xmpp.core.sasl.model.Auth
-
- All Implemented Interfaces:
StreamElement
public final class Auth extends Object implements StreamElement
The implementation of the<auth/>
element to initialize the SASL authentication process.In order to begin the SASL negotiation, the initiating entity sends an
<auth/>
element qualified by the 'urn:ietf:params:xml:ns:xmpp-sasl' namespace and includes an appropriate value for the 'mechanism' attribute, thus starting the handshake for that particular authentication mechanism. This element MAY contain XML character data (in SASL terminology, the "initial response") if the mechanism supports or requires it. If the initiating entity needs to send a zero-length initial response, it MUST transmit the response as a single equals sign character ("="), which indicates that the response is present but contains no data.If the initiating entity subsequently sends another
<auth/>
element and the ongoing authentication handshake has not yet completed, the receiving entity MUST discard the ongoing handshake and MUST process a new handshake for the subsequently requested SASL mechanism.This class is immutable.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getInitialResponse()
Gets the initial response.String
getMechanism()
Gets the mechanism.String
toString()
-
-
-
Constructor Detail
-
Auth
public Auth(String mechanism, byte[] initialResponse)
- Parameters:
mechanism
- The SASL mechanism.initialResponse
- The initial response.
-
-