Skip to content

Commit 710c341

Browse files
committed
⬆️ yard-fence v0.5.0
1 parent dd10b32 commit 710c341

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1708
-117
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ Please file a bug if you notice a violation of semantic versioning.
2121
### Added
2222

2323
- [gh!683][gh!683], [gh!684][gh!684] - Improve documentation by @pboling
24+
- [gh!686][gh!686]- Add Incident Response Plan by @pboling
25+
- [gh!687][gh!687]- Add Threat Model by @pboling
2426

2527
### Changed
2628

27-
- [gh!685][gh!685] - upgrade kettle-dev v1.1.24 by pboling
28-
- upgrade kettle-dev v1.1.26 by pboling
29+
- [gh!685][gh!685] - upgrade kettle-dev v1.1.24 by @pboling
30+
- upgrade kettle-dev v1.1.51 by @pboling
2931
- Add open collective donors to README
3032

3133
### Deprecated
@@ -34,11 +36,16 @@ Please file a bug if you notice a violation of semantic versioning.
3436

3537
### Fixed
3638

39+
- [gh!690][gh!690] - Add yard-fence to handle braces within code fences in markdown properly by @pboling
40+
3741
### Security
3842

3943
[gh!683]: https://github.com/ruby-oauth/oauth2/pull/683
4044
[gh!684]: https://github.com/ruby-oauth/oauth2/pull/684
4145
[gh!685]: https://github.com/ruby-oauth/oauth2/pull/685
46+
[gh!686]: https://github.com/ruby-oauth/oauth2/pull/686
47+
[gh!687]: https://github.com/ruby-oauth/oauth2/pull/687
48+
[gh!690]: https://github.com/ruby-oauth/oauth2/pull/690
4249

4350
## [2.0.17] - 2025-09-15
4451

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.4.0)
314+
yard-fence (0.5.0)
315315
rdoc (~> 6.11)
316316
version_gem (~> 1.1, >= 1.1.9)
317317
yard (~> 0.9, >= 0.9.37)

OIDC.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ If any other libraries would like to be added to this list, please open an issue
1616
This document complements the inline documentation by focusing on OpenID Connect (OIDC) 1.0 usage patterns when using this gem as an OAuth 2.0 client library.
1717

1818
Scope of this document
19+
1920
- Audience: Developers building an OAuth 2.0/OIDC Relying Party (RP, aka client) in Ruby.
2021
- Non-goals: This gem does not implement an OIDC Provider (OP, aka Authorization Server); for OP/server see other projects (e.g., doorkeeper + oidc extensions).
2122
- Status: Informational documentation with links to normative specs. The gem intentionally remains protocol-agnostic beyond OAuth 2.0; OIDC specifics (like ID Token validation) must be handled by your application.
2223

2324
Key concepts refresher
25+
2426
- OAuth 2.0 delegates authorization; it does not define authentication of the end-user.
2527
- OIDC layers an identity layer on top of OAuth 2.0, introducing:
2628
- ID Token: a JWT carrying claims about the authenticated end-user and the authentication event.
@@ -29,6 +31,7 @@ Key concepts refresher
2931
- Discovery and Dynamic Client Registration (optional for providers/clients that support them).
3032

3133
What this gem provides for OIDC
34+
3235
- All OAuth 2.0 client capabilities required for OIDC flows: building authorization requests, exchanging authorization codes, refreshing tokens, and making authenticated resource requests.
3336
- Transport and parsing conveniences (snaky hash, Faraday integration, error handling, etc.).
3437
- Optional client authentication schemes useful with OIDC deployments:
@@ -38,6 +41,7 @@ What this gem provides for OIDC
3841
- private_key_jwt (OIDC-compliant when configured per OP requirements)
3942

