com.rabbitmq.client.impl
Class CRDemoSaslClient

java.lang.Object
  extended by com.rabbitmq.client.impl.CRDemoSaslClient
All Implemented Interfaces:
javax.security.sasl.SaslClient

public class CRDemoSaslClient
extends java.lang.Object
implements javax.security.sasl.SaslClient

Provides equivalent security to PLAIN but demos use of Connection.Secure(Ok) START-OK: Username SECURE: "Please tell me your password" SECURE-OK: Password


Nested Class Summary
static class CRDemoSaslClient.CRDemoSaslConfig
           
 
Constructor Summary
CRDemoSaslClient(javax.security.auth.callback.CallbackHandler handler)
           
 
Method Summary
 void dispose()
           
 byte[] evaluateChallenge(byte[] challenge)
           
 java.lang.String getMechanismName()
           
 java.lang.Object getNegotiatedProperty(java.lang.String s)
           
 boolean hasInitialResponse()
           
 boolean isComplete()
           
 byte[] unwrap(byte[] bytes, int i, int i1)
           
 byte[] wrap(byte[] bytes, int i, int i1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRDemoSaslClient

public CRDemoSaslClient(javax.security.auth.callback.CallbackHandler handler)
Method Detail

getMechanismName

public java.lang.String getMechanismName()
Specified by:
getMechanismName in interface javax.security.sasl.SaslClient

hasInitialResponse

public boolean hasInitialResponse()
Specified by:
hasInitialResponse in interface javax.security.sasl.SaslClient

evaluateChallenge

public byte[] evaluateChallenge(byte[] challenge)
                         throws javax.security.sasl.SaslException
Specified by:
evaluateChallenge in interface javax.security.sasl.SaslClient
Throws:
javax.security.sasl.SaslException

isComplete

public boolean isComplete()
Specified by:
isComplete in interface javax.security.sasl.SaslClient

unwrap

public byte[] unwrap(byte[] bytes,
                     int i,
                     int i1)
              throws javax.security.sasl.SaslException
Specified by:
unwrap in interface javax.security.sasl.SaslClient
Throws:
javax.security.sasl.SaslException

wrap

public byte[] wrap(byte[] bytes,
                   int i,
                   int i1)
            throws javax.security.sasl.SaslException
Specified by:
wrap in interface javax.security.sasl.SaslClient
Throws:
javax.security.sasl.SaslException

getNegotiatedProperty

public java.lang.Object getNegotiatedProperty(java.lang.String s)
Specified by:
getNegotiatedProperty in interface javax.security.sasl.SaslClient

dispose

public void dispose()
             throws javax.security.sasl.SaslException
Specified by:
dispose in interface javax.security.sasl.SaslClient
Throws:
javax.security.sasl.SaslException