Package org.nuxeo.wopi
Class ProofKeyHelper
java.lang.Object
org.nuxeo.wopi.ProofKeyHelper
- Since:
- 10.3
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
getExpectedProofBytes
(String url, String accessToken, long timestamp) static PublicKey
getPublicKey
(String modulus, String exponent) static boolean
verifyProofKey
(PublicKey key, String proofKeyHeader, byte[] expectedProofBytes) static boolean
verifyTimestamp
(long timestamp) Checks that the giventimestamp
is no more than 20 minutes old.
-
Field Details
-
KEY_FACTORY_ALGORITHM
- See Also:
-
SIGNATURE_ALGORITHM
- See Also:
-
EPOCH_IN_TICKS
public static final long EPOCH_IN_TICKS- See Also:
-
-
Method Details
-
getPublicKey
-
getExpectedProofBytes
-
verifyProofKey
-
verifyTimestamp
public static boolean verifyTimestamp(long timestamp) Checks that the giventimestamp
is no more than 20 minutes old.- Throws:
NuxeoException
- if the timestamp is older than 20 minutes
-