Interface TrustedDeviceTokenSigner
public interface TrustedDeviceTokenSigner
Port that signs the value of the trusted-device cookie and checks that signature, so a value the server did not
issue is rejected before anything is looked up. A signed value has the form
token.signature.-
Method Summary
-
Method Details
-
sign
Signs a token.- Parameters:
token- the raw token of a trusted device.- Returns:
- the value to put in the cookie: the token, a dot and its signature.
-
verify
Checks the signature of a cookie value, in constant time.- Parameters:
signedValue- the value presented by the browser, possiblynullor malformed.- Returns:
- the raw token when the value is well formed and its signature is valid; empty otherwise.
-