This is only initialized once and is read only after the fact so it should be fine 2. Adding a Claim struct that all JWT's will use for their structure. A helpful .new() function is provided 3. AuthReason::ServerIssue(String) is a now a thing Should help the auth module be more clear in what's going on 4. fn get_jwt_json -> renamed from get_jwt to indicate we're getting something from json payload. Nothing more 5. async fn valid_jwt: Attempts to decode the given token, if successful it then looks if that user has given us an active jwt budget-session-key if (returns boolean) 6. wall_entry now returns an AuthReason without the sql wrapping, since thats db-lib's problem anyway Also we're collecting all data upfront then verifying it as we go. 7. async fn login_get_jwt::ROUTE On login_auth here we simply create a JWT for the user, store it in cache, then give it back to the user to use. Tokens take a week to expire 8. Removed busted tests that weren't doing anything useful for the time being |
||
|---|---|---|
| .. | ||
| client-tests | ||
| db | ||
| migrations | ||
| scripts | ||
| src | ||
| .env | ||
| .gitignore | ||
| build.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| endpoints.md | ||