• 0 Posts
  • 31 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle





  • Here’s a simple approach:

    • Basic auth via a custom header, like X-Auth
    • JWT auth on Authorization header
    • uuid on the JWT (as a claim) that gets stored temporarily (until it expires) to allow the server to revoke the token

    Initial request -> server looks for Authorization header, falls back to X-Auth header -> generates JWT and sends back to client in Authorization header (or whatever makes sense)

    Subsequent request -> server looks for Authorization header -> checks JWT against revocation database/table and that it isn’t expired

    Subsequent request with expired token -> server returns 401, client retries using X-Auth header -> server sends back JWT on Authorization header -> client updates locally-stored JWT for future requests

    There are probably ways to make this more standard or optimal, but this is a simple approach.




  • DeprecatedCompatV2@programming.devtoMemes@lemmy.mlEVs
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 years ago

    I usually visit my closest city for one of two reasons: 1) I have some kind of appointment or 2) I know some who lives there. Right now I’m able to drive there and park on the street. What should my alternative be once the city is “hostile” to cars? Remember, I live 30+ minutes away by car and take a highway to get there.


  • No they didn’t. They tore up railroad lines and got rid of reliable public transportation. You claim to support the environment, but you’re talking about replacing undeveloped land or farmland with a train. There isn’t enough traffic here to saturate a normal 2-lane road, much less a damn train.




  • I think there’s this misconception that the US is basically NYC or dirt-road farmland, and the reality is that there’s a lot of in-between. I live <20 minutes from the closest mall by car, yet even transportation or food delivery apps (e.g. uber, uber eats) essentially don’t serve my area, so forget public transportation.