silkey-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rubocop.yml +59 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +9 -0
- data/DEVELOPMENT.md +83 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +128 -0
- data/LICENSE.txt +21 -0
- data/README.md +46 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/CHANGELOG_md.html +112 -0
- data/doc/LICENSE_txt.html +99 -0
- data/doc/Object.html +117 -0
- data/doc/README_md.html +144 -0
- data/doc/Silkey.html +269 -0
- data/doc/Silkey/ClientFactory.html +106 -0
- data/doc/Silkey/Configuration.html +217 -0
- data/doc/Silkey/Contract.html +106 -0
- data/doc/Silkey/Contract/FrozenArray.html +106 -0
- data/doc/Silkey/ContractFactory.html +106 -0
- data/doc/Silkey/LoggerService.html +106 -0
- data/doc/Silkey/Models.html +99 -0
- data/doc/Silkey/Models/JwtPayload.html +622 -0
- data/doc/Silkey/RegistryContract.html +106 -0
- data/doc/Silkey/SDK.html +356 -0
- data/doc/Silkey/Utils.html +709 -0
- data/doc/created.rid +23 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +619 -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 +112 -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 +318 -0
- data/lib/silkey-sdk.rb +23 -0
- data/lib/silkey.rb +22 -0
- data/lib/silkey/abi/registry_contract_abi.json +129 -0
- data/lib/silkey/configuration.rb +24 -0
- data/lib/silkey/contract.rb +38 -0
- data/lib/silkey/factories/client_factory.rb +30 -0
- data/lib/silkey/factories/contract_factory.rb +47 -0
- data/lib/silkey/models/jwt_payload.rb +157 -0
- data/lib/silkey/registry_contract/registry_contract.rb +33 -0
- data/lib/silkey/sdk.rb +207 -0
- data/lib/silkey/services/logger_service.rb +19 -0
- data/lib/silkey/utils.rb +107 -0
- data/lib/silkey/version.rb +5 -0
- data/lib/silkey_sdk.rb +3 -0
- data/silkey-sdk.gemspec +48 -0
- metadata +332 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 151c068dbbeccc6d242140bbf755dbc2d7ac783de3c0fa9f8bed08828c875011
|
|
4
|
+
data.tar.gz: '09c21b562b50c1a66c9d72d2fd0042e6a30549941017e1e7fff4e4644bbdcfef'
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: f7505da37a916d4e26d7ebd896a432ff901ae3ee805707e924e34a832643d52fe6ddb7a52f3a0676d7170976a6cdfeb469327b8c99fd8292136313324cbfba08
|
|
7
|
+
data.tar.gz: 1f346357fc4623f9cfb54c93cbd68e000a2a4597374a3f5c39f037907da4aa1d4003611e09a6b52386816a27d481bd200b644472416e6db9adb48fcc96e01c92
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require: rubocop-performance
|
|
2
|
+
|
|
3
|
+
AllCops:
|
|
4
|
+
NewCops: enable
|
|
5
|
+
|
|
6
|
+
Exclude:
|
|
7
|
+
- 'bin/*'
|
|
8
|
+
- 'doc/*'
|
|
9
|
+
- 'exe/*'
|
|
10
|
+
- 'Gemfile'
|
|
11
|
+
- 'voucher.gemspec'
|
|
12
|
+
- 'Rakefile'
|
|
13
|
+
- 'lib/silkey-sdk.rb'
|
|
14
|
+
TargetRubyVersion: 2.6
|
|
15
|
+
|
|
16
|
+
Style/Documentation:
|
|
17
|
+
Enabled: false
|
|
18
|
+
|
|
19
|
+
Style/SignalException:
|
|
20
|
+
EnforcedStyle: only_raise
|
|
21
|
+
|
|
22
|
+
Style/UnpackFirst:
|
|
23
|
+
Enabled: false
|
|
24
|
+
|
|
25
|
+
Style/Lambda:
|
|
26
|
+
Enabled: false
|
|
27
|
+
|
|
28
|
+
Metrics/BlockLength:
|
|
29
|
+
Exclude:
|
|
30
|
+
- 'silkey-sdk.gemspec'
|
|
31
|
+
- 'spec/factories.rb'
|
|
32
|
+
ExcludedMethods: ['describe', 'context', 'let']
|
|
33
|
+
|
|
34
|
+
Layout/LineLength:
|
|
35
|
+
Max: 100
|
|
36
|
+
|
|
37
|
+
Metrics/ClassLength:
|
|
38
|
+
Max: 150
|
|
39
|
+
|
|
40
|
+
Metrics/MethodLength:
|
|
41
|
+
Max: 20
|
|
42
|
+
|
|
43
|
+
Performance/Casecmp:
|
|
44
|
+
Enabled: false
|
|
45
|
+
|
|
46
|
+
Style/PercentLiteralDelimiters:
|
|
47
|
+
PreferredDelimiters:
|
|
48
|
+
default: ()
|
|
49
|
+
'%i': ()
|
|
50
|
+
'%w': ()
|
|
51
|
+
|
|
52
|
+
Style/RedundantReturn:
|
|
53
|
+
Enabled: false
|
|
54
|
+
|
|
55
|
+
Style/AccessorGrouping:
|
|
56
|
+
Enabled: false
|
|
57
|
+
|
|
58
|
+
Style/ExpandPathArguments:
|
|
59
|
+
Enabled: false
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.7.2
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
### Added:
|
|
9
|
+
- initial version
|
data/DEVELOPMENT.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Silkey-SDK for Ruby
|
|
2
|
+
|
|
3
|
+
[logo]
|
|
4
|
+
|
|
5
|
+
[slogan]
|
|
6
|
+
|
|
7
|
+
## Development
|
|
8
|
+
|
|
9
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
|
10
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
11
|
+
|
|
12
|
+
## Deploy gem
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
rm -rf doc/
|
|
16
|
+
bundle exec rdoc --main README.rdoc -x Gemfile -x Gemfile.lock -x registry_contract_abi.json -x setup -x Rakefile -x DEVELOPMENT.md
|
|
17
|
+
|
|
18
|
+
bundle exec gem build
|
|
19
|
+
|
|
20
|
+
# RubyGems saves the credentials in ~/.gem/credentials
|
|
21
|
+
bundle exec gem push silkey-sdk-...gem
|
|
22
|
+
|
|
23
|
+
# remove gem
|
|
24
|
+
bundle exec gem yank silkey-sdk -v 0.0.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
28
|
+
To release a new version, update the version number in `version.rb`, and then run
|
|
29
|
+
`bundle exec rake release`, which will create a git tag for the version,
|
|
30
|
+
push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
31
|
+
|
|
32
|
+
## Tests
|
|
33
|
+
|
|
34
|
+
### Interactive console
|
|
35
|
+
|
|
36
|
+
To quickly test you code while developing you can do:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
./bin/console
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```rb
|
|
43
|
+
# config
|
|
44
|
+
Silkey::Configuration.client_url = 'http://localhost:8545'
|
|
45
|
+
Silkey::Configuration.registry_contract_address = '0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf'
|
|
46
|
+
Silkey::RegistryContract.get_address('Name')
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Tests and Linters
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bundle exec rspec
|
|
53
|
+
bundle exec rubocop --fix
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### Init setup environment
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
https://github.com/rbenv/rbenv#installation
|
|
60
|
+
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc
|
|
61
|
+
source ~/.zshrc
|
|
62
|
+
|
|
63
|
+
# steps for fixing abort issue about ethereum.rb gem
|
|
64
|
+
|
|
65
|
+
brew update & brew upgrade & brew install openssl
|
|
66
|
+
cd /usr/local/opt/openssl@1.1/lib
|
|
67
|
+
cp libssl.1.1.dylib libcrypto.1.1.dylib /usr/local/lib/
|
|
68
|
+
cd /usr/local/lib
|
|
69
|
+
sudo ln -s libssl.1.1.dylib libssl.dylib
|
|
70
|
+
sudo ln -s libcrypto.1.1.dylib libcrypto.dylib
|
|
71
|
+
|
|
72
|
+
https://github.com/se3000/ruby-eth/issues/47
|
|
73
|
+
|
|
74
|
+
which ruby
|
|
75
|
+
|
|
76
|
+
gem install bundler
|
|
77
|
+
bundle config set path '.bundle'
|
|
78
|
+
bundle install
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Gemfile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
4
|
+
|
|
5
|
+
# Specify your gem's dependencies in andromeda.gemspec
|
|
6
|
+
|
|
7
|
+
#source 'https://hwGZD769AGZu5Wyzp87F@repo.fury.io/silkey/' do
|
|
8
|
+
# gem 'ethereum.rb', '~> 2.2.3'
|
|
9
|
+
#end
|
|
10
|
+
|
|
11
|
+
gemspec
|
|
12
|
+
|
|
13
|
+
gem "rspec"
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
silkey-sdk (0.0.1)
|
|
5
|
+
activesupport (~> 6.0)
|
|
6
|
+
eth (~> 0.4.12)
|
|
7
|
+
ethereum.rb (~> 2.5)
|
|
8
|
+
jwt (~> 2.2.2)
|
|
9
|
+
virtus (~> 1.0)
|
|
10
|
+
virtus_convert (~> 0.1)
|
|
11
|
+
|
|
12
|
+
GEM
|
|
13
|
+
remote: https://rubygems.org/
|
|
14
|
+
specs:
|
|
15
|
+
activesupport (6.0.3.4)
|
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
17
|
+
i18n (>= 0.7, < 2)
|
|
18
|
+
minitest (~> 5.1)
|
|
19
|
+
tzinfo (~> 1.1)
|
|
20
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
21
|
+
ast (2.4.1)
|
|
22
|
+
axiom-types (0.1.1)
|
|
23
|
+
descendants_tracker (~> 0.0.4)
|
|
24
|
+
ice_nine (~> 0.11.0)
|
|
25
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
|
26
|
+
coderay (1.1.3)
|
|
27
|
+
coercible (1.0.0)
|
|
28
|
+
descendants_tracker (~> 0.0.1)
|
|
29
|
+
concurrent-ruby (1.1.7)
|
|
30
|
+
descendants_tracker (0.0.4)
|
|
31
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
|
32
|
+
diff-lcs (1.4.4)
|
|
33
|
+
digest-sha3 (1.1.0)
|
|
34
|
+
digest-sha3-patched (1.1.1)
|
|
35
|
+
equalizer (0.0.11)
|
|
36
|
+
eth (0.4.12)
|
|
37
|
+
digest-sha3-patched (~> 1.1)
|
|
38
|
+
ffi (~> 1.0)
|
|
39
|
+
money-tree (~> 0.10.0)
|
|
40
|
+
rlp (~> 0.7.3)
|
|
41
|
+
scrypt (~> 3.0.6)
|
|
42
|
+
ethereum.rb (2.5)
|
|
43
|
+
activesupport (>= 4.0)
|
|
44
|
+
digest-sha3 (~> 1.1)
|
|
45
|
+
factory_bot (6.1.0)
|
|
46
|
+
activesupport (>= 5.0.0)
|
|
47
|
+
ffi (1.13.1)
|
|
48
|
+
ffi-compiler (1.0.1)
|
|
49
|
+
ffi (>= 1.0.0)
|
|
50
|
+
rake
|
|
51
|
+
i18n (1.8.5)
|
|
52
|
+
concurrent-ruby (~> 1.0)
|
|
53
|
+
ice_nine (0.11.2)
|
|
54
|
+
jwt (2.2.2)
|
|
55
|
+
method_source (1.0.0)
|
|
56
|
+
minitest (5.14.2)
|
|
57
|
+
money-tree (0.10.0)
|
|
58
|
+
ffi
|
|
59
|
+
parallel (1.20.0)
|
|
60
|
+
parser (2.7.2.0)
|
|
61
|
+
ast (~> 2.4.1)
|
|
62
|
+
pry (0.13.1)
|
|
63
|
+
coderay (~> 1.1)
|
|
64
|
+
method_source (~> 1.0)
|
|
65
|
+
rainbow (3.0.0)
|
|
66
|
+
rake (13.0.1)
|
|
67
|
+
rdoc (6.2.1)
|
|
68
|
+
regexp_parser (1.8.2)
|
|
69
|
+
rexml (3.2.4)
|
|
70
|
+
rlp (0.7.3)
|
|
71
|
+
rspec (3.10.0)
|
|
72
|
+
rspec-core (~> 3.10.0)
|
|
73
|
+
rspec-expectations (~> 3.10.0)
|
|
74
|
+
rspec-mocks (~> 3.10.0)
|
|
75
|
+
rspec-core (3.10.0)
|
|
76
|
+
rspec-support (~> 3.10.0)
|
|
77
|
+
rspec-expectations (3.10.0)
|
|
78
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
79
|
+
rspec-support (~> 3.10.0)
|
|
80
|
+
rspec-mocks (3.10.0)
|
|
81
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
82
|
+
rspec-support (~> 3.10.0)
|
|
83
|
+
rspec-support (3.10.0)
|
|
84
|
+
rubocop (1.3.0)
|
|
85
|
+
parallel (~> 1.10)
|
|
86
|
+
parser (>= 2.7.1.5)
|
|
87
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
88
|
+
regexp_parser (>= 1.8)
|
|
89
|
+
rexml
|
|
90
|
+
rubocop-ast (>= 1.1.1)
|
|
91
|
+
ruby-progressbar (~> 1.7)
|
|
92
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
93
|
+
rubocop-ast (1.1.1)
|
|
94
|
+
parser (>= 2.7.1.5)
|
|
95
|
+
rubocop-performance (1.8.1)
|
|
96
|
+
rubocop (>= 0.87.0)
|
|
97
|
+
rubocop-ast (>= 0.4.0)
|
|
98
|
+
ruby-progressbar (1.10.1)
|
|
99
|
+
scrypt (3.0.7)
|
|
100
|
+
ffi-compiler (>= 1.0, < 2.0)
|
|
101
|
+
thread_safe (0.3.6)
|
|
102
|
+
tzinfo (1.2.8)
|
|
103
|
+
thread_safe (~> 0.1)
|
|
104
|
+
unicode-display_width (1.7.0)
|
|
105
|
+
virtus (1.0.5)
|
|
106
|
+
axiom-types (~> 0.1)
|
|
107
|
+
coercible (~> 1.0)
|
|
108
|
+
descendants_tracker (~> 0.0, >= 0.0.3)
|
|
109
|
+
equalizer (~> 0.0, >= 0.0.9)
|
|
110
|
+
virtus_convert (0.1.0)
|
|
111
|
+
zeitwerk (2.4.1)
|
|
112
|
+
|
|
113
|
+
PLATFORMS
|
|
114
|
+
ruby
|
|
115
|
+
|
|
116
|
+
DEPENDENCIES
|
|
117
|
+
bundler (~> 2.0)
|
|
118
|
+
factory_bot (~> 6.1)
|
|
119
|
+
pry (~> 0.13)
|
|
120
|
+
rake (~> 13.0)
|
|
121
|
+
rdoc (~> 6.2, >= 6.2.1)
|
|
122
|
+
rspec
|
|
123
|
+
rubocop (~> 1.3)
|
|
124
|
+
rubocop-performance (~> 1.8)
|
|
125
|
+
silkey-sdk!
|
|
126
|
+
|
|
127
|
+
BUNDLED WITH
|
|
128
|
+
2.1.4
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Silkey
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Silkey-SDK for Ruby
|
|
2
|
+
|
|
3
|
+
[logo]
|
|
4
|
+
|
|
5
|
+
[slogan]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Integration
|
|
9
|
+
|
|
10
|
+
### Configuration
|
|
11
|
+
|
|
12
|
+
```rb
|
|
13
|
+
Silkey::Configuration.setup do |config|
|
|
14
|
+
config.client_url = 'http://localhost:8545' # for local development
|
|
15
|
+
config.client_url = 'https://kovan.infura.io/v3/:id' # for real
|
|
16
|
+
config.registry_contract_address = '--silky-registry-contrract-address--'
|
|
17
|
+
config.enable_logs = false
|
|
18
|
+
end
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[List of Silkey contract address.](https://github.com/Silkey-Team/silkey-sdk#silkey-sdk)
|
|
22
|
+
|
|
23
|
+
### Sign In with Silkey
|
|
24
|
+
|
|
25
|
+
#### Making request
|
|
26
|
+
|
|
27
|
+
[List of request parameters.](https://github.com/Silkey-Team/silkey-sdk#silkey-sdk)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
```rb
|
|
31
|
+
- Silkey::SDK.message_to_sign({params})
|
|
32
|
+
- Silkey::SDK.generate_sso_request_params(private_key, hash)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### On request callback page
|
|
36
|
+
|
|
37
|
+
`token` - get if from request params (it can be send either via POST or GET)
|
|
38
|
+
|
|
39
|
+
```rb
|
|
40
|
+
silkey_public_key = Silkey::SDK.fetch_silkey_public_key
|
|
41
|
+
Silkey::SDK.token_payload_verifier(token, silkey_public_key)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "silkey_sdk"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
require "pry"
|
|
11
|
+
Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>CHANGELOG - 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
|
+
|
|
25
|
+
|
|
26
|
+
<body id="top" role="document" class="file">
|
|
27
|
+
<nav role="navigation">
|
|
28
|
+
<div id="project-navigation">
|
|
29
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
|
30
|
+
<h2>
|
|
31
|
+
<a href="./index.html" rel="home">Home</a>
|
|
32
|
+
</h2>
|
|
33
|
+
|
|
34
|
+
<div id="table-of-contents-navigation">
|
|
35
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
|
36
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
|
37
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
42
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
43
|
+
<div id="search-field-wrapper">
|
|
44
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
45
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
46
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
47
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<ul id="search-results" aria-label="Search Results"
|
|
51
|
+
aria-busy="false" aria-expanded="false"
|
|
52
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
53
|
+
</form>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<div class="nav-section">
|
|
60
|
+
<h3>Table of Contents</h3>
|
|
61
|
+
|
|
62
|
+
<ul class="link-list" role="directory">
|
|
63
|
+
<li><a href="#label-Changelog">Changelog</a>
|
|
64
|
+
<li><a href="#label-5BUnreleased-5D">[Unreleased]</a>
|
|
65
|
+
<li><a href="#label-Added-3A">Added:</a>
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
<div id="project-metadata">
|
|
71
|
+
<div id="fileindex-section" class="nav-section">
|
|
72
|
+
<h3>Pages</h3>
|
|
73
|
+
|
|
74
|
+
<ul class="link-list">
|
|
75
|
+
|
|
76
|
+
<li><a href="./CHANGELOG_md.html">CHANGELOG</a>
|
|
77
|
+
|
|
78
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
|
79
|
+
|
|
80
|
+
<li><a href="./README_md.html">README</a>
|
|
81
|
+
|
|
82
|
+
</ul>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
</div>
|
|
86
|
+
</nav>
|
|
87
|
+
|
|
88
|
+
<main role="main" aria-label="Page CHANGELOG.md">
|
|
89
|
+
|
|
90
|
+
<h1 id="label-Changelog">Changelog<span><a href="#label-Changelog">¶</a> <a href="#top">↑</a></span></h1>
|
|
91
|
+
|
|
92
|
+
<p>All notable changes to this project will be documented in this file.</p>
|
|
93
|
+
|
|
94
|
+
<p>The format is based on <a href="http://keepachangelog.com/en/1.0.0/">Keep a Changelog</a> and this project adheres to <a href="http://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p>
|
|
95
|
+
|
|
96
|
+
<h2 id="label-5BUnreleased-5D">[Unreleased]<span><a href="#label-5BUnreleased-5D">¶</a> <a href="#top">↑</a></span></h2>
|
|
97
|
+
|
|
98
|
+
<h3 id="label-Added-3A">Added:<span><a href="#label-Added-3A">¶</a> <a href="#top">↑</a></span></h3>
|
|
99
|
+
<ul><li>
|
|
100
|
+
<p>initial version</p>
|
|
101
|
+
</li></ul>
|
|
102
|
+
|
|
103
|
+
</main>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<footer id="validator-badges" role="contentinfo">
|
|
108
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
|
109
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
|
|
110
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
111
|
+
</footer>
|
|
112
|
+
|