4043
What you must add in your app for OIDC
44+
4145
- ID Token validation: This gem surfaces id_token values but does not verify them. Your app should:
4246
1) Parse the JWT (header, payload, signature)
4347
2) Fetch the OP JSON Web Key Set (JWKS) from discovery (or configure statically)
@@ -124,10 +128,12 @@ userinfo = token.get("/userinfo").parsed
124128
```
125129

126130
Notes on discovery and registration
127-
- Discovery: Most OPs publish configuration at {issuer}/.well-known/openid-configuration (OIDC Discovery 1.0). From there, resolve authorization_endpoint, token_endpoint, jwks_uri, userinfo_endpoint, etc.
131+
132+
- Discovery: Most OPs publish configuration at `{issuer}/.well-known/openid-configuration` (OIDC Discovery 1.0). From there, resolve authorization_endpoint, token_endpoint, jwks_uri, userinfo_endpoint, etc.
128133
- Dynamic Client Registration: Some OPs allow registering clients programmatically (OIDC Dynamic Client Registration 1.0). This gem does not implement registration; use a plain HTTP client or Faraday and store credentials securely.
129134

130135
Common pitfalls and tips
136+
131137
- Always request the openid scope when you expect an ID Token. Without it, the OP may behave as vanilla OAuth 2.0.
132138
- Validate ID Token signature and claims before trusting any identity data. Do not rely solely on the presence of an id_token field.
133139
- Prefer Authorization Code + PKCE. Avoid Implicit; it is discouraged in modern guidance and may be disabled by providers.
@@ -136,6 +142,7 @@ Common pitfalls and tips
136142
- When using private_key_jwt, ensure the "aud" (or token_url) and "iss/sub" claims are set per the OP’s rules, and include kid in the JWT header when required so the OP can select the right key.
137143

138144
Relevant specifications and references
145+
139146
- OpenID Connect Core 1.0: https://openid.net/specs/openid-connect-core-1_0.html
140147
- OIDC Core (final): https://openid.net/specs/openid-connect-core-1_0-final.html
141148
- How OIDC works: https://openid.net/developers/how-connect-works/
@@ -150,9 +157,11 @@ Relevant specifications and references
150157
- Spring Authorization Server’s list of OAuth2/OIDC specs: https://github.com/spring-projects/spring-authorization-server/wiki/OAuth2-and-OIDC-Specifications
151158

152159
See also
160+
153161
- README sections on OAuth 2.1 notes and OIDC notes
154162
- Strategy classes under lib/oauth2/strategy for flow helpers
155163
- Specs under spec/oauth2 for concrete usage patterns
156164

157165
Contributions welcome
166+
158167
- If you discover provider-specific nuances, consider contributing examples or clarifications (without embedding provider-specific hacks into the library).

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,8 @@ me = long_lived.get("/me", params: {fields: "id,username"}).parsed
843843

844844
Tips:
845845

846-
- Avoid query‑string bearer tokens unless required by your provider. Instagram explicitly requires it for GET.
847-
- If you need a custom rule, you can pass a Proc for mode, e.g. mode: ->(verb) { verb == :get ? :query : :header }.
846+
- Avoid query‑string bearer tokens unless required by your provider. Instagram explicitly requires it for `GET` requests.
847+
- If you need a custom rule, you can pass a `Proc` for `mode`, e.g. `mode: ->(verb) { verb == :get ? :query : :header }`.
848848

849849
### Refresh Tokens
850850

@@ -991,9 +991,9 @@ client = OAuth2::Client.new(
991991
end
992992
```
993993

994-
##### Using flat query params (Faraday::FlatParamsEncoder)
994+
##### Using flat query params (`Faraday::FlatParamsEncoder`)
995995

996-
Some APIs expect repeated key parameters to be sent as flat params rather than arrays. Faraday provides FlatParamsEncoder for this purpose. You can configure the oauth2 client to use it when building requests.
996+
Some APIs expect repeated key parameters to be sent as flat params rather than arrays. Faraday provides `FlatParamsEncoder` for this purpose. You can configure the oauth2 client to use it when building requests.
997997

998998
```ruby
999999
require "faraday"

docs/OAuth2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 19:24:48 2025 by
418+
Generated on Fri Nov 7 20:38:14 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 19:24:48 2025 by
3086+
Generated on Fri Nov 7 20:38:14 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 19:24:48 2025 by
886+
Generated on Fri Nov 7 20:38:14 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,7 @@ <h3 class="signature " id="token_url-instance_method">
26542654
</div>
26552655

26562656
<div id="footer">
2657-
Generated on Fri Nov 7 19:24:48 2025 by
2657+
Generated on Fri Nov 7 20:38:14 2025 by
26582658
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
26592659
0.9.37 (ruby-3.4.7).
26602660
</div>

docs/OAuth2/Error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ <h3 class="signature " id="response-instance_method">
772772
</div>
773773

774774
<div id="footer">
775-
Generated on Fri Nov 7 19:24:48 2025 by
775+
Generated on Fri Nov 7 20:38:14 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 19:24:48 2025 by
338+
Generated on Fri Nov 7 20:38:14 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>

0 commit comments

Comments
 (0)