-
Notifications
You must be signed in to change notification settings - Fork 0
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 AuthorisedAction #13
Conversation
4b89363
to
2b410af
Compare
val result = action(Ok)(request) | ||
status(result) shouldBe OK | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we missing the case where the token is present but invalid ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 3c943e1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a comment but overall looks good to me
This adds some middleware to validate particular endpoints, checking that the request has a valid access token with the required scopes for the endpoint.
I've created a stub for the Get /user/me endpoint to test the action. It works in Code.