Class Sasl2Negotiation
java.lang.Object
org.jivesoftware.openfire.sasl.task.Sasl2Negotiation
The state of one SASL2 task negotiation on one session.
An instance is created when an
<authenticate/> element is processed for a client session, is stored in the
session's data under Sasl2TaskManager.NEGOTIATION_KEY, and is discarded when the negotiation ends. It also
carries the deferred outcome of the SASL exchange itself: while tasks are running, the authorization identity and
the mechanism name live here rather than being applied to the session, because the session must not become
authenticated until every task has completed.
Providers do not see this type. They are handed Sasl2TaskContext views of it, one per provider, which scope
attribute storage per provider.
All mutation is performed by Sasl2TaskManager while holding this instance's monitor.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe point that a negotiation has reached. -
Method Summary
Modifier and TypeMethodDescriptionThe authorization identity that the SASL exchange yielded, or null for an anonymous authentication.byte[]The data to render as<additional-data/>in the final<success/>element.The name of the SASL mechanism that was used.toString()
-
Method Details
-
getAuthorizationIdentity
The authorization identity that the SASL exchange yielded, or null for an anonymous authentication.- Returns:
- the authenticated username, or null.
-
getSaslMechanismName
The name of the SASL mechanism that was used.- Returns:
- a mechanism name (never null).
-
getFinalAdditionalData
@Nullable public byte[] getFinalAdditionalData()The data to render as<additional-data/>in the final<success/>element. This is not the SASL mechanism's own success data: that was delivered to the peer in the first<continue/>element, and must not be repeated. It is the data, if any, that the last task contributed.- Returns:
- additional data for the
<success/>element, or null.
-
toString
-