public class JiveSharedSecretSaslServer extends Object implements SaslServer
Constructor and Description |
---|
JiveSharedSecretSaslServer() |
Modifier and Type | Method and Description |
---|---|
static boolean |
authenticateSharedSecret(String digest)
Returns true if the supplied digest matches the shared secret value.
|
void |
dispose() |
byte[] |
evaluateResponse(byte[] response) |
String |
getAuthorizationID() |
String |
getMechanismName() |
Object |
getNegotiatedProperty(String propName) |
static String |
getSharedSecret()
Returns the shared secret value, or
null if shared secret authentication is disabled. |
boolean |
isComplete() |
static boolean |
isSharedSecretAllowed()
Returns true if shared secret authentication is enabled.
|
static void |
setSharedSecretAllowed(boolean sharedSecretAllowed)
Sets whether shared secret authentication is enabled.
|
byte[] |
unwrap(byte[] incoming,
int offset,
int len) |
byte[] |
wrap(byte[] outgoing,
int offset,
int len) |
public static final String NAME
public String getMechanismName()
getMechanismName
in interface SaslServer
public byte[] evaluateResponse(byte[] response) throws SaslException
evaluateResponse
in interface SaslServer
SaslException
public boolean isComplete()
isComplete
in interface SaslServer
public String getAuthorizationID()
getAuthorizationID
in interface SaslServer
public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException
unwrap
in interface SaslServer
SaslException
public byte[] wrap(byte[] outgoing, int offset, int len) throws SaslException
wrap
in interface SaslServer
SaslException
public Object getNegotiatedProperty(String propName)
getNegotiatedProperty
in interface SaslServer
public void dispose() throws SaslException
dispose
in interface SaslServer
SaslException
public static boolean authenticateSharedSecret(String digest)
digest
- the MD5 hash of the secret key, encoded as hex.public static boolean isSharedSecretAllowed()
public static String getSharedSecret()
null
if shared secret authentication is disabled. If this is the
first time the shared secret value has been requested (and shared secret auth is enabled), the key will be
randomly generated and stored in the property xmpp.auth.sharedSecret
.public static void setSharedSecretAllowed(boolean sharedSecretAllowed)
sharedSecretAllowed
- true if shared secret authentication should be enabled.Copyright © 2003–2020 Ignite Realtime. All rights reserved.