truelayer-signing 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +14 -0
- data/LICENSE-APACHE +176 -0
- data/LICENSE-MIT +21 -0
- data/README.md +82 -0
- data/Rakefile +8 -0
- data/doc/CHANGELOG_md.html +132 -0
- data/doc/JWT/Decode.html +97 -0
- data/doc/JWT/Encode.html +97 -0
- data/doc/JWT/JWK/EC.html +169 -0
- data/doc/JWT/JWK.html +91 -0
- data/doc/JWT.html +95 -0
- data/doc/LICENSE-APACHE.html +177 -0
- data/doc/LICENSE-MIT.html +105 -0
- data/doc/README_md.html +197 -0
- data/doc/Rakefile.html +106 -0
- data/doc/TrueLayerSigning/Config.html +211 -0
- data/doc/TrueLayerSigning/Error.html +97 -0
- data/doc/TrueLayerSigning/JwsBase.html +317 -0
- data/doc/TrueLayerSigning/JwsHeader.html +268 -0
- data/doc/TrueLayerSigning/Signer.html +186 -0
- data/doc/TrueLayerSigning/Verifier.html +327 -0
- data/doc/TrueLayerSigning.html +226 -0
- data/doc/TrueLayerSigningExamples.html +217 -0
- data/doc/created.rid +21 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +662 -0
- data/doc/examples/sign-request/Gemfile.html +99 -0
- data/doc/examples/sign-request/Gemfile_lock.html +143 -0
- data/doc/examples/sign-request/README_md.html +138 -0
- data/doc/examples/webhook-server/Gemfile.html +99 -0
- data/doc/examples/webhook-server/Gemfile_lock.html +142 -0
- data/doc/examples/webhook-server/README_md.html +139 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +118 -0
- data/doc/js/darkfish.js +84 -0
- data/doc/js/navigation.js +105 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +110 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +229 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +269 -0
- data/examples/sign-request/Gemfile +4 -0
- data/examples/sign-request/Gemfile.lock +41 -0
- data/examples/sign-request/README.md +27 -0
- data/examples/sign-request/main.rb +46 -0
- data/examples/webhook-server/Gemfile +3 -0
- data/examples/webhook-server/Gemfile.lock +15 -0
- data/examples/webhook-server/README.md +30 -0
- data/examples/webhook-server/main.rb +98 -0
- data/lib/truelayer-signing/config.rb +21 -0
- data/lib/truelayer-signing/errors.rb +3 -0
- data/lib/truelayer-signing/jwt.rb +20 -0
- data/lib/truelayer-signing/signer.rb +34 -0
- data/lib/truelayer-signing/utils.rb +90 -0
- data/lib/truelayer-signing/verifier.rb +76 -0
- data/lib/truelayer-signing.rb +35 -0
- data/test/test-truelayer-signing.rb +372 -0
- data/truelayer-signing.gemspec +25 -0
- metadata +151 -0
data/doc/README_md.html
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>README - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="file">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
<div class="nav-section">
|
58
|
+
<h3>Table of Contents</h3>
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
<ul class="link-list" role="directory">
|
63
|
+
<li>
|
64
|
+
<details open>
|
65
|
+
<summary> <a href="#label-truelayer-signing">truelayer-signing</a>
|
66
|
+
</summary>
|
67
|
+
<ul class="link-list" role="directory">
|
68
|
+
<li> <a href="#label-Installation">Installation</a>
|
69
|
+
<li> <a href="#label-Configuration">Configuration</a>
|
70
|
+
<li> <a href="#label-Generating+a+signature">Generating a signature</a>
|
71
|
+
<li> <a href="#label-Verifying+webhooks">Verifying webhooks</a>
|
72
|
+
<li> <a href="#label-Testing">Testing</a>
|
73
|
+
|
74
|
+
</ul>
|
75
|
+
</details>
|
76
|
+
</li>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
|
82
|
+
<div id="project-metadata">
|
83
|
+
|
84
|
+
<div id="fileindex-section" class="nav-section">
|
85
|
+
<h3>Pages</h3>
|
86
|
+
|
87
|
+
<ul class="link-list">
|
88
|
+
<li><a href="./CHANGELOG_md.html">CHANGELOG</a>
|
89
|
+
<li><a href="./LICENSE-APACHE.html">LICENSE-APACHE</a>
|
90
|
+
<li><a href="./LICENSE-MIT.html">LICENSE-MIT</a>
|
91
|
+
<li><a href="./README_md.html">README</a>
|
92
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
93
|
+
<li><details><summary>examples</summary>
|
94
|
+
<ul class="link-list">
|
95
|
+
<li><a href="./examples/sign-request/Gemfile.html">Gemfile</a>
|
96
|
+
<li><a href="./examples/sign-request/Gemfile_lock.html">Gemfile.lock</a>
|
97
|
+
<li><a href="./examples/sign-request/README_md.html">README</a>
|
98
|
+
<li><a href="./examples/webhook-server/Gemfile.html">Gemfile</a>
|
99
|
+
<li><a href="./examples/webhook-server/Gemfile_lock.html">Gemfile.lock</a>
|
100
|
+
<li><a href="./examples/webhook-server/README_md.html">README</a>
|
101
|
+
</ul></details>
|
102
|
+
</ul>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
</nav>
|
107
|
+
|
108
|
+
<main role="main" aria-label="Page README.md">
|
109
|
+
|
110
|
+
<h1 id="label-truelayer-signing">truelayer-signing<span><a href="#label-truelayer-signing">¶</a> <a href="#top">↑</a></span></h1>
|
111
|
+
|
112
|
+
<p>Ruby gem to produce and verify TrueLayer API requests signatures.</p>
|
113
|
+
|
114
|
+
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#top">↑</a></span></h2>
|
115
|
+
|
116
|
+
<p>You can install the gem manually using:</p>
|
117
|
+
|
118
|
+
<pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-identifier">install</span> <span class="ruby-identifier">truelayer</span><span class="ruby-operator">-</span><span class="ruby-identifier">signing</span>
|
119
|
+
</pre>
|
120
|
+
|
121
|
+
<p>Alternatively you can add it to your <code>Gemfile</code> to install it with Bundler:</p>
|
122
|
+
|
123
|
+
<pre class="ruby"><span class="ruby-identifier">source</span> <span class="ruby-string">"https://rubygems.org"</span>
|
124
|
+
|
125
|
+
<span class="ruby-identifier">gem</span> <span class="ruby-string">"truelayer-signing"</span>
|
126
|
+
</pre>
|
127
|
+
|
128
|
+
<h2 id="label-Configuration">Configuration<span><a href="#label-Configuration">¶</a> <a href="#top">↑</a></span></h2>
|
129
|
+
|
130
|
+
<p>You will need to set a couple of environment variables in order to be able to use this library:</p>
|
131
|
+
<ul><li>
|
132
|
+
<p><code>TRUELAYER_SIGNING_CERTIFICATE_ID</code> (defaults to <code>nil</code>)</p>
|
133
|
+
</li><li>
|
134
|
+
<p><code>TRUELAYER_SIGNING_PRIVATE_KEY</code> (defaults to <code>nil</code>)</p>
|
135
|
+
</li></ul>
|
136
|
+
|
137
|
+
<p>The private key can be generated by following our <a href="https://docs.truelayer.com/docs/sign-your-requests-for-payments-v3#generate-a-signing-key-pair">request-signing documentation</a> and the certificate ID (a.k.a. KID) will be available to you once you have shared your public key through the <a href="https://console.truelayer.com/payments/v3/settings">Payments API settings</a> page of our developer console.</p>
|
138
|
+
|
139
|
+
<p>Those two environment variables will automatically be picked-up by our library, but you can also choose to set them directly in your application code:</p>
|
140
|
+
|
141
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">"truelayer-signing"</span>
|
142
|
+
|
143
|
+
<span class="ruby-constant">TrueLayerSigning</span>.<span class="ruby-identifier">certificate_id</span> = <span class="ruby-string">"your-certificate-id"</span>
|
144
|
+
<span class="ruby-constant">TrueLayerSigning</span>.<span class="ruby-identifier">private_key</span> = <span class="ruby-string">"your-private-key"</span>
|
145
|
+
</pre>
|
146
|
+
|
147
|
+
<h2 id="label-Generating+a+signature">Generating a signature<span><a href="#label-Generating+a+signature">¶</a> <a href="#top">↑</a></span></h2>
|
148
|
+
|
149
|
+
<pre class="ruby"><span class="ruby-comment"># `Tl-Signature` header value to send with the request</span>
|
150
|
+
<span class="ruby-identifier">tl_signature</span> = <span class="ruby-constant">TrueLayerSigning</span>.<span class="ruby-identifier">sign_with_pem</span>
|
151
|
+
.<span class="ruby-identifier">set_method</span>(<span class="ruby-string">"POST"</span>)
|
152
|
+
.<span class="ruby-identifier">set_path</span>(<span class="ruby-identifier">path</span>)
|
153
|
+
.<span class="ruby-identifier">add_header</span>(<span class="ruby-string">"Idempotency-Key"</span>, <span class="ruby-identifier">idempotency_key</span>)
|
154
|
+
.<span class="ruby-identifier">set_body</span>(<span class="ruby-identifier">body</span>)
|
155
|
+
.<span class="ruby-identifier">sign</span>
|
156
|
+
</pre>
|
157
|
+
|
158
|
+
<p>See full example of <a href="examples/sign-request">request signing</a>.</p>
|
159
|
+
|
160
|
+
<h2 id="label-Verifying+webhooks">Verifying webhooks<span><a href="#label-Verifying+webhooks">¶</a> <a href="#top">↑</a></span></h2>
|
161
|
+
|
162
|
+
<p>The <code>verify_with_jwks</code> method may be used to verify webhook <code>Tl-Signature</code> header signatures.</p>
|
163
|
+
|
164
|
+
<pre class="ruby"><span class="ruby-comment"># `jku` field is included in webhook signatures</span>
|
165
|
+
<span class="ruby-identifier">jws_header</span> = <span class="ruby-constant">TrueLayerSigning</span>.<span class="ruby-identifier">extract_jws_header</span>(<span class="ruby-identifier">webhook_signature</span>).<span class="ruby-identifier">jku</span>
|
166
|
+
|
167
|
+
<span class="ruby-comment"># check `jku` is an allowed TrueLayer URL and fetch jwks JSON (not provided by this library)</span>
|
168
|
+
<span class="ruby-identifier">ensure_jku_allowed</span>(<span class="ruby-identifier">jws_header</span>)
|
169
|
+
<span class="ruby-identifier">jwks</span> = <span class="ruby-identifier">fetch_jwks</span>(<span class="ruby-identifier">jws_header</span>)
|
170
|
+
|
171
|
+
<span class="ruby-comment"># jwks may be used directly to verify a signature</span>
|
172
|
+
<span class="ruby-constant">TrueLayerSigning</span>.<span class="ruby-identifier">verify_with_jwks</span>(<span class="ruby-identifier">jwks</span>)
|
173
|
+
.<span class="ruby-identifier">set_method</span>(<span class="ruby-identifier">method</span>)
|
174
|
+
.<span class="ruby-identifier">set_path</span>(<span class="ruby-identifier">path</span>)
|
175
|
+
.<span class="ruby-identifier">set_headers</span>(<span class="ruby-identifier">headers</span>)
|
176
|
+
.<span class="ruby-identifier">set_body</span>(<span class="ruby-identifier">body</span>)
|
177
|
+
.<span class="ruby-identifier">verify</span>(<span class="ruby-identifier">tl_signature</span>)
|
178
|
+
</pre>
|
179
|
+
|
180
|
+
<p>See full example of <a href="examples/webhook-server">signature verification</a>.</p>
|
181
|
+
|
182
|
+
<h2 id="label-Testing">Testing<span><a href="#label-Testing">¶</a> <a href="#top">↑</a></span></h2>
|
183
|
+
|
184
|
+
<p>Run the test suite from this <code>truelayer-signing/ruby</code> folder:</p>
|
185
|
+
|
186
|
+
<pre>$ rake test</pre>
|
187
|
+
|
188
|
+
</main>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
<footer id="validator-badges" role="contentinfo">
|
193
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
194
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.5.0.
|
195
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
196
|
+
</footer>
|
197
|
+
|
data/doc/Rakefile.html
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Rakefile - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="file">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="project-metadata">
|
59
|
+
|
60
|
+
<div id="fileindex-section" class="nav-section">
|
61
|
+
<h3>Pages</h3>
|
62
|
+
|
63
|
+
<ul class="link-list">
|
64
|
+
<li><a href="./CHANGELOG_md.html">CHANGELOG</a>
|
65
|
+
<li><a href="./LICENSE-APACHE.html">LICENSE-APACHE</a>
|
66
|
+
<li><a href="./LICENSE-MIT.html">LICENSE-MIT</a>
|
67
|
+
<li><a href="./README_md.html">README</a>
|
68
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
69
|
+
<li><details><summary>examples</summary>
|
70
|
+
<ul class="link-list">
|
71
|
+
<li><a href="./examples/sign-request/Gemfile.html">Gemfile</a>
|
72
|
+
<li><a href="./examples/sign-request/Gemfile_lock.html">Gemfile.lock</a>
|
73
|
+
<li><a href="./examples/sign-request/README_md.html">README</a>
|
74
|
+
<li><a href="./examples/webhook-server/Gemfile.html">Gemfile</a>
|
75
|
+
<li><a href="./examples/webhook-server/Gemfile_lock.html">Gemfile.lock</a>
|
76
|
+
<li><a href="./examples/webhook-server/README_md.html">README</a>
|
77
|
+
</ul></details>
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
</nav>
|
83
|
+
|
84
|
+
<main role="main" aria-label="Page Rakefile">
|
85
|
+
|
86
|
+
<p>require “rake/testtask”</p>
|
87
|
+
|
88
|
+
<p>Rake::TestTask.new do |t|</p>
|
89
|
+
|
90
|
+
<pre class="ruby"><span class="ruby-identifier">t</span>.<span class="ruby-identifier">libs</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"test"</span>
|
91
|
+
</pre>
|
92
|
+
|
93
|
+
<p>end</p>
|
94
|
+
|
95
|
+
<p>desc “Run tests” task default: :test</p>
|
96
|
+
|
97
|
+
</main>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<footer id="validator-badges" role="contentinfo">
|
102
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
103
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.5.0.
|
104
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
105
|
+
</footer>
|
106
|
+
|
@@ -0,0 +1,211 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class TrueLayerSigning::Config - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li ><a href="#method-c-new">::new</a>
|
76
|
+
<li ><a href="#method-c-setup">::setup</a>
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
<main role="main" aria-labelledby="class-TrueLayerSigning::Config">
|
84
|
+
<h1 id="class-TrueLayerSigning::Config" class="class">
|
85
|
+
class TrueLayerSigning::Config
|
86
|
+
</h1>
|
87
|
+
|
88
|
+
<section class="description">
|
89
|
+
|
90
|
+
</section>
|
91
|
+
|
92
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<section class="attribute-method-details" class="method-section">
|
97
|
+
<header>
|
98
|
+
<h3>Attributes</h3>
|
99
|
+
</header>
|
100
|
+
|
101
|
+
<div id="attribute-i-algorithm" class="method-detail">
|
102
|
+
<div class="method-heading attribute-method-heading">
|
103
|
+
<span class="method-name">algorithm</span><span
|
104
|
+
class="attribute-access-type">[R]</span>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div class="method-description">
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div id="attribute-i-certificate_id" class="method-detail">
|
112
|
+
<div class="method-heading attribute-method-heading">
|
113
|
+
<span class="method-name">certificate_id</span><span
|
114
|
+
class="attribute-access-type">[RW]</span>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div class="method-description">
|
118
|
+
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
<div id="attribute-i-private_key" class="method-detail">
|
122
|
+
<div class="method-heading attribute-method-heading">
|
123
|
+
<span class="method-name">private_key</span><span
|
124
|
+
class="attribute-access-type">[RW]</span>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="method-description">
|
128
|
+
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
<div id="attribute-i-version" class="method-detail">
|
132
|
+
<div class="method-heading attribute-method-heading">
|
133
|
+
<span class="method-name">version</span><span
|
134
|
+
class="attribute-access-type">[R]</span>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="method-description">
|
138
|
+
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
</section>
|
142
|
+
|
143
|
+
|
144
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
145
|
+
<header>
|
146
|
+
<h3>Public Class Methods</h3>
|
147
|
+
</header>
|
148
|
+
|
149
|
+
<div id="method-c-new" class="method-detail ">
|
150
|
+
<div class="method-header">
|
151
|
+
<div class="method-heading">
|
152
|
+
<span class="method-name">new</span><span
|
153
|
+
class="method-args">()</span>
|
154
|
+
<span class="method-click-advice">click to toggle source</span>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
<p>@return [TrueLayerSigning::Config]</p>
|
160
|
+
|
161
|
+
<div class="method-source-code" id="new-source">
|
162
|
+
<pre><span class="ruby-comment"># File lib/truelayer-signing/config.rb, line 14</span>
|
163
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
|
164
|
+
<span class="ruby-ivar">@algorithm</span> = <span class="ruby-string">"ES512"</span>.<span class="ruby-identifier">freeze</span>
|
165
|
+
<span class="ruby-ivar">@certificate_id</span> = <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-string">"TRUELAYER_SIGNING_CERTIFICATE_ID"</span>, <span class="ruby-keyword">nil</span>).<span class="ruby-identifier">freeze</span>
|
166
|
+
<span class="ruby-ivar">@private_key</span> = <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-string">"TRUELAYER_SIGNING_PRIVATE_KEY"</span>, <span class="ruby-keyword">nil</span>)&.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/\\n/</span>, <span class="ruby-string">"\n"</span>).<span class="ruby-identifier">freeze</span>
|
167
|
+
<span class="ruby-ivar">@version</span> = <span class="ruby-string">"2"</span>.<span class="ruby-identifier">freeze</span>
|
168
|
+
<span class="ruby-keyword">end</span></pre>
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<div id="method-c-setup" class="method-detail ">
|
176
|
+
<div class="method-header">
|
177
|
+
<div class="method-heading">
|
178
|
+
<span class="method-name">setup</span><span
|
179
|
+
class="method-args">() { |instance| ... }</span>
|
180
|
+
<span class="method-click-advice">click to toggle source</span>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<div class="method-description">
|
185
|
+
<p>@return [TrueLayerSigning::Config]</p>
|
186
|
+
|
187
|
+
<div class="method-source-code" id="setup-source">
|
188
|
+
<pre><span class="ruby-comment"># File lib/truelayer-signing/config.rb, line 7</span>
|
189
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">setup</span>
|
190
|
+
<span class="ruby-identifier">new</span>.<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">instance</span><span class="ruby-operator">|</span>
|
191
|
+
<span class="ruby-keyword">yield</span>(<span class="ruby-identifier">instance</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
|
192
|
+
<span class="ruby-keyword">end</span>
|
193
|
+
<span class="ruby-keyword">end</span></pre>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</section>
|
201
|
+
|
202
|
+
</section>
|
203
|
+
</main>
|
204
|
+
|
205
|
+
|
206
|
+
<footer id="validator-badges" role="contentinfo">
|
207
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
208
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.5.0.
|
209
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
210
|
+
</footer>
|
211
|
+
|
@@ -0,0 +1,97 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class TrueLayerSigning::Error - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">StandardError
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</div>
|
71
|
+
</nav>
|
72
|
+
|
73
|
+
<main role="main" aria-labelledby="class-TrueLayerSigning::Error">
|
74
|
+
<h1 id="class-TrueLayerSigning::Error" class="class">
|
75
|
+
class TrueLayerSigning::Error
|
76
|
+
</h1>
|
77
|
+
|
78
|
+
<section class="description">
|
79
|
+
|
80
|
+
</section>
|
81
|
+
|
82
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
</section>
|
89
|
+
</main>
|
90
|
+
|
91
|
+
|
92
|
+
<footer id="validator-badges" role="contentinfo">
|
93
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
94
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.5.0.
|
95
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
96
|
+
</footer>
|
97
|
+
|