Package com.rabbitmq.client.impl
Class CRDemoMechanism
- java.lang.Object
-
- com.rabbitmq.client.impl.CRDemoMechanism
-
- All Implemented Interfaces:
SaslMechanism
public class CRDemoMechanism extends java.lang.Object implements SaslMechanism
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
Nested Classes Modifier and Type Class Description static class
CRDemoMechanism.CRDemoSaslConfig
-
Constructor Summary
Constructors Constructor Description CRDemoMechanism()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
The name of this mechanism (e.g.LongString
handleChallenge(LongString challenge, java.lang.String username, java.lang.String password)
Handle one round of challenge-response
-
-
-
Field Detail
-
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
-
round
private int round
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:SaslMechanism
The name of this mechanism (e.g. PLAIN)- Specified by:
getName
in interfaceSaslMechanism
- Returns:
- the name
-
handleChallenge
public LongString handleChallenge(LongString challenge, java.lang.String username, java.lang.String password)
Description copied from interface:SaslMechanism
Handle one round of challenge-response- Specified by:
handleChallenge
in interfaceSaslMechanism
- Parameters:
challenge
- the challenge this round, or null on first round.username
- name of userpassword
- for username- Returns:
- response
-
-