public final class Auth extends java.lang.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.
Constructor and Description |
---|
Auth(java.lang.String mechanism,
byte[] initialResponse) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getInitialResponse()
Gets the initial response.
|
java.lang.String |
getMechanism()
Gets the mechanism.
|
java.lang.String |
toString() |
public Auth(java.lang.String mechanism, byte[] initialResponse)
mechanism
- The SASL mechanism.initialResponse
- The initial response.public final java.lang.String getMechanism()
Gets the mechanism.
public final byte[] getInitialResponse()
Gets the initial response.
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.