authgear-server
authgear-server copied to clipboard
Write tests for token handler
pkg/lib/oauth/handler/handler_token.go
This file is complicated but we don't have unit tests for it. We need to write some tests so that we can modify the file in future easier.
- [ ] Write unit tests for each grant_type
- [ ] Some grant_type have different cases, such as authorization_code flow could issue different tokens in different cases. Should test all cases.
- [ ] e2e tests are good to have