freechat/server-api/src
shockrah 11251fe6d3 1. adding hmac_secret as a private lazy_static variable
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
2020-12-22 21:51:23 -08:00
..
testing Removal of unused test 2020-11-17 23:46:40 -08:00
admin.rs userland::admin.rs: now uses db-lib to update permissions 2020-11-17 22:30:58 -08:00
auth.rs 1. adding hmac_secret as a private lazy_static variable 2020-12-22 21:51:23 -08:00
channels.rs Checking for valid channel.kind on /channels/create 2020-12-12 13:51:43 -08:00
http_params.rs renamed server/ to api/ since this is really only the api portion of the typical fc server 2020-08-22 15:52:37 -07:00
invites.rs Optimizations for buidling memcacache for our tokens 2020-12-20 19:43:27 -08:00
main.rs now hanlding server issues with auth(since those sometimes happen) 2020-12-22 21:29:43 -08:00
members.rs Removal of unused uses or random code that was dead anyway 2020-11-16 22:58:58 -08:00
messages.rs db/src/channels.rs/ : Clerical error fix in Response::Other<String> message 2020-11-17 00:08:13 -08:00
perms.rs * Owner perms were not being calculated correctly, this is now fixed 2020-11-21 19:18:40 -08:00
routes.rs Optimizations for buidling memcacache for our tokens 2020-12-20 19:43:27 -08:00