Interface SaslContext
-
- All Known Subinterfaces:
SaslClientContext
,SaslServerContext
public interface SaslContext
The basic SASL context APIs common to both client and server sides of the SASL exchange.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SaslContext.Role
Indicates the role that this SASL context plays either server or client.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Attachments
getAttachments()
Returns a mutable context that the application layer can use to store meaningful data for itself in relation to this specific SASL context object.Symbol
getChosenMechanism()
Returns the mechanism that was sent to the server to select the SASL mechanism to use for negotiations.java.lang.String
getHostname()
The DNS name of the host (either fully qualified or relative) that was sent to the server which define the host the sending peer is connecting to.SaslContext.Role
getRole()
Return the Role of the context implementation.SaslOutcome
getSaslOutcome()
Provides a low level outcome value for the SASL authentication process.EngineSaslDriver.SaslState
getSaslState()
Returns a SaslState that indicates the current operating state of the SASL negotiation process or conversely if no SASL layer is configured this method should return the no-SASL state.Symbol[]
getServerMechanisms()
After the server has sent its supported mechanisms this method will return a copy of that list for review by the server event handler.default boolean
isClient()
boolean
isDone()
default boolean
isServer()
-
-
-
Method Detail
-
getAttachments
Attachments getAttachments()
Returns a mutable context that the application layer can use to store meaningful data for itself in relation to this specific SASL context object.- Returns:
- the
Attachments
instance that is associated with thisSaslContext
-
getRole
SaslContext.Role getRole()
Return the Role of the context implementation.- Returns:
- the Role of this SASL Context
-
isDone
boolean isDone()
- Returns:
- true if SASL authentication has completed
-
isServer
default boolean isServer()
- Returns:
- true if this is a SASL server context.
-
isClient
default boolean isClient()
- Returns:
- true if this is a SASL client context.
-
getSaslOutcome
SaslOutcome getSaslOutcome()
Provides a low level outcome value for the SASL authentication process.If the SASL exchange is ongoing or the SASL layer was skipped because a particular engine configuration allows such behavior then this method should return null to indicate no SASL outcome is available.
- Returns:
- the SASL outcome code that results from authentication
-
getSaslState
EngineSaslDriver.SaslState getSaslState()
Returns a SaslState that indicates the current operating state of the SASL negotiation process or conversely if no SASL layer is configured this method should return the no-SASL state. This method must never return a null result.- Returns:
- the current state of SASL Authentication.
-
getServerMechanisms
Symbol[] getServerMechanisms()
After the server has sent its supported mechanisms this method will return a copy of that list for review by the server event handler. If called before the server has sent the mechanisms list this method will return null.- Returns:
- the mechanisms that the server offered to the client.
-
getChosenMechanism
Symbol getChosenMechanism()
Returns the mechanism that was sent to the server to select the SASL mechanism to use for negotiations. If called before the client has sent its chosen mechanism this method returns null.- Returns:
- the SASL mechanism that the client selected to use for negotiation.
-
getHostname
java.lang.String getHostname()
The DNS name of the host (either fully qualified or relative) that was sent to the server which define the host the sending peer is connecting to. If called before the client sent the host name information to the server this method returns null.- Returns:
- the host name the client has requested to connect to.
-
-