|
49 | 49 | or use them in the <a href="https://github.com/duendesoftware/samples">IdentityServer sample projects</a>.
|
50 | 50 | </p>
|
51 | 51 |
|
52 |
| - <div id="accordion"> |
| 52 | + <div id="accordion" class="mb-3"> |
53 | 53 | @foreach (var clients in Config.Clients.GroupBy(it => it.ClientId.Split('.', StringSplitOptions.TrimEntries).First()))
|
54 | 54 | {
|
55 |
| - < h3 id= "[email protected]"> @DemoServerUtilities.HumanizeClientIdPrefix(clients.Key)</ h3> |
56 |
| - @if (clients.Key == "m2m") |
57 |
| - { |
58 |
| - <p> |
59 |
| - Machine-to-machine communication can be done using <a href="https://docs.duendesoftware.com/identityserver/v7/quickstarts/1_client_credentials/">client credentials</a>. |
60 |
| - </p> |
61 |
| - <ul> |
62 |
| - <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#client-credentials">Sample using client credentials</a></li> |
63 |
| - <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#jwt-based-client-authentication">Sample using client credentials (JWT-based)</a></li> |
64 |
| - <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/misc/#dpop">Sample using DPoP</a></li> |
65 |
| - </ul> |
66 |
| - } |
67 |
| - else if (clients.Key == "interactive") |
68 |
| - { |
69 |
| - <p> |
70 |
| - Interactive clients use <a href="https://docs.duendesoftware.com/identityserver/v7/quickstarts/2_interactive/">interactive user authentication via the OpenID Connect protocol</a>. |
71 |
| - </p> |
72 |
| - <ul> |
73 |
| - <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#mvc-client-sample">Sample MVC client application</a></li> |
74 |
| - <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#mvc-client-with-jar-and-jwt-based-authentication">Sample MVC client application (JAR and JWT)</a></li> |
75 |
| - </ul> |
76 |
| - } |
77 |
| - |
78 |
| - <div class="row"> |
79 |
| - @foreach(var client in clients) |
80 |
| - { |
81 |
| - <div class="col-12 col-lg-6"> |
82 |
| - <div class="card border-dark m-3"> |
83 |
| - <div class="card-body bg-light"> |
84 |
| - <h5 class="card-title">@client.ClientId</h5> |
85 |
| - <h6 class="card-subtitle mb-2 text-muted">@client.ClientName</h6> |
86 |
| - </div> |
87 |
| - <div class="card-body"> |
88 |
| - <div class="card-text"> |
89 |
| - Client ID: <code>@client.ClientId</code><br/> |
90 |
| - Grant type: @DemoServerUtilities.HumanizeAllowedGrantTypes(client.AllowedGrantTypes) |
91 |
| - @if (client.RequireRequestObject) |
92 |
| - { |
93 |
| - <text> - requires JAR</text> |
94 |
| - } |
95 |
| - <br/> |
96 |
| - |
97 |
| - @if (client.RequirePkce) |
98 |
| - { |
99 |
| - <text>Requires PKCE</text> |
100 |
| - <br/> |
101 |
| - } |
102 |
| - @if (client.RequireDPoP) |
103 |
| - { |
104 |
| - switch (client.DPoPValidationMode) |
105 |
| - { |
106 |
| - case DPoPTokenExpirationValidationMode.Nonce: |
107 |
| - @:Requires the use of DPoP and nonce |
108 |
| - break; |
109 |
| - default: |
110 |
| - @:Requires the use of DPoP |
111 |
| - break; |
112 |
| - } |
113 |
| - |
114 |
| - <br/> |
115 |
| - } |
116 |
| - |
117 |
| - @if (client.ClientSecrets.Any()) |
118 |
| - { |
119 |
| - <text>Client secret:</text> |
120 |
| - @foreach (var clientSecret in client.ClientSecrets) |
121 |
| - { |
122 |
| - switch (clientSecret.Type) |
123 |
| - { |
124 |
| - case IdentityServerConstants.SecretTypes.SharedSecret: |
125 |
| - <code>secret</code> |
126 |
| - break; |
127 |
| - case IdentityServerConstants.SecretTypes.JsonWebKey: |
128 |
| - <a href="#sample-keys">private key JWT</a> |
129 |
| - break; |
130 |
| - default: |
131 |
| - @clientSecret.Type |
132 |
| - break; |
133 |
| - } |
134 |
| - } |
135 |
| - |
136 |
| - <br/> |
137 |
| - } |
138 |
| - |
139 |
| - Access token lifetime: @DemoServerUtilities.HumanizeLifetime(TimeSpan.FromSeconds(client.AccessTokenLifetime))<br/> |
140 |
| - |
141 |
| - Allowed scopes: |
142 |
| - @foreach (var scope in client.AllowedScopes.Where(it => !it.Contains("resource") && !it.Contains("scope") && !it.Contains("transaction"))) |
143 |
| - { |
144 |
| - <code>@scope</code> |
145 |
| - } |
146 |
| - @if (client.AllowOfflineAccess) |
147 |
| - { |
148 |
| - <code>offline_access</code> |
149 |
| - } |
| 55 | + <div class="card"> |
| 56 | + < div id= "[email protected]" class= "card-header bg-white shadow-sm border-0"> |
| 57 | + < h6 class= "mb-0 font-weight-bold">< a href= "#" data-toggle= "collapse" data-target= "#[email protected]" aria-controls= "[email protected]" class= "d-block position-relative text-dark text-uppercase collapsible-link py-2"> @DemoServerUtilities.HumanizeClientIdPrefix(clients.Key)</ a></ h6> |
| 58 | + </div> |
| 59 | + < div id= "[email protected]" aria-labelledby= "[email protected]" data-parent= "#accordion" class= "collapse"> |
| 60 | + <div class="card-body"> |
| 61 | + @if (clients.Key == "m2m") |
| 62 | + { |
| 63 | + <p> |
| 64 | + Machine-to-machine communication can be done using <a href="https://docs.duendesoftware.com/identityserver/v7/quickstarts/1_client_credentials/">client credentials</a>. |
| 65 | + </p> |
| 66 | + <ul> |
| 67 | + <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#client-credentials">Sample using client credentials</a></li> |
| 68 | + <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#jwt-based-client-authentication">Sample using client credentials (JWT-based)</a></li> |
| 69 | + <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/misc/#dpop">Sample using DPoP</a></li> |
| 70 | + </ul> |
| 71 | + } |
| 72 | + else if (clients.Key == "interactive") |
| 73 | + { |
| 74 | + <p> |
| 75 | + Interactive clients use <a href="https://docs.duendesoftware.com/identityserver/v7/quickstarts/2_interactive/">interactive user authentication via the OpenID Connect protocol</a>. |
| 76 | + </p> |
| 77 | + <ul> |
| 78 | + <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#mvc-client-sample">Sample MVC client application</a></li> |
| 79 | + <li><a href="https://docs.duendesoftware.com/identityserver/v7/samples/basics/#mvc-client-with-jar-and-jwt-based-authentication">Sample MVC client application (JAR and JWT)</a></li> |
| 80 | + </ul> |
| 81 | + } |
| 82 | + |
| 83 | + <div class="row"> |
| 84 | + @foreach (var client in clients) |
| 85 | + { |
| 86 | + <div class="col-12 col-lg-6"> |
| 87 | + <div class="card border-light m-3"> |
| 88 | + <div class="card-body bg-light"> |
| 89 | + <h5 class="card-title">@client.ClientId</h5> |
| 90 | + <h6 class="card-subtitle mb-2 text-muted">@client.ClientName</h6> |
| 91 | + </div> |
| 92 | + <div class="card-body"> |
| 93 | + <div class="card-text"> |
| 94 | + Client ID: <code>@client.ClientId</code><br/> |
| 95 | + Grant type: @DemoServerUtilities.HumanizeAllowedGrantTypes(client.AllowedGrantTypes) |
| 96 | + @if (client.RequireRequestObject) |
| 97 | + { |
| 98 | + <text> - requires JAR</text> |
| 99 | + } |
| 100 | + <br/> |
| 101 | + |
| 102 | + @if (client.RequirePkce) |
| 103 | + { |
| 104 | + <text>Requires PKCE</text> |
| 105 | + <br/> |
| 106 | + } |
| 107 | + @if (client.RequireDPoP) |
| 108 | + { |
| 109 | + switch (client.DPoPValidationMode) |
| 110 | + { |
| 111 | + case DPoPTokenExpirationValidationMode.Nonce: |
| 112 | + @:Requires the use of DPoP and nonce |
| 113 | + break; |
| 114 | + default: |
| 115 | + @:Requires the use of DPoP |
| 116 | + break; |
| 117 | + } |
| 118 | + |
| 119 | + <br/> |
| 120 | + } |
| 121 | + |
| 122 | + @if (client.ClientSecrets.Any()) |
| 123 | + { |
| 124 | + <text>Client secret:</text> |
| 125 | + @foreach (var clientSecret in client.ClientSecrets) |
| 126 | + { |
| 127 | + switch (clientSecret.Type) |
| 128 | + { |
| 129 | + case IdentityServerConstants.SecretTypes.SharedSecret: |
| 130 | + <code>secret</code> |
| 131 | + break; |
| 132 | + case IdentityServerConstants.SecretTypes.JsonWebKey: |
| 133 | + <a href="#sample-keys">private key JWT</a> |
| 134 | + break; |
| 135 | + default: |
| 136 | + @clientSecret.Type |
| 137 | + break; |
| 138 | + } |
| 139 | + } |
| 140 | + |
| 141 | + <br/> |
| 142 | + } |
| 143 | + |
| 144 | + Access token lifetime: @DemoServerUtilities.HumanizeLifetime(TimeSpan.FromSeconds(client.AccessTokenLifetime))<br/> |
| 145 | + |
| 146 | + Allowed scopes: |
| 147 | + @foreach (var scope in client.AllowedScopes.Where(it => !it.Contains("resource") && !it.Contains("scope") && !it.Contains("transaction"))) |
| 148 | + { |
| 149 | + <code>@scope</code> |
| 150 | + } |
| 151 | + @if (client.AllowOfflineAccess) |
| 152 | + { |
| 153 | + <code>offline_access</code> |
| 154 | + } |
| 155 | + </div> |
| 156 | + </div> |
| 157 | + </div> |
150 | 158 | </div>
|
151 |
| - </div> |
| 159 | + } |
152 | 160 | </div>
|
153 | 161 | </div>
|
154 |
| - } |
| 162 | + </div> |
155 | 163 | </div>
|
156 | 164 | }
|
157 | 165 | </div>
|
|
0 commit comments