app_store_connect_jwt 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +6 -0
- data/.github/workflows/lint.yml +20 -0
- data/.github/workflows/{publish.yml → push.yml} +1 -1
- data/.github/workflows/test.yml +2 -2
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +22 -9
- data/_config.yml +2 -0
- data/docs/AppStoreConnect.html +117 -0
- data/docs/AppStoreConnect/JWT.html +421 -0
- data/docs/AppStoreConnect/JWT/CLI.html +127 -0
- data/docs/AppStoreConnect/JWT/Utils.html +641 -0
- data/docs/_index.html +152 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +113 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +113 -0
- data/docs/js/app.js +303 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +107 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/app_store_connect/jwt/version.rb +1 -1
- data/lib/tasks/push.rake +8 -8
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16ddd2cde27f637d5355ad0d94ca0945f0edb8d90aec6649a5cddc8dc77b45c1
|
4
|
+
data.tar.gz: b6f3723a7ac022a313246862f53331f2851854e9413f810e09a5f73ff0e7b8ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 109111b771884d9744fdabfff2ea33a7eed6a2eb77e34028877f67a9502c7fbb10719febb2d81ccb1472f35fc6d2474f2ba168e08006f6404daca6e7b8220596
|
7
|
+
data.tar.gz: e2ce821c2d4238c712de4c22b1ddc1bd5c3f4fc46473f2bd3b109460e77b3b833c7f4ec88b371b3ede554f584762795ca04ec3f353a86be62fc7783f79008898
|
data/.codeclimate.yml
ADDED
data/.github/workflows/lint.yml
CHANGED
@@ -3,6 +3,8 @@ name: Lint
|
|
3
3
|
|
4
4
|
on:
|
5
5
|
push:
|
6
|
+
tags-ignore:
|
7
|
+
- v*
|
6
8
|
|
7
9
|
jobs:
|
8
10
|
yamllint:
|
@@ -20,6 +22,24 @@ jobs:
|
|
20
22
|
pip install --user --no-warn-script-location yamllint
|
21
23
|
- name: Run
|
22
24
|
run: /home/runner/.local/bin/yamllint .
|
25
|
+
- name: Set up Ruby 2.6
|
26
|
+
uses: actions/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: 2.6.x
|
29
|
+
|
30
|
+
markdownlint:
|
31
|
+
name: markdownlint
|
32
|
+
runs-on: ubuntu-latest
|
33
|
+
steps:
|
34
|
+
- uses: actions/checkout@master
|
35
|
+
- name: Set up Ruby 2.6
|
36
|
+
uses: actions/setup-ruby@v1
|
37
|
+
with:
|
38
|
+
ruby-version: 2.6.x
|
39
|
+
- name: Install
|
40
|
+
run: gem install mdl
|
41
|
+
- name: Run
|
42
|
+
run: mdl README.md
|
23
43
|
|
24
44
|
rubocop:
|
25
45
|
name: rubocop
|
data/.github/workflows/test.yml
CHANGED
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,40 +1,53 @@
|
|
1
1
|
# App Store Connect–JWT
|
2
2
|
|
3
|
-
![Test](https://github.com/kyledecot/app_store_connect_jwt/workflows/Test/badge.svg)
|
3
|
+
![Test](https://github.com/kyledecot/app_store_connect_jwt/workflows/Test/badge.svg)
|
4
|
+
![Lint](https://github.com/kyledecot/app_store_connect_jwt/workflows/Lint/badge.svg)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/app_store_connect_jwt.svg)](https://badge.fury.io/rb/app_store_connect_jwt)
|
6
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/e13c94f97898e74f34a9/maintainability)](https://codeclimate.com/github/kyledecot/app_store_connect_jwt/maintainability)
|
7
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/e13c94f97898e74f34a9/test_coverage)](https://codeclimate.com/github/kyledecot/app_store_connect_jwt/test_coverage)
|
4
8
|
|
5
|
-
Encode & decode App Store Connect API JWTs
|
9
|
+
Encode & decode App Store Connect API JWTs
|
10
|
+
(JSON Web Tokens) according to Apple's Documentation:
|
6
11
|
|
7
|
-
https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests
|
12
|
+
<https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests>
|
8
13
|
|
9
14
|
## Installation
|
10
15
|
|
11
16
|
Add this line to your application's Gemfile:
|
12
17
|
|
13
18
|
```ruby
|
14
|
-
gem 'app_store_connect_jwt',
|
19
|
+
gem 'app_store_connect_jwt',
|
20
|
+
require: 'app_store_connect/jwt'
|
15
21
|
```
|
16
22
|
|
17
23
|
And then execute:
|
18
24
|
|
19
|
-
|
25
|
+
```sh
|
26
|
+
bundle
|
27
|
+
```
|
20
28
|
|
21
29
|
Or install it yourself as:
|
22
30
|
|
23
|
-
|
31
|
+
```sh
|
32
|
+
gem install app_store_connect_jwt
|
33
|
+
```
|
24
34
|
|
25
35
|
## Usage
|
26
36
|
|
27
|
-
Check out the [Wiki](https://github.com/kyledecot/app_store_connect_jwt/wiki)
|
37
|
+
Check out the [Wiki](https://github.com/kyledecot/app_store_connect_jwt/wiki)
|
38
|
+
for example usage.
|
28
39
|
|
29
40
|
## Development
|
30
41
|
|
31
|
-
After checking out the repo, run `bin/setup` to install dependencies.
|
42
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
43
|
+
Then, run `rake spec` to run the tests. You can also run `rake console`
|
44
|
+
for an interactive prompt that will allow you to experiment.
|
32
45
|
|
33
46
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
34
47
|
|
35
48
|
## Contributing
|
36
49
|
|
37
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/kyledecot/app_store_connect_jwt
|
50
|
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/kyledecot/app_store_connect_jwt>.
|
38
51
|
|
39
52
|
## License
|
40
53
|
|
data/_config.yml
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: AppStoreConnect
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "AppStoreConnect";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (A)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">AppStoreConnect</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: AppStoreConnect
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/app_store_connect.rb<span class="defines">,<br />
|
82
|
+
lib/app_store_connect/jwt.rb,<br /> lib/app_store_connect/jwt/cli.rb,<br /> lib/app_store_connect/jwt/utils.rb,<br /> lib/app_store_connect/jwt/version.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Defined Under Namespace</h2>
|
89
|
+
<p class="children">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="AppStoreConnect/JWT.html" title="AppStoreConnect::JWT (class)">JWT</a></span>
|
95
|
+
|
96
|
+
|
97
|
+
</p>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<div id="footer">
|
110
|
+
Generated on Sat Feb 29 23:35:50 2020 by
|
111
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
112
|
+
0.9.20 (ruby-2.6.5).
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</body>
|
117
|
+
</html>
|
@@ -0,0 +1,421 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: AppStoreConnect::JWT
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "AppStoreConnect::JWT";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (J)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../AppStoreConnect.html" title="AppStoreConnect (module)">AppStoreConnect</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">JWT</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: AppStoreConnect::JWT
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">AppStoreConnect::JWT</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/app_store_connect/jwt.rb<span class="defines">,<br />
|
98
|
+
lib/app_store_connect/jwt/cli.rb,<br /> lib/app_store_connect/jwt/utils.rb,<br /> lib/app_store_connect/jwt/version.rb</span>
|
99
|
+
</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Defined Under Namespace</h2>
|
105
|
+
<p class="children">
|
106
|
+
|
107
|
+
|
108
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="JWT/Utils.html" title="AppStoreConnect::JWT::Utils (module)">Utils</a></span>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="JWT/CLI.html" title="AppStoreConnect::JWT::CLI (class)">CLI</a></span>
|
113
|
+
|
114
|
+
|
115
|
+
</p>
|
116
|
+
|
117
|
+
|
118
|
+
<h2>
|
119
|
+
Constant Summary
|
120
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
121
|
+
</h2>
|
122
|
+
|
123
|
+
<dl class="constants">
|
124
|
+
|
125
|
+
<dt id="AUDIENCE-constant" class="">AUDIENCE =
|
126
|
+
|
127
|
+
</dt>
|
128
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>appstoreconnect-v1</span><span class='tstring_end'>'</span></span></pre></dd>
|
129
|
+
|
130
|
+
<dt id="ALGORITHM-constant" class="">ALGORITHM =
|
131
|
+
|
132
|
+
</dt>
|
133
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ES256</span><span class='tstring_end'>'</span></span></pre></dd>
|
134
|
+
|
135
|
+
<dt id="VERSION-constant" class="">VERSION =
|
136
|
+
|
137
|
+
</dt>
|
138
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.7.0</span><span class='tstring_end'>'</span></span></pre></dd>
|
139
|
+
|
140
|
+
</dl>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<h2>
|
151
|
+
Class Method Summary
|
152
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
153
|
+
</h2>
|
154
|
+
|
155
|
+
<ul class="summary">
|
156
|
+
|
157
|
+
<li class="public ">
|
158
|
+
<span class="summary_signature">
|
159
|
+
|
160
|
+
<a href="#decode-class_method" title="decode (class method)">.<strong>decode</strong>(token:, private_key_path:) ⇒ Array<Hash> </a>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
</span>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
175
|
+
|
176
|
+
</li>
|
177
|
+
|
178
|
+
|
179
|
+
<li class="public ">
|
180
|
+
<span class="summary_signature">
|
181
|
+
|
182
|
+
<a href="#encode-class_method" title="encode (class method)">.<strong>encode</strong>(issuer_id:, key_id:, private_key_path:) ⇒ String </a>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
</span>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
197
|
+
|
198
|
+
</li>
|
199
|
+
|
200
|
+
|
201
|
+
</ul>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<div id="class_method_details" class="method_details_list">
|
207
|
+
<h2>Class Method Details</h2>
|
208
|
+
|
209
|
+
|
210
|
+
<div class="method_details first">
|
211
|
+
<h3 class="signature first" id="decode-class_method">
|
212
|
+
|
213
|
+
.<strong>decode</strong>(token:, private_key_path:) ⇒ <tt>Array<Hash></tt>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
</h3><div class="docstring">
|
220
|
+
<div class="discussion">
|
221
|
+
|
222
|
+
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
<div class="tags">
|
226
|
+
<p class="tag_title">Parameters:</p>
|
227
|
+
<ul class="param">
|
228
|
+
|
229
|
+
<li>
|
230
|
+
|
231
|
+
<span class='name'>token</span>
|
232
|
+
|
233
|
+
|
234
|
+
<span class='type'>(<tt>String</tt>)</span>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
</li>
|
239
|
+
|
240
|
+
<li>
|
241
|
+
|
242
|
+
<span class='name'>private_key_path</span>
|
243
|
+
|
244
|
+
|
245
|
+
<span class='type'>(<tt>String</tt>)</span>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
—
|
250
|
+
<div class='inline'>
|
251
|
+
<p>Path to App Store Connect API Private Key (.p8)</p>
|
252
|
+
</div>
|
253
|
+
|
254
|
+
</li>
|
255
|
+
|
256
|
+
</ul>
|
257
|
+
|
258
|
+
<p class="tag_title">Returns:</p>
|
259
|
+
<ul class="return">
|
260
|
+
|
261
|
+
<li>
|
262
|
+
|
263
|
+
|
264
|
+
<span class='type'>(<tt>Array<Hash></tt>)</span>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</li>
|
269
|
+
|
270
|
+
</ul>
|
271
|
+
|
272
|
+
</div><table class="source_code">
|
273
|
+
<tr>
|
274
|
+
<td>
|
275
|
+
<pre class="lines">
|
276
|
+
|
277
|
+
|
278
|
+
26
|
279
|
+
27
|
280
|
+
28
|
281
|
+
29
|
282
|
+
30</pre>
|
283
|
+
</td>
|
284
|
+
<td>
|
285
|
+
<pre class="code"><span class="info file"># File 'lib/app_store_connect/jwt.rb', line 26</span>
|
286
|
+
|
287
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_decode'>decode</span><span class='lparen'>(</span><span class='label'>token:</span><span class='comma'>,</span> <span class='label'>private_key_path:</span><span class='rparen'>)</span>
|
288
|
+
<span class='id identifier rubyid_private_key'>private_key</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="JWT/Utils.html" title="AppStoreConnect::JWT::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_private_key'><span class='object_link'><a href="JWT/Utils.html#private_key-class_method" title="AppStoreConnect::JWT::Utils.private_key (method)">private_key</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_private_key_path'>private_key_path</span><span class='rparen'>)</span>
|
289
|
+
|
290
|
+
<span class='const'><span class='object_link'><a href="JWT/Utils.html" title="AppStoreConnect::JWT::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_decode'><span class='object_link'><a href="JWT/Utils.html#decode-class_method" title="AppStoreConnect::JWT::Utils.decode (method)">decode</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_private_key'>private_key</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#ALGORITHM-constant" title="AppStoreConnect::JWT::ALGORITHM (constant)">ALGORITHM</a></span></span><span class='rparen'>)</span>
|
291
|
+
<span class='kw'>end</span></pre>
|
292
|
+
</td>
|
293
|
+
</tr>
|
294
|
+
</table>
|
295
|
+
</div>
|
296
|
+
|
297
|
+
<div class="method_details ">
|
298
|
+
<h3 class="signature " id="encode-class_method">
|
299
|
+
|
300
|
+
.<strong>encode</strong>(issuer_id:, key_id:, private_key_path:) ⇒ <tt>String</tt>
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
</h3><div class="docstring">
|
307
|
+
<div class="discussion">
|
308
|
+
|
309
|
+
|
310
|
+
</div>
|
311
|
+
</div>
|
312
|
+
<div class="tags">
|
313
|
+
<p class="tag_title">Parameters:</p>
|
314
|
+
<ul class="param">
|
315
|
+
|
316
|
+
<li>
|
317
|
+
|
318
|
+
<span class='name'>issuer_id</span>
|
319
|
+
|
320
|
+
|
321
|
+
<span class='type'>(<tt>String</tt>)</span>
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
—
|
326
|
+
<div class='inline'>
|
327
|
+
<p>App Store Connect API Issuer ID</p>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
</li>
|
331
|
+
|
332
|
+
<li>
|
333
|
+
|
334
|
+
<span class='name'>key_id</span>
|
335
|
+
|
336
|
+
|
337
|
+
<span class='type'>(<tt>String</tt>)</span>
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
—
|
342
|
+
<div class='inline'>
|
343
|
+
<p>App Store Connect API Key ID</p>
|
344
|
+
</div>
|
345
|
+
|
346
|
+
</li>
|
347
|
+
|
348
|
+
<li>
|
349
|
+
|
350
|
+
<span class='name'>private_key_path</span>
|
351
|
+
|
352
|
+
|
353
|
+
<span class='type'>(<tt>String</tt>)</span>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
—
|
358
|
+
<div class='inline'>
|
359
|
+
<p>Path to App Store Connect API Private Key (.p8)</p>
|
360
|
+
</div>
|
361
|
+
|
362
|
+
</li>
|
363
|
+
|
364
|
+
</ul>
|
365
|
+
|
366
|
+
<p class="tag_title">Returns:</p>
|
367
|
+
<ul class="return">
|
368
|
+
|
369
|
+
<li>
|
370
|
+
|
371
|
+
|
372
|
+
<span class='type'>(<tt>String</tt>)</span>
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
</li>
|
377
|
+
|
378
|
+
</ul>
|
379
|
+
|
380
|
+
</div><table class="source_code">
|
381
|
+
<tr>
|
382
|
+
<td>
|
383
|
+
<pre class="lines">
|
384
|
+
|
385
|
+
|
386
|
+
15
|
387
|
+
16
|
388
|
+
17
|
389
|
+
18
|
390
|
+
19
|
391
|
+
20
|
392
|
+
21</pre>
|
393
|
+
</td>
|
394
|
+
<td>
|
395
|
+
<pre class="code"><span class="info file"># File 'lib/app_store_connect/jwt.rb', line 15</span>
|
396
|
+
|
397
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='label'>issuer_id:</span><span class='comma'>,</span> <span class='label'>key_id:</span><span class='comma'>,</span> <span class='label'>private_key_path:</span><span class='rparen'>)</span>
|
398
|
+
<span class='id identifier rubyid_payload'>payload</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="JWT/Utils.html" title="AppStoreConnect::JWT::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_payload'><span class='object_link'><a href="JWT/Utils.html#payload-class_method" title="AppStoreConnect::JWT::Utils.payload (method)">payload</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_issuer_id'>issuer_id</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#AUDIENCE-constant" title="AppStoreConnect::JWT::AUDIENCE (constant)">AUDIENCE</a></span></span><span class='rparen'>)</span>
|
399
|
+
<span class='id identifier rubyid_header_fields'>header_fields</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="JWT/Utils.html" title="AppStoreConnect::JWT::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_header_fields'><span class='object_link'><a href="JWT/Utils.html#header_fields-class_method" title="AppStoreConnect::JWT::Utils.header_fields (method)">header_fields</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_key_id'>key_id</span><span class='rparen'>)</span>
|
400
|
+
<span class='id identifier rubyid_private_key'>private_key</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="JWT/Utils.html" title="AppStoreConnect::JWT::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_private_key'><span class='object_link'><a href="JWT/Utils.html#private_key-class_method" title="AppStoreConnect::JWT::Utils.private_key (method)">private_key</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_private_key_path'>private_key_path</span><span class='rparen'>)</span>
|
401
|
+
|
402
|
+
<span class='const'><span class='object_link'><a href="JWT/Utils.html" title="AppStoreConnect::JWT::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_encode'><span class='object_link'><a href="JWT/Utils.html#encode-class_method" title="AppStoreConnect::JWT::Utils.encode (method)">encode</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_payload'>payload</span><span class='comma'>,</span> <span class='id identifier rubyid_private_key'>private_key</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#ALGORITHM-constant" title="AppStoreConnect::JWT::ALGORITHM (constant)">ALGORITHM</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_header_fields'>header_fields</span><span class='rparen'>)</span>
|
403
|
+
<span class='kw'>end</span></pre>
|
404
|
+
</td>
|
405
|
+
</tr>
|
406
|
+
</table>
|
407
|
+
</div>
|
408
|
+
|
409
|
+
</div>
|
410
|
+
|
411
|
+
</div>
|
412
|
+
|
413
|
+
<div id="footer">
|
414
|
+
Generated on Sat Feb 29 23:35:50 2020 by
|
415
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
416
|
+
0.9.20 (ruby-2.6.5).
|
417
|
+
</div>
|
418
|
+
|
419
|
+
</div>
|
420
|
+
</body>
|
421
|
+
</html>
|