Class Dialback
- java.lang.Object
-
- rocks.xmpp.extensions.dialback.model.Dialback
-
- Direct Known Subclasses:
Dialback.Result
,Dialback.Verify
public abstract class Dialback extends Object
The implementation of the dialback elements<result/>
and<verify/>
in thejabber:server:dialback
namespace.To generate a dialback key use
generateKey(String, String, String, String)
.- See Also:
- XEP-0220: Server Dialback,
Dialback.Result
,Dialback.Verify
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Dialback.Result
An outbound request for authorization by receiving server or a verification result from the receiving server.static class
Dialback.Verify
A verification request sent from the receiving server to the authoritative server or a verification result sent in the opposite direction.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
generateKey(String secret, String receivingServer, String originatingServer, String streamId)
Generates a key using the following recommended algorithm.StanzaError
getError()
Jid
getFrom()
String
getKey()
Jid
getTo()
boolean
isValid()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
jabber:server:dialback- See Also:
- Constant Field Values
-
-
Method Detail
-
generateKey
public static String generateKey(String secret, String receivingServer, String originatingServer, String streamId)
Generates a key using the following recommended algorithm.HMAC-SHA256 ( SHA256(Secret), { Receiving Server, ' ', Originating Server, ' ', Stream ID } )
- Parameters:
secret
- The secret.receivingServer
- The receiving server.originatingServer
- The originating server.streamId
- The stream id.- Returns:
- The dialback key.
- See Also:
- XEP-0185: Dialback Key Generation and Validation
-
getFrom
public final Jid getFrom()
-
getTo
public final Jid getTo()
-
isValid
public final boolean isValid()
-
getKey
public final String getKey()
-
getError
public final StanzaError getError()
-
-