Skip to content

Commit f80e69d

Browse files
committed
📝 Code fences
1 parent ca63d41 commit f80e69d

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Please file a bug if you notice a violation of semantic versioning.
4949

5050
### Added
5151

52-
- [gh!682][gh!682] - AccessToken: support Hash-based verb-dependent token transmission mode (e.g., {get: :query, post: :header})
52+
- [gh!682][gh!682] - AccessToken: support Hash-based verb-dependent token transmission mode (e.g., `{get: :query, post: :header}`)
5353

5454
[gh!682]: https://github.com/ruby-oauth/oauth2/pull/682
5555

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,16 +1107,16 @@ resp = access.get("/v1/protected")
11071107
```
11081108

11091109
Notes:
1110-
- Files must contain the appropriate PEMs. The private key may be encrypted; if so, pass a password to OpenSSL::PKey::RSA.new(File.read(path), ENV["KEY_PASSWORD"]).
1110+
- Files must contain the appropriate PEMs. The private key may be encrypted; if so, pass a password to `OpenSSL::PKey::RSA.new(File.read(path), ENV["KEY_PASSWORD"])`.
11111111
- If your certificate and key are in a PKCS#12/PFX bundle, you can load them like:
1112-
- p12 = OpenSSL::PKCS12.new(File.read("client.p12"), ENV["P12_PASSWORD"])
1113-
- client_cert = p12.certificate; client_key = p12.key
1112+
- `p12 = OpenSSL::PKCS12.new(File.read("client.p12"), ENV["P12_PASSWORD"])`
1113+
- `client_cert = p12.certificate; client_key = p12.key`
11141114
- Server trust:
1115-
- If your environment does not have system CAs, specify ca_file or ca_path inside the ssl: hash.
1116-
- Keep verify: true in production. Set verify: false only for local testing.
1117-
- Faraday adapter: Any adapter that supports Ruby’s OpenSSL should work. net_http (default) and net_http_persistent are common choices.
1115+
- If your environment does not have system CAs, specify `ca_file` or `ca_path` inside the `ssl:` hash.
1116+
- Keep `verify: true` in production. Set `verify: false` only for local testing.
1117+
- Faraday adapter: Any adapter that supports Ruby’s OpenSSL should work. `net_http` (default) and `net_http_persistent` are common choices.
11181118
- Scope of mTLS: The SSL client cert is applied to any HTTPS request made by this client (token and resource requests) to the configured site base URL (and absolute URLs you call with the same client).
1119-
- OIDC tie-in: Some OPs require tls_client_auth at the token endpoint per OIDC/OAuth specifications. That is enabled via auth_scheme: :tls_client_auth as shown above.
1119+
- OIDC tie-in: Some OPs require tls_client_auth at the token endpoint per OIDC/OAuth specifications. That is enabled via `auth_scheme: :tls_client_auth` as shown above.
11201120

11211121
#### Authentication schemes for the token request
11221122

lib/oauth2/access_token.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def no_tokens_warning(hash, key)
134134
# @option opts [FixNum, String] :expires_latency (nil) the number of seconds by which AccessToken validity will be reduced to offset latency, @version 2.0+
135135
# @option opts [Symbol, Hash, or callable] :mode (:header) the transmission mode of the Access Token parameter value:
136136
# either one of :header, :body or :query; or a Hash with verb symbols as keys mapping to one of these symbols
137-
# (e.g., {get: :query, post: :header, delete: :header}); or a callable that accepts a request-verb parameter
137+
# (e.g., `{get: :query, post: :header, delete: :header}`); or a callable that accepts a request-verb parameter
138138
# and returns one of these three symbols.
139139
# @option opts [String] :header_format ('Bearer %s') the string format to use for the Authorization header
140140
#

lib/oauth2/strategy/assertion.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def authorize_url
6666
# @see https://datatracker.ietf.org/doc/html/rfc7518#section-3.1
6767
#
6868
# The object type of `:key` may depend on the value of `:algorithm`. Sample arguments:
69-
# get_token(claim_set, {:algorithm => 'HS256', :key => 'secret_key'})
70-
# get_token(claim_set, {:algorithm => 'RS256', :key => OpenSSL::PKCS12.new(File.read('my_key.p12'), 'not_secret')})
69+
# `get_token(claim_set, {:algorithm => 'HS256', :key => 'secret_key'})`
70+
# `get_token(claim_set, {:algorithm => 'RS256', :key => OpenSSL::PKCS12.new(File.read('my_key.p12'), 'not_secret')})`
7171
#
7272
# @param [Hash] request_opts options that will be used to assemble the request
7373
# @option request_opts [String] :scope the url parameter `scope` that may be required by some endpoints

0 commit comments

Comments
 (0)