Skip to content

Add token to requests sent to SCEvents' protected routes#2087

Merged
steeevin88 merged 1 commit intodevfrom
steven/pass_token_in_scevents
Apr 18, 2026
Merged

Add token to requests sent to SCEvents' protected routes#2087
steeevin88 merged 1 commit intodevfrom
steven/pass_token_in_scevents

Conversation

@steeevin88
Copy link
Copy Markdown
Collaborator

resolves #2086

CHANGES

  • SCEvents endpoints need to be protected --> we need a way for SCEvents to know that if it gets a request, it's actually from Clark
  • to do this... we'll pass the JWT token to protected requests... and determine if the user is valid (ex. is an admin, is a member)

TESTING

  • created event
image image
  • backend logs showed it worked
[GIN-debug] Listening and serving HTTP on :8002
2026/04/18 03:50:59 API Response: {"firstName":"s","lastName":"s","email":"s@s.com","accessLevel":3,"pagesPrinted":0,"_id":"69e2fcf01b021f53d4560965","iat":1776483725,"exp":1776490925}
[GIN] 2026/04/18 - 03:50:59 | 201 |   29.4ms |      172.19.0.1 | POST     "/events/"
[GIN] 2026/04/18 - 03:50:59 | 200 |   6.08ms |      172.19.0.1 | GET      "/events/"

note: this is to be merged alongside SCE-Development/SCEvents#69

@steeevin88 steeevin88 changed the title Add token to calls Add token to requests sent to SCEvents' protected routes Apr 18, 2026
@steeevin88 steeevin88 force-pushed the steven/pass_token_in_scevents branch from 3885df3 to 4961cfa Compare April 18, 2026 04:05
Copy link
Copy Markdown
Collaborator

@KhoaNguyen706 KhoaNguyen706 left a comment

Choose a reason for hiding this comment

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

LGTM🤓🤓

@steeevin88 steeevin88 force-pushed the steven/pass_token_in_scevents branch from 4961cfa to 247cd16 Compare April 18, 2026 05:35
@steeevin88 steeevin88 merged commit deae56c into dev Apr 18, 2026
4 checks passed
@steeevin88 steeevin88 deleted the steven/pass_token_in_scevents branch April 18, 2026 05:36
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.

Update SCEvents functions to send JWT in headers

3 participants