| 1 |
The webfakes package comes with two fake apps that |
| 2 |
allow to imitate the OAuth2.0 flow in your test cases. |
| 3 |
(See [Aaron Parecki's tutorial](https://aaronparecki.com/oauth-2-simplified/) for a good introduction to OAuth2.0.) |
| 4 |
One app (`oauth2_resource_app()`) is the API server that serves both as the resource and provides authorization. |
| 5 |
`oauth2_third_party_app()` plays the role of the third-party app. |
| 6 |
They are useful when testing or demonstrating code handling OAuth2.0 authorization, token caching, etc. in a package. |
| 7 |
The apps can be used in your tests directly, |
| 8 |
or you could adapt one or both of them to better mimic a particular OAuth2.0 flow. |