Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /auth/token route #259

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Add /auth/token route #259

merged 1 commit into from
Aug 30, 2024

Conversation

mbklein
Copy link
Contributor

@mbklein mbklein commented Aug 30, 2024

Steps to test:

  • Make sure you delete any .aws-sam directories
  • Make sure port 3002 is open to your dev machine
  • Start the HTTP API locally: make deps serve-https
  • Log in by going to https://.dev.rdc.library.northwestern.edu:3002/auth/login?goto=https://.dev.rdc.library.northwestern.edu:3002/auth/whoami
  • Go to https://.dev.rdc.library.northwestern.edu:3002/auth/token
  • If you're really feeling completist about it, copy the token and submit it to https://.dev.rdc.library.northwestern.edu:3002/auth/whoami in Postman as a Bearer auth token
  • Try it with ?ttl=43200 and see if you get a 12-hour token
  • Try it with TTL values that don't make sense (strings, negative numbers, Infinity) and make sure you get error
  • Try it with a TTL longer than a week (604800 seconds) and make sure you get an error

@mbklein mbklein requested review from bmquinn and kdid August 30, 2024 19:40
Copy link
Contributor

@kdid kdid left a comment

Choose a reason for hiding this comment

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

Works great! 👍

@mbklein mbklein merged commit 93cac31 into deploy/staging Aug 30, 2024
1 check passed
@mbklein mbklein deleted the 5205-retrieve-user-token branch August 30, 2024 19:58
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.

2 participants