[Identity] Refactor access token verification to be more usable
Summary:
Verifying if an access token is valid will be a common
action with many of the API calls. We should make this as ergonomic
as possible.
Part of https://linear.app/comm/issue/ENG-3943
Test Plan:
Set up identity service and localstack
nix develop (cd services/identity && RUST_LOG=debug cargo run -- server) (cd services/commtest && cargo test --test identity_access_tokens_tests)
Reviewers: varun, bartek
Reviewed By: varun, bartek
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8094