diff --git a/src/App.svelte b/src/App.svelte index d0b2dda..b416897 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1404,313 +1404,315 @@ {/if} - {#if result.authorize} - - (dropdown.authorize = !dropdown.authorize)} - class="py-2 w-full flex justify-between items-center px-4" - > - - {new URL( - "/authorize", - states.selected_authorization_server - )} + Authorization Response + {#if !result.authorize} + Nothing to see here yet + {:else} + + + (dropdown.authorize = !dropdown.authorize)} + class="py-2 w-full flex justify-between items-center px-4" > - - Response + + {new URL( + "/authorize", + states.selected_authorization_server + )} + + Response + { + if (!result.authorize) return; + dropdown.authorize = false; + copy("authorize", JSON.stringify(result.authorize)); + }} + > + + + + + + + + + + + + {#if dropdown.authorize} + + {result.authorize} + + {/if} + + + {#if result.token !== null} + { - if (!result.authorize) return; - dropdown.authorize = false; - copy("authorize", JSON.stringify(result.authorize)); - }} + on:click={() => (dropdown.token = !dropdown.token)} + class="py-2 w-full flex justify-between items-center px-4" > + + {new URL( + "/oauth/token", + states.selected_authorization_server + )} + + Response + { + if (!result.token) return; + dropdown.token = false; + copy("token", JSON.stringify(result.token)); + }} + > + + + + + + - - - - - - - - {#if dropdown.authorize} - - {result.authorize} - - {/if} - - - {#if result.token !== null} - - (dropdown.token = !dropdown.token)} - class="py-2 w-full flex justify-between items-center px-4" - > - - {new URL( - "/oauth/token", - states.selected_authorization_server - )} + + {JSON.stringify(result.token, null, 2)} + + + {/if} + + {/if} + + {#if result.userinfo !== null} + + (dropdown.userinfo = !dropdown.userinfo)} + class="py-2 w-full flex justify-between items-center px-4" > - - Response - { - if (!result.token) return; - dropdown.token = false; - copy("token", JSON.stringify(result.token)); - }} - > - + {new URL( + "/oauth/userinfo", + states.selected_authorization_server + )} - - - - - - - - - - {#if dropdown.token} - - - {JSON.stringify(result.token, null, 2)} - - + + Response + { + if (!result.token) return; + dropdown.userinfo = false; + copy("userinfo", JSON.stringify(result.userinfo)); + }} + > + + + + + + + + + + + {#if dropdown.userinfo} + + + {JSON.stringify(result.userinfo, null, 2)} + + + {/if} + {/if} - - {/if} - - {#if result.userinfo !== null} - - (dropdown.userinfo = !dropdown.userinfo)} - class="py-2 w-full flex justify-between items-center px-4" - > - - {new URL( - "/oauth/userinfo", - states.selected_authorization_server - )} + (dropdown.introspect = !dropdown.introspect)} + class="py-2 w-full flex justify-between items-center px-4" > - - Response - { - if (!result.token) return; - dropdown.userinfo = false; - copy("userinfo", JSON.stringify(result.userinfo)); - }} - > - + {new URL( + "/oauth/introspect", + states.selected_authorization_server + )} - - - - - - - - - - {#if dropdown.userinfo} - - - {JSON.stringify(result.userinfo, null, 2)} - - + + Response + { + if (!result.introspect) return; + dropdown.introspect = false; + copy("introspect", JSON.stringify(result.introspect)); + }} + > + + + + + + + + + + + {#if dropdown.introspect} + + + {JSON.stringify(result.introspect, null, 2)} + + + {/if} + {/if} - - {/if} - - {#if result.introspect !== null} - - (dropdown.introspect = !dropdown.introspect)} - class="py-2 w-full flex justify-between items-center px-4" - > - - {new URL( - "/oauth/introspect", - states.selected_authorization_server - )} + (dropdown.claims = !dropdown.claims)} + class="h-12 w-full flex justify-between items-center px-4" > - - Response - { - if (!result.introspect) return; - dropdown.introspect = false; - copy("introspect", JSON.stringify(result.introspect)); - }} + Claims + - - - - - - - - - - - {#if dropdown.introspect} - - - {JSON.stringify(result.introspect, null, 2)} - - - {/if} - - {/if} - - {#if result.introspect} - - (dropdown.claims = !dropdown.claims)} - class="h-12 w-full flex justify-between items-center px-4" - > - Claims - - - - - {#if dropdown.claims} - - {#each scopes.claims.filter((i) => result.introspect[i]) as claim} - {@const isString = typeof result.introspect[claim] == 'string'} - - {claim} - - {#if claim === "picture" && result.introspect[claim]} - - - {:else} - - {isString ? result.introspect[claim] : JSON.stringify(result.introspect[claim], null, 2) || ""} - {/if} - - - {/each} - + + + + {#if dropdown.claims} + + {#each scopes.claims.filter((i) => result.introspect[i]) as claim} + {@const isString = typeof result.introspect[claim] == 'string'} + + {claim} + + {#if claim === "picture" && result.introspect[claim]} + + + {:else} + + {isString ? result.introspect[claim] : JSON.stringify(result.introspect[claim], null, 2) || ""} + {/if} + + + {/each} + + {/if} + {/if} - + {/if} - {:else} - - Authorization Response - Nothing to see here yet - - {/if} +
+ {result.authorize} +
- {result.authorize} -
{isString ? result.introspect[claim] : JSON.stringify(result.introspect[claim], null, 2) || ""}