Package tigase.form
Class FormSignatureVerifier
java.lang.Object
tigase.form.FormSignatureVerifier
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isFormSigned
(Form form) long
Verify signature of given form.long
verify
(JID to, Form form, FormSignatureVerifier.SignatureVerifyHandler handler) Verify signature of given form.long
Verify signature of given form.long
verify
(JID to, Element form, FormSignatureVerifier.SignatureVerifyHandler handler) Verify signature of given form.
-
Constructor Details
-
FormSignatureVerifier
-
-
Method Details
-
verify
Verify signature of given form.- Parameters:
to
- the full destination address, including resource, if any.form
- signed Form to verify.- Returns:
- timestamp of signature is signature is valid. If signature is invalid exception will be throwed.
- Throws:
FormSignerException
- if signature is invalid or can't be checked.
-
verify
public long verify(JID to, Element form, FormSignatureVerifier.SignatureVerifyHandler handler) throws FormSignerException 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 receivedoauth_token
).- Returns:
- timestamp of signature is signature is valid. If signature is invalid exception will be throwed.
- Throws:
FormSignerException
- if signature is invalid or can't be checked.
-
verify
Verify signature of given form.- Parameters:
to
- the full destination address, including resource, if any.form
- signed Form to verify.- Returns:
- timestamp of signature is signature is valid. If signature is invalid exception will be throwed.
- Throws:
FormSignerException
- if signature is invalid or can't be checked.
-
verify
public long verify(JID to, Form form, FormSignatureVerifier.SignatureVerifyHandler handler) throws FormSignerException 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 receivedoauth_token
).- Returns:
- timestamp of signature is signature is valid. If signature is invalid exception will be throwed.
- Throws:
FormSignerException
- if signature is invalid or can't be checked.
-
isFormSigned
-