@@ -521,6 +521,7 @@ <h2 class="title">Contents</h2>
521521<li><a href="#cupsOAuthCopyUserId">cupsOAuthCopyUserId</a></li>
522522<li><a href="#cupsOAuthGetAuthorizationCode">cupsOAuthGetAuthorizationCode</a></li>
523523<li><a href="#cupsOAuthGetClientId">cupsOAuthGetClientId</a></li>
524+ <li><a href="#cupsOAuthGetJWKS">cupsOAuthGetJWKS</a></li>
524525<li><a href="#cupsOAuthGetMetadata">cupsOAuthGetMetadata</a></li>
525526<li><a href="#cupsOAuthGetTokens">cupsOAuthGetTokens</a></li>
526527<li><a href="#cupsOAuthMakeAuthorizationURL">cupsOAuthMakeAuthorizationURL</a></li>
@@ -6117,6 +6118,28 @@ <h4 class="discussion">Discussion</h4>
61176118<em>Note</em>: This function should only be used to register WWW applications. The
61186119<a href="#cupsOAuthGetAuthorizationCode"><code>cupsOAuthGetAuthorizationCode</code></a> function handles registration of
61196120local/"native" applications for you.</p>
6121+ <h3 class="function"><a id="cupsOAuthGetJWKS">cupsOAuthGetJWKS</a></h3>
6122+ <p class="description">Get the JWT key set for an Authorization Server.</p>
6123+ <p class="code">
6124+ <a href="#cups_json_t">cups_json_t</a> *cupsOAuthGetJWKS(<span class="reserved">const</span> <span class="reserved">char</span> *auth_uri, <a href="#cups_json_t">cups_json_t</a> *metadata);</p>
6125+ <h4 class="parameters">Parameters</h4>
6126+ <table class="list"><tbody>
6127+ <tr><th>auth_uri</th>
6128+ <td class="description">Authorization server URI</td></tr>
6129+ <tr><th>metadata</th>
6130+ <td class="description">Server metadata</td></tr>
6131+ </tbody></table>
6132+ <h4 class="returnvalue">Return Value</h4>
6133+ <p class="description">JWKS or <code>NULL</code> on error</p>
6134+ <h4 class="discussion">Discussion</h4>
6135+ <p class="discussion">This function gets the JWT key set for the specified Authorization Server
6136+ "auth_uri". The "metadata" value is obtained using the
6137+ <a href="#cupsOAuthGetMetadata"><code>cupsOAuthGetMetadata</code></a> function. The returned key set is cached
6138+ per-user for better performance and must be freed using the
6139+ <a href="#cupsJSONDelete"><code>cupsJSONDelete</code></a> function.<br>
6140+ <br>
6141+ The key set is typically used to validate JWT bearer tokens using the
6142+ <a href="#cupsJWTHasValidSignature"><code>cupsJWTHasValidSignature</code></a> function.</p>
61206143<h3 class="function"><a id="cupsOAuthGetMetadata">cupsOAuthGetMetadata</a></h3>
61216144<p class="description">Get the metadata for an Authorization Server.</p>
61226145<p class="code">
@@ -6129,10 +6152,11 @@ <h4 class="parameters">Parameters</h4>
61296152<h4 class="returnvalue">Return Value</h4>
61306153<p class="description">JSON metadata or <code>NULL</code> on error</p>
61316154<h4 class="discussion">Discussion</h4>
6132- <p class="discussion">This function gets the metadata for the specified Authorization Server URI
6133- "auth_uri". Metadata is cached per-user for better performance .<br>
6155+ <p class="discussion">This function gets the RFC 8414 or Open ID Connect metadata for the specified
6156+ OAuth Authorization Server URI "auth_uri".<br>
61346157<br>
6135- The returned metadata must be freed using the <a href="#cupsJSONDelete"><code>cupsJSONDelete</code></a> function.</p>
6158+ The returned metadata is cached per-user for better performance and must be
6159+ freed using the <a href="#cupsJSONDelete"><code>cupsJSONDelete</code></a> function.</p>
61366160<h3 class="function"><a id="cupsOAuthGetTokens">cupsOAuthGetTokens</a></h3>
61376161<p class="description">Obtain access and refresh tokens.</p>
61386162<p class="code">
0 commit comments