Skip to content

Commit 67a2dca

Browse files
authored
feat(reference-app): re-source the README walkthrough from the /demo flow (#195)
Replaces the functional tests' echo-endpoint captures with the styled /demo flow: login, consent, callback, and the real token response. The quickStart test now screenshots the consent step and skips the client-listing landing page. Drops the remember-me section (revisit with a richer gif/slideshow later) and renames the flow directory to authorization-code-flow. Every screenshot is now deterministic and fixed-size, and the walkthrough ends on the token payoff instead of "not pictured".
1 parent fcd5cae commit 67a2dca

13 files changed

Lines changed: 14 additions & 39 deletions

File tree

README.md

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -242,50 +242,27 @@ verified with the
242242
above
243243
jwk [like this](https://jwt.io/#debugger-io?token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImI2ZDMzYmYxLTU5ZDUtNGFiZi05NjQ2LWQxZjMyMTY3NWYyYiIsInR5cCI6IkpXVCJ9.eyJhdF9oYXNoIjoibWNIOEZpUzR6a3dJLTR0Wlpib3c4dyIsImF1ZCI6WyJhYzg0NGM0OC1iZjNkLTRlODEtODdhYS03YmNmNzRkYzA5MmMiXSwiYXV0aF90aW1lIjoxNjcxOTM5NzMyLCJleGFtcGxlQ3VzdG9tQ2xhaW1LZXkiOiJleGFtcGxlIGN1c3RvbSBjbGFpbSB2YWx1ZSIsImV4cCI6MTY3MTk0MzMzMywiaWF0IjoxNjcxOTM5NzMzLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjU5MDI5L2ludGVncmF0aW9uLXRlc3QtcHVibGljLXByb3h5IiwianRpIjoiNTdlNmE1YjctYmY2Yy00NGM0LWE4YjMtNWM0ZGI1NWRhNzJjIiwicmF0IjoxNjcxOTM5NzMxLCJzaWQiOiJiMWVmNDlhYy1mNDJiLTQ1N2UtYjNlMS0yOTVhOTFhYWVmYzkiLCJzdWIiOiJmb29AYmFyLmNvbSJ9.ZRCh1sjNBIe8N_XZm97JeOpJN-T4zB3M8-PH_B-9k3cNLK3u9Ku0nBXTxQ99idrlrxyWQPT7qQK5dAzBis3M2SJ36sWq5BMjGi7bq_nU_Cj_1hzo1HTcdHXkh9iMH4zyBeQPz8BTVGgVE3rSd3tsCOMiwub7Wp3sQKDSHkCkSs6zZcsCCJS9AVQym4ltJyayYJ2lXUg7XMzuFWeyAhuVrusY8wXDv4NRIZOM6ymtHOTxe9UUVKgO8sCnUAVLqz_w2aQIYRy-u-BpT09uEalqTo27rKrUZhHjOd3LgGGVVSGp5_RM_wpK4zkiA0G7CEpU39t0ib6Ix7VWxquGWKaLIA2YqKn3ZGkTdGlByPx5N8ubPtaOxzmlgafbNTjmXxBMXU03hUXCiSaZefBZFB9jiE92-6ZKKvAFqAoaMVWp6QF4wXx3LzQzBr_EBDdH0CwhUmt_rhThj0rp_VVgQ3yr0TV7UAQGaZEO-kMJblMUjhxhK7ZMBlFXC2g7pt9zuvXhdX32QOJQ-xc20vA_RX-Kkp-Nkv3JmNCSsf-jxfwECOr_mKN7_uj7MiPK6_6zUQyrfOMKRHZcJoTlSqZylCaRn1CDxnN-1aTQ_RTplC_E27KD2TYykqc-aUGr0vkRnOGfezP3vFGNvofTfCnzZcgNJs_yTSCim1nkD5CKZEjyIhQ&publicKey=%7B%0A%20%20%20%20%20%20%22use%22%3A%20%22sig%22%2C%0A%20%20%20%20%20%20%22kty%22%3A%20%22RSA%22%2C%0A%20%20%20%20%20%20%22kid%22%3A%20%22b6d33bf1-59d5-4abf-9646-d1f321675f2b%22%2C%0A%20%20%20%20%20%20%22alg%22%3A%20%22RS256%22%2C%0A%20%20%20%20%20%20%22n%22%3A%20%22yFM_NznB3GdBMNJI9YGBmzGRBx3qkTzBfReOOq2DXRBNCkoZZOMSlfv-qqruo-pfbaLwPoz2pww81h9R2hcpoZUbaLb5R3rHOmIYftjiorjzjiLnFlndY5rq3foLxZxcZ6dYBDyS3qzZgf8hUs3CH__kG4MNAAD1Hoj8pER-_jFsAyVLBXpNrIy2aiuUscnFuOtK06LbfX0OjasKSKnx_IGXMje_uA2xziA5AUy5sm4wHWhcFWNCHNH5IgP-AHmg19lm7Swd_OlFfhxg43A7AfypV4-OdBb4qhReEgNr6Fnl761gELYfgDxGZXh6o3vs-V6s4g3fMGNGk4JYHFkkCvlclAg9XaprWKFbnhA8-elqqKWNIShf32uTcajf9rMWh_4M-mLiOPDTaJsZg0_f1z-MyE2_MDe-aRURYVY7tlQYF5MnY-Hg5uxn1QEghezclPe5YWUOtI39u__DgA6X1bgQlE5n4SmvyBTuFScxTEqsidwSiIY5hJh0ek60ds16V3I-XafQ9I6JmQ1TRHxdJfpAxYH5CbroSn7lRA-Tlqd-iaJ3ZHTIBuPUa2kZGwSE8zkFPyd803FhqM-cJTtoDIS0piNd8tn6d_-KJ62jWxJeyCWiOqMvTLHdobz0p9u181l2DU7qR07J1g4qtG0pPQfs6931hLZrG6gXsd2CYfs%22%2C%0A%20%20%20%20%20%20%22e%22%3A%20%22AQAB%22%0A%20%20%20%20%7D).
244244

245-
## Example Flows
245+
## See it work
246246

247-
### Full OAuth Flow With OIDC
247+
A walk through the authorization code flow with OpenID Connect, from login to real
248+
tokens. Run `./gradlew bootTestRun` and open http://localhost:8080 to click through it
249+
yourself.
248250

249-
A visual guide of walking through the flow from login to code.
251+
Log in (the demo credentials are pre-filled):
250252

251-
First step is to log in.
253+
![login screen](docs/images/authorization-code-flow/1-login.png)
252254

253-
![login screen](docs/images/full-oauth-flow-oidc/1-initial-load.png)
255+
Authorize the scopes the application is requesting:
254256

255-
Then scopes are requested.
257+
![consent screen](docs/images/authorization-code-flow/2-consent.png)
256258

257-
![requested scopes screen](docs/images/full-oauth-flow-oidc/2-after-login-submit.png)
259+
Hydra redirects back with an authorization code, which the app exchanges for tokens:
258260

259-
Finally, the browser is redirected to the client where the code can be exchanged.
261+
![callback screen](docs/images/authorization-code-flow/3-callback-page.png)
260262

261-
![code sent to client](docs/images/full-oauth-flow-oidc/3-after-consent-submit.png)
263+
The result is a real access token, ID token, and refresh token from Hydra:
262264

263-
After exchanging the code the client will have a JWT (not pictured).
264-
265-
### Use 'Remember Me' To Skip Consent Screen
266-
267-
Demonstrates the impact of the "remember me" functionality. On first iteration of login, the scope screen is displayed.
268-
On the second attempt to login (requesting the same set of scopes in the oauth url) that UI step is skipped.
269-
270-
Login:
271-
272-
![login](docs/images/remember-me/1-initial-load.png)
273-
274-
Select scopes:
275-
276-
![select scopes](docs/images/remember-me/2-after-login-submit.png)
277-
278-
Get token:
279-
280-
![get token](docs/images/remember-me/3-after-consent-submit.png)
281-
282-
Login again:
283-
284-
![login again](docs/images/remember-me/4-initial-load-second-time.png)
285-
286-
Get token (no scopes screen):
287-
288-
![get token](docs/images/remember-me/5-after-login-submit-second-time.png)
265+
![token response](docs/images/authorization-code-flow/4-tokens.png)
289266

290267
## Building against a different testcontainers-ory-hydra version
291268

File renamed without changes.
File renamed without changes.
43.6 KB
Loading
33.4 KB
Loading
-14.6 KB
Binary file not shown.
-25.6 KB
Binary file not shown.
-47.7 KB
Binary file not shown.
-11.8 KB
Binary file not shown.
-25.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)