Skip to content

Refactor authentication - #43

Merged
blaix merged 1 commit into
mainfrom
refactor-auth
Aug 1, 2026
Merged

Refactor authentication#43
blaix merged 1 commit into
mainfrom
refactor-auth

Conversation

@blaix

@blaix blaix commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator
  • Pulls authentication into a routing middleware layer.
  • Expects session token in Authorization: Bearer <token> header instead of part of the json body.

This was changed because I ran into these issues when working on the upload package endpoint:

  • Need to share auth in other endpoints.
  • Can't assume body will always be json.

* Pulls authentication into a routing middleware layer.
* Expects session token in `Authorization: Bearer <token>` header
  instead of part of the json body.

This was changed because I ran into these issues when working on the
upload package endpoint:

* Need to share auth in other endpoints.
* Can't assume body will always be json.
@blaix
blaix requested a review from robinheghan July 30, 2026 10:52

@robinheghan robinheghan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@blaix
blaix merged commit cd0c5da into main Aug 1, 2026
1 check failed
@blaix
blaix deleted the refactor-auth branch August 1, 2026 01:47
Comment thread src/Route/Auth.gren
value
|> String.dropFirst 7
|> String.trim
|> Just

@lue-bird lue-bird Aug 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter at all but why trim it twice? (First in Maybe.map String.trim above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants