Skip to content

Commit f592dd8

Browse files
authored
Merge pull request #692 from ruby-oauth/feat/docs
2 parents 50f3fd0 + 2095732 commit f592dd8

32 files changed

+1161
-1217
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ GEM
311311
uri (1.1.1)
312312
version_gem (1.1.9)
313313
yard (0.9.37)
314-
yard-fence (0.5.0)
314+
yard-fence (0.7.0)
315315
rdoc (~> 6.11)
316316
version_gem (~> 1.1, >= 1.1.9)
317317
yard (~> 0.9, >= 0.9.37)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Expand the examples below, or the [ruby-oauth/snaky_hash](https://gitlab.com/rub
471471
or [response_spec.rb](https://github.com/ruby-oauth/oauth2/blob/main/spec/oauth2/response_spec.rb), for more ideas, especially if you need to study the hacks for older Rubies.
472472

473473
<details markdown="1">
474-
<summary>See Examples</summary>
474+
<summary>See Examples</summary>
475475

476476
```ruby
477477
class MySnakyHash < SnakyHash::StringKeyed

docs/OAuth2.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ <h2>
119119
<dt id="OAUTH_DEBUG-constant" class="">OAUTH_DEBUG =
120120
<div class="docstring">
121121
<div class="discussion">
122-
<p>When true, enables verbose HTTP logging via Faraday’s logger middleware.
123-
Controlled by the OAUTH_DEBUG environment variable. Any case-insensitive
122+
<p>When true, enables verbose HTTP logging via Faraday’s logger middleware.<br />
123+
Controlled by the OAUTH_DEBUG environment variable. Any case-insensitive<br />
124124
value equal to “true” will enable debugging.</p>
125125

126126

@@ -415,7 +415,7 @@ <h3 class="signature first" id="configure-class_method">
415415
</div>
416416

417417
<div id="footer">
418-
Generated on Fri Nov 7 21:14:33 2025 by
418+
Generated on Sat Nov 8 00:26:51 2025 by
419419
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
420420
0.9.37 (ruby-3.4.7).
421421
</div>

docs/OAuth2/AccessToken.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -826,13 +826,13 @@ <h3 class="signature first" id="initialize-instance_method">
826826

827827
<div class="note notetag">
828828
<strong>Note:</strong>
829-
<div class='inline'><p>If no token is provided, the AccessToken will be considered invalid.
830-
This is to prevent the possibility of a token being accidentally
831-
created with no token value.
832-
If you want to create an AccessToken with no token value,
833-
you can pass in an empty string or nil for the token value.
834-
If you want to create an AccessToken with no token value and
835-
no refresh token, you can pass in an empty string or nil for the
829+
<div class='inline'><p>If no token is provided, the AccessToken will be considered invalid.<br />
830+
This is to prevent the possibility of a token being accidentally<br />
831+
created with no token value.<br />
832+
If you want to create an AccessToken with no token value,<br />
833+
you can pass in an empty string or nil for the token value.<br />
834+
If you want to create an AccessToken with no token value and<br />
835+
no refresh token, you can pass in an empty string or nil for the<br />
836836
token value and nil for the refresh token, and <code>raise_errors: false</code>.</p>
837837
</div>
838838
</div>
@@ -987,9 +987,9 @@ <h5 class="example_title"><div class='inline'><p>Verb-dependent Hash mode</p>
987987

988988
</span>
989989

990-
&mdash; <div class='inline'><p>the transmission mode of the Access Token parameter value:
991-
either one of :header, :body or :query; or a Hash with verb symbols as keys mapping to one of these symbols
992-
(e.g., <code>{get: :query, post: :header, delete: :header}</code>); or a callable that accepts a request-verb parameter
990+
&mdash; <div class='inline'><p>the transmission mode of the Access Token parameter value:<br />
991+
either one of :header, :body or :query; or a Hash with verb symbols as keys mapping to one of these symbols<br />
992+
(e.g., <code>{get: :query, post: :header, delete: :header}</code>); or a callable that accepts a request-verb parameter<br />
993993
and returns one of these three symbols.</p>
994994
</div>
995995

@@ -1020,7 +1020,7 @@ <h5 class="example_title"><div class='inline'><p>Verb-dependent Hash mode</p>
10201020

10211021
</span>
10221022

1023-
&mdash; <div class='inline'><p>the parameter name to use for transmission of the
1023+
&mdash; <div class='inline'><p>the parameter name to use for transmission of the<br />
10241024
Access Token value in :body or :query transmission mode</p>
10251025
</div>
10261026

@@ -1036,7 +1036,7 @@ <h5 class="example_title"><div class='inline'><p>Verb-dependent Hash mode</p>
10361036

10371037
</span>
10381038

1039-
&mdash; <div class='inline'><p>the name of the response parameter that identifies the access token
1039+
&mdash; <div class='inline'><p>the name of the response parameter that identifies the access token<br />
10401040
When nil one of TOKEN_KEY_LOOKUP will be used</p>
10411041
</div>
10421042

@@ -1533,21 +1533,21 @@ <h3 class="signature first" id="from_hash-class_method">
15331533

15341534
<div class="note notetag">
15351535
<strong>Note:</strong>
1536-
<div class='inline'><p>The method will use the first found token key in the following order:
1536+
<div class='inline'><p>The method will use the first found token key in the following order:<br />
15371537
‘access_token’, ‘id_token’, ‘token’ (or their symbolic versions)</p>
15381538
</div>
15391539
</div>
15401540

15411541
<div class="note notetag">
15421542
<strong>Note:</strong>
1543-
<div class='inline'><p>If multiple token keys are present, a warning will be issued unless
1543+
<div class='inline'><p>If multiple token keys are present, a warning will be issued unless<br />
15441544
OAuth2.config.silence_extra_tokens_warning is true</p>
15451545
</div>
15461546
</div>
15471547

15481548
<div class="note notetag">
15491549
<strong>Note:</strong>
1550-
<div class='inline'><p>If no token keys are present, a warning will be issued unless
1550+
<div class='inline'><p>If no token keys are present, a warning will be issued unless<br />
15511551
OAuth2.config.silence_no_tokens_warning is true</p>
15521552
</div>
15531553
</div>
@@ -2746,28 +2746,28 @@ <h3 class="signature " id="revoke-instance_method">
27462746

27472747
<div class="note notetag">
27482748
<strong>Note:</strong>
2749-
<div class='inline'><p>If the token passed to the request
2750-
is an access token, the server MAY revoke the respective refresh
2749+
<div class='inline'><p>If the token passed to the request<br />
2750+
is an access token, the server MAY revoke the respective refresh<br />
27512751
token as well.</p>
27522752
</div>
27532753
</div>
27542754

27552755
<div class="note notetag">
27562756
<strong>Note:</strong>
2757-
<div class='inline'><p>If the token passed to the request
2758-
is a refresh token and the authorization server supports the
2759-
revocation of access tokens, then the authorization server SHOULD
2760-
also invalidate all access tokens based on the same authorization
2757+
<div class='inline'><p>If the token passed to the request<br />
2758+
is a refresh token and the authorization server supports the<br />
2759+
revocation of access tokens, then the authorization server SHOULD<br />
2760+
also invalidate all access tokens based on the same authorization<br />
27612761
grant</p>
27622762
</div>
27632763
</div>
27642764

27652765
<div class="note notetag">
27662766
<strong>Note:</strong>
2767-
<div class='inline'><p>If the server responds with HTTP status code 503, your code must
2768-
assume the token still exists and may retry after a reasonable delay.
2769-
The server may include a “Retry-After” header in the response to
2770-
indicate how long the service is expected to be unavailable to the
2767+
<div class='inline'><p>If the server responds with HTTP status code 503, your code must<br />
2768+
assume the token still exists and may retry after a reasonable delay.<br />
2769+
The server may include a “Retry-After” header in the response to<br />
2770+
indicate how long the service is expected to be unavailable to the<br />
27712771
requesting client.</p>
27722772
</div>
27732773
</div>
@@ -3083,7 +3083,7 @@ <h3 class="signature " id="to_hash-instance_method">
30833083
</div>
30843084

30853085
<div id="footer">
3086-
Generated on Fri Nov 7 21:14:34 2025 by
3086+
Generated on Sat Nov 8 00:26:51 2025 by
30873087
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
30883088
0.9.37 (ruby-3.4.7).
30893089
</div>

docs/OAuth2/Authenticator.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h2>Overview</h2><div class="docstring">
108108
<div class="discussion">
109109
<p>Builds and applies client authentication to token and revoke requests.</p>
110110

111-
<p>Depending on the selected mode, credentials are applied as Basic Auth
111+
<p>Depending on the selected mode, credentials are applied as Basic Auth<br />
112112
headers, request body parameters, or only the client_id is sent (TLS).</p>
113113

114114

@@ -788,7 +788,7 @@ <h3 class="signature first" id="apply-instance_method">
788788
<div class="discussion">
789789
<p>Apply the request credentials used to authenticate to the Authorization Server</p>
790790

791-
<p>Depending on the configuration, this might be as request params or as an
791+
<p>Depending on the configuration, this might be as request params or as an<br />
792792
Authorization header.</p>
793793

794794
<p>User-provided params and header take precedence.</p>
@@ -883,7 +883,7 @@ <h3 class="signature first" id="apply-instance_method">
883883
</div>
884884

885885
<div id="footer">
886-
Generated on Fri Nov 7 21:14:34 2025 by
886+
Generated on Sat Nov 8 00:26:51 2025 by
887887
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
888888
0.9.37 (ruby-3.4.7).
889889
</div>

docs/OAuth2/Client.html

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ <h3 class="signature first" id="assertion-instance_method">
12431243
<div class="discussion">
12441244
<p>The Assertion strategy</p>
12451245

1246-
<p>This allows for assertion-based authentication where an identity provider
1246+
<p>This allows for assertion-based authentication where an identity provider<br />
12471247
asserts the identity of the user or client application seeking access.</p>
12481248

12491249

@@ -1487,7 +1487,7 @@ <h3 class="signature " id="get_token-instance_method">
14871487

14881488
<div class="note notetag">
14891489
<strong>Note:</strong>
1490-
<div class='inline'><p>The extract_access_token parameter is deprecated and will be removed in oauth2 v3.
1490+
<div class='inline'><p>The extract_access_token parameter is deprecated and will be removed in oauth2 v3.<br />
14911491
Use access_token_class on initialization instead.</p>
14921492
</div>
14931493
</div>
@@ -1523,10 +1523,12 @@ <h4 class="tag_title">Examples:</h4>
15231523

15241524

15251525
&mdash;
1526-
<div class='inline'><p>a Hash of params for the token endpoint
1527-
* params can include a ‘headers’ key with a Hash of request headers
1528-
* params can include a ‘parse’ key with the Symbol name of response parsing strategy (default: :automatic)
1529-
* params can include a ‘snaky’ key to control snake_case conversion (default: false)</p>
1526+
<div class='inline'><p>a Hash of params for the token endpoint</p>
1527+
<ul>
1528+
<li>params can include a ‘headers’ key with a Hash of request headers</li>
1529+
<li>params can include a ‘parse’ key with the Symbol name of response parsing strategy (default: :automatic)</li>
1530+
<li>params can include a ‘snaky’ key to control snake_case conversion (default: false)</li>
1531+
</ul>
15301532
</div>
15311533

15321534
</li>
@@ -1614,7 +1616,7 @@ <h4 class="tag_title">Examples:</h4>
16141616

16151617

16161618
&mdash;
1617-
<div class='inline'><p>the initialized AccessToken instance, or nil if token extraction fails
1619+
<div class='inline'><p>the initialized AccessToken instance, or nil if token extraction fails<br />
16181620
and raise_errors is false</p>
16191621
</div>
16201622

@@ -1837,14 +1839,14 @@ <h3 class="signature " id="redirection_params-instance_method">
18371839
<div class="discussion">
18381840
<p>The redirect_uri parameters, if configured</p>
18391841

1840-
<p>The redirect_uri query parameter is OPTIONAL (though encouraged) when
1841-
requesting authorization. If it is provided at authorization time it MUST
1842+
<p>The redirect_uri query parameter is OPTIONAL (though encouraged) when<br />
1843+
requesting authorization. If it is provided at authorization time it MUST<br />
18421844
also be provided with the token exchange request.</p>
18431845

1844-
<p>OAuth 2.1 note: Authorization Servers must compare redirect URIs using exact string matching.
1846+
<p>OAuth 2.1 note: Authorization Servers must compare redirect URIs using exact string matching.<br />
18451847
This client simply forwards the configured redirect_uri; the exact-match validation happens server-side.</p>
18461848

1847-
<p>Providing :redirect_uri to the OAuth2::Client instantiation will take
1849+
<p>Providing :redirect_uri to the OAuth2::Client instantiation will take<br />
18481850
care of managing this.</p>
18491851

18501852

@@ -1927,7 +1929,7 @@ <h3 class="signature " id="request-instance_method">
19271929
<div class="discussion">
19281930
<p>Makes a request relative to the specified site root.</p>
19291931

1930-
<p>Updated HTTP 1.1 specification (IETF RFC 7231) relaxed the original constraint (IETF RFC 2616),
1932+
<p>Updated HTTP 1.1 specification (IETF RFC 7231) relaxed the original constraint (IETF RFC 2616),<br />
19311933
allowing the use of relative URLs in Location headers.</p>
19321934

19331935

@@ -2039,7 +2041,7 @@ <h3 class="signature " id="request-instance_method">
20392041

20402042
</span>
20412043

2042-
&mdash; <div class='inline'><p>whether to raise an OAuth2::Error on 400+ status
2044+
&mdash; <div class='inline'><p>whether to raise an OAuth2::Error on 400+ status<br />
20432045
code response for this request. Overrides the client instance setting.</p>
20442046
</div>
20452047

@@ -2241,28 +2243,28 @@ <h3 class="signature " id="revoke_token-instance_method">
22412243

22422244
<div class="note notetag">
22432245
<strong>Note:</strong>
2244-
<div class='inline'><p>If the token passed to the request
2245-
is an access token, the server MAY revoke the respective refresh
2246+
<div class='inline'><p>If the token passed to the request<br />
2247+
is an access token, the server MAY revoke the respective refresh<br />
22462248
token as well.</p>
22472249
</div>
22482250
</div>
22492251

22502252
<div class="note notetag">
22512253
<strong>Note:</strong>
2252-
<div class='inline'><p>If the token passed to the request
2253-
is a refresh token and the authorization server supports the
2254-
revocation of access tokens, then the authorization server SHOULD
2255-
also invalidate all access tokens based on the same authorization
2254+
<div class='inline'><p>If the token passed to the request<br />
2255+
is a refresh token and the authorization server supports the<br />
2256+
revocation of access tokens, then the authorization server SHOULD<br />
2257+
also invalidate all access tokens based on the same authorization<br />
22562258
grant</p>
22572259
</div>
22582260
</div>
22592261

22602262
<div class="note notetag">
22612263
<strong>Note:</strong>
2262-
<div class='inline'><p>If the server responds with HTTP status code 503, your code must
2263-
assume the token still exists and may retry after a reasonable delay.
2264-
The server may include a “Retry-After” header in the response to
2265-
indicate how long the service is expected to be unavailable to the
2264+
<div class='inline'><p>If the server responds with HTTP status code 503, your code must<br />
2265+
assume the token still exists and may retry after a reasonable delay.<br />
2266+
The server may include a “Retry-After” header in the response to<br />
2267+
indicate how long the service is expected to be unavailable to the<br />
22662268
requesting client.</p>
22672269
</div>
22682270
</div>
@@ -2654,7 +2656,7 @@ <h3 class="signature " id="token_url-instance_method">
26542656
</div>
26552657

26562658
<div id="footer">
2657-
Generated on Fri Nov 7 21:14:33 2025 by
2659+
Generated on Sat Nov 8 00:26:51 2025 by
26582660
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
26592661
0.9.37 (ruby-3.4.7).
26602662
</div>

docs/OAuth2/Error.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h2>Overview</h2><div class="docstring">
105105
<div class="discussion">
106106
<p>Represents an OAuth2 error condition.</p>
107107

108-
<p>Wraps details from an OAuth2::Response or Hash payload returned by an
108+
<p>Wraps details from an OAuth2::Response or Hash payload returned by an<br />
109109
authorization server, exposing error code and description per RFC 6749.</p>
110110

111111

@@ -772,7 +772,7 @@ <h3 class="signature " id="response-instance_method">
772772
</div>
773773

774774
<div id="footer">
775-
Generated on Fri Nov 7 21:14:33 2025 by
775+
Generated on Sat Nov 8 00:26:51 2025 by
776776
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
777777
0.9.37 (ruby-3.4.7).
778778
</div>

docs/OAuth2/FilteredAttributes.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ <h2>Overview</h2><div class="docstring">
9292
<div class="discussion">
9393
<p>Mixin that redacts sensitive instance variables in #inspect output.</p>
9494

95-
<p>Classes include this module and declare which attributes should be filtered
96-
using filtered_attributes. Any instance variable name that includes one of
95+
<p>Classes include this module and declare which attributes should be filtered<br />
96+
using filtered_attributes. Any instance variable name that includes one of<br />
9797
those attribute names will be shown as [FILTERED] in the object’s inspect.</p>
9898

9999

@@ -202,7 +202,7 @@ <h3 class="signature first" id="included-class_method">
202202

203203
</h3><div class="docstring">
204204
<div class="discussion">
205-
<p class="note returns_void">This method returns an undefined value.</p><p>Hook invoked when the module is included. Extends the including class with
205+
<p class="note returns_void">This method returns an undefined value.</p><p>Hook invoked when the module is included. Extends the including class with<br />
206206
class-level helpers.</p>
207207

208208

@@ -335,7 +335,7 @@ <h3 class="signature first" id="inspect-instance_method">
335335
</div>
336336

337337
<div id="footer">
338-
Generated on Fri Nov 7 21:14:33 2025 by
338+
Generated on Sat Nov 8 00:26:51 2025 by
339339
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
340340
0.9.37 (ruby-3.4.7).
341341
</div>

docs/OAuth2/FilteredAttributes/ClassMethods.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h3 class="signature " id="filtered_attributes-instance_method">
280280
</div>
281281

282282
<div id="footer">
283-
Generated on Fri Nov 7 21:14:33 2025 by
283+
Generated on Sat Nov 8 00:26:51 2025 by
284284
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
285285
0.9.37 (ruby-3.4.7).
286286
</div>

0 commit comments

Comments
 (0)