Skip to content

Commit fcd5cae

Browse files
authored
feat(reference-app): name the requesting client and describe scopes on consent (#194)
* feat(reference-app): adopt Pico CSS for the login, logout, and landing pages Vendors Pico v2.1.1 as static/pico.min.css and restyles the pages as a centered card. Login now pre-fills the demo credentials with a caption so they are obvious. Page titles are normalized to h1, and the screenshot viewport is pinned to 576x520 so captures are a uniform, GitHub-column-friendly size. * feat(reference-app): collapse the code and token values behind disclosures The callback page leads with a prominent Exchange button and an honest note that a real app does this server-side; the raw authorization code and the client credentials move into <details> disclosures. The tokens page leads with a success line and tucks the raw token response and decoded claims behind disclosures. This keeps the variable-length, non-deterministic content out of the default view so every screen is a fixed size. * feat(reference-app): name the requesting client and describe scopes on consent The consent screen now reads like a real client's: it names the requesting application and shows a plain-language description for each scope (with the raw scope name alongside), sourced from the consent challenge. Adds a RequestedScope catalog for the descriptions. Drops the redundant 'offline' scope, and gives the test clients a stable client_name so the screen is deterministic. Regenerates the README screenshots.
1 parent f05b0b1 commit fcd5cae

15 files changed

Lines changed: 76 additions & 20 deletions
15.6 KB
Loading
33.9 KB
Loading
-4.29 KB
Loading
15.6 KB
Loading
33.9 KB
Loading
-6.17 KB
Loading
15.6 KB
Loading
-3.02 KB
Loading

reference-app/src/main/java/com/ardetrick/oryhydrareference/consent/ConsentModelAndViewMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ private static ModelAndView handleSkip(Skip consentResponseSkip) {
2626
private static ModelAndView handleDisplayUI(DisplayUI displayUI) {
2727
return new ModelAndView("consent")
2828
.addObject("consentChallenge", displayUI.consentChallenge())
29+
.addObject("clientName", displayUI.clientName())
2930
.addObject("scopes", displayUI.requestedScopes());
3031
}
3132

reference-app/src/main/java/com/ardetrick/oryhydrareference/consent/ConsentResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed interface ConsentResponse
1010

1111
record Skip(String redirectTo) implements ConsentResponse {}
1212

13-
record DisplayUI(List<String> requestedScopes, String consentChallenge)
13+
record DisplayUI(String clientName, List<RequestedScope> requestedScopes, String consentChallenge)
1414
implements ConsentResponse {}
1515

1616
record Accepted(String redirectTo) implements ConsentResponse {}

0 commit comments

Comments
 (0)