public class SaslFilter extends org.apache.mina.core.filterchain.IoFilterAdapter
IoFilterAdapter
that handles integrity and confidentiality protection
for a SASL bound session. The SaslFilter must be constructed with a SASL
context that has completed SASL negotiation. Some SASL mechanisms, such as
CRAM-MD5, only support authentication and thus do not need this filter. DIGEST-MD5
and GSSAPI do support message integrity and confidentiality and, therefore,
do need this filter.Modifier and Type | Field and Description |
---|---|
static String |
DISABLE_SECURITY_LAYER_ONCE
A session attribute key that makes next one write request bypass
this filter (not adding a security layer).
|
Constructor and Description |
---|
SaslFilter(SaslServer saslServer)
Creates a new instance of SaslFilter.
|
Modifier and Type | Method and Description |
---|---|
void |
filterWrite(org.apache.mina.core.filterchain.IoFilter.NextFilter nextFilter,
org.apache.mina.core.session.IoSession session,
org.apache.mina.core.write.WriteRequest writeRequest) |
void |
messageReceived(org.apache.mina.core.filterchain.IoFilter.NextFilter nextFilter,
org.apache.mina.core.session.IoSession session,
Object message) |
public static final String DISABLE_SECURITY_LAYER_ONCE
Boolean.TRUE
is preferred.) The attribute is automatically removed from the session
attribute map as soon as IoSession.write(Object)
is invoked,
and therefore should be put again if you want to make more messages
bypass this filter.public SaslFilter(SaslServer saslServer)
saslServer
- The initialized SASL context.public void messageReceived(org.apache.mina.core.filterchain.IoFilter.NextFilter nextFilter, org.apache.mina.core.session.IoSession session, Object message) throws SaslException
messageReceived
in interface org.apache.mina.core.filterchain.IoFilter
messageReceived
in class org.apache.mina.core.filterchain.IoFilterAdapter
SaslException
public void filterWrite(org.apache.mina.core.filterchain.IoFilter.NextFilter nextFilter, org.apache.mina.core.session.IoSession session, org.apache.mina.core.write.WriteRequest writeRequest) throws SaslException
filterWrite
in interface org.apache.mina.core.filterchain.IoFilter
filterWrite
in class org.apache.mina.core.filterchain.IoFilterAdapter
SaslException
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.