Package org.nuxeo.wopi
Class ProofKeyHelper
- java.lang.Object
-
- org.nuxeo.wopi.ProofKeyHelper
-
public class ProofKeyHelper extends Object
- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description static long
EPOCH_IN_TICKS
static String
KEY_FACTORY_ALGORITHM
static String
SIGNATURE_ALGORITHM
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
KEY_FACTORY_ALGORITHM
public static final String KEY_FACTORY_ALGORITHM
- See Also:
- Constant Field Values
-
SIGNATURE_ALGORITHM
public static final String SIGNATURE_ALGORITHM
- See Also:
- Constant Field Values
-
EPOCH_IN_TICKS
public static final long EPOCH_IN_TICKS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getExpectedProofBytes
public static byte[] getExpectedProofBytes(String url, String accessToken, long timestamp)
-
verifyProofKey
public static boolean verifyProofKey(PublicKey key, String proofKeyHeader, byte[] expectedProofBytes)
-
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
-
-