FormSignatureVerifier

public class FormSignatureVerifier

Constructors

FormSignatureVerifier

public FormSignatureVerifier(String oauthConsumerKey, String oauthConsumerSecret)

Methods

isFormSigned

protected boolean isFormSigned(Form form)

verify

public long verify(JID to, Element form)

Verify signature of given form.

Parameters:
  • to – the full destination address, including resource, if any.
  • form – signed Form to verify.
Throws:
Returns:

timestamp of signature is signature is valid. If signature is invalid exception will be throwed.

verify

public long verify(JID to, Element form, SignatureVerifyHandler handler)

Verify signature of given form.

Parameters:
  • to – the full destination address, including resource, if any.
  • form – signed Form to verify.
  • handler – handler to make additional verification (for example validate received oauth_token).
Throws:
Returns:

timestamp of signature is signature is valid. If signature is invalid exception will be throwed.

verify

public long verify(JID to, Form form)

Verify signature of given form.

Parameters:
  • to – the full destination address, including resource, if any.
  • form – signed Form to verify.
Throws:
Returns:

timestamp of signature is signature is valid. If signature is invalid exception will be throwed.

verify

public long verify(JID to, Form form, SignatureVerifyHandler handler)

Verify signature of given form.

Parameters:
  • to – the full destination address, including resource, if any.
  • form – signed Form to verify.
  • handler – handler to make additional verification (for example validate received oauth_token).
Throws:
Returns:

timestamp of signature is signature is valid. If signature is invalid exception will be throwed.