• wheezy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 month ago

    Wouldn’t unauthorized only be meant for AFTER a login is successful?

    Like, the user should have to have an active session first. Maybe you’re just talking about that case though.

    • smeg@feddit.uk
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 month ago

      Maybe I meant unauthenticated. What is this, mandatory cybersecurity education!?

    • bountygiver [any]@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      unauthorized (403) is still valid for unlogged in as you can permit anonymous access to certain resources.

      unauthenticated (401) is for when you should be redirecting the user to the login page

      • wheezy@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 month ago

        Thanks. I think I might have been misreading these in my head. Dyslexia is a dickhead. The number codes really helped.