diff options
-rw-r--r-- | src/main.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 6f376e1..cdac768 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,12 +8,24 @@ // "Rotate key" function should also re-sign tokens? #[derive(Debug)] -struct Token { - namespace: String, // Namespace of token. If nil, expect prefix-based or default +struct TokenStore { token: String, // Base64-encoded token value value: String, // Plaintext value signature: String, // Cryptographic signature - empty: bool, // Set up a "maybe empty" style of custom token for empty responses +} + +#[derive(Debug)] +struct APISubmit { + namespace: String, // Namespace of token. If nil, expect prefix-based or default + value: String, // Plaintext value + empty: bool, // Allow a "maybe empty" style of custom token for empty responses +} + +#[derive(Debug)] +struct APIResponse { + namespace: String, // Namespace of token. If nil, expect prefix-based or default + token: String, // Base64-encoded token value + signature: String, // Cryptographic signature } fn main() { |