Refactor auth token generation and handling

Separate responsibilities:
* introduce LfsCipher that is responsible only for encryption/decryption
of provided string
* introduce LfsAuthToken that contains by default expiresAt field and
defines two helpers:
- Processor (responsible for serialization
and de-serialization of token to/from string using LfsCipher)
- Verifier (responsible for token validation against time and
implementation specific fields)

Dedicated implementation of LfsAuthToken and its helpers was introduced
for LfsFsRequestAuthorizer so that it might be used in Git LFS API
response (see [1]).

[1]
https://github.com/git-lfs/git-lfs/blob/master/docs/api/authentication.md
Change-Id: Id38576572537e733a584146effb9a98f3199ee8c
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
8 files changed
tree: 92256801ca7ab883154d183c89d7b19de992581b
  1. lib/
  2. src/
  3. .buckconfig
  4. .gitignore
  5. BUCK