Skip to content

Upgrade to v2 #20

@swithek

Description

@swithek
  • Rename:
    • Manager.Defaults() -> Manager.reset() (?)
    • Manager.Auth() -> Manager.Authenticate()/Manager.Private() (?)
    • Manager.Init(...) -> Manager.Create(...) Session (?)
    • Manager.Revoke() -> Manager.RevokeCurrent()
    • Manager.RevokeByIDExt() -> Manager.RevokeByID() (the old RevokeByID should be removed)
    • Manager.RevokeOther() -> Manager.RevokeAllOther()
    • DefaultReject() -> DefaultRejectHandler()
    • Reject() -> RejectHandler()
    • Session.UserKey -> Session.SharedKey (?)
  • Add Manager.OnRevocation(fn)
  • Create a new (optional?) store interface that would store past logins. This would allow the manager to check when the user sends a request from a new machine.
  • Use https://github.com/mileusna/useragent for user agent extraction.
  • Use the new netip.Addr type.
  • Use only RemoteAddr when extracting an IP address. To extract it from other places, the user should use other middlewares (like the one chi has).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions