silkey-sdk 0.0.1 → 0.0.2
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 +4 -4
- data/.yardopts +14 -0
- data/CHANGELOG.md +11 -1
- data/DEVELOPMENT.md +1 -1
- data/Gemfile.lock +3 -1
- data/README.md +16 -10
- data/lib/silkey/sdk.rb +51 -44
- data/lib/silkey/version.rb +1 -1
- data/silkey-sdk.gemspec +14 -1
- metadata +18 -63
- data/doc/CHANGELOG_md.html +0 -112
- data/doc/LICENSE_txt.html +0 -99
- data/doc/Object.html +0 -117
- data/doc/README_md.html +0 -144
- data/doc/Silkey.html +0 -269
- data/doc/Silkey/ClientFactory.html +0 -106
- data/doc/Silkey/Configuration.html +0 -217
- data/doc/Silkey/Contract.html +0 -106
- data/doc/Silkey/Contract/FrozenArray.html +0 -106
- data/doc/Silkey/ContractFactory.html +0 -106
- data/doc/Silkey/LoggerService.html +0 -106
- data/doc/Silkey/Models.html +0 -99
- data/doc/Silkey/Models/JwtPayload.html +0 -622
- data/doc/Silkey/RegistryContract.html +0 -106
- data/doc/Silkey/SDK.html +0 -356
- data/doc/Silkey/Utils.html +0 -709
- data/doc/created.rid +0 -23
- data/doc/css/fonts.css +0 -167
- data/doc/css/rdoc.css +0 -619
- 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 +0 -112
- data/doc/js/darkfish.js +0 -84
- data/doc/js/navigation.js +0 -105
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +0 -110
- data/doc/js/search_index.js +0 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +0 -229
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +0 -318
@@ -1,106 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class Silkey::ContractFactory - 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="class">
|
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
|
-
|
60
|
-
<div id="class-metadata">
|
61
|
-
|
62
|
-
<div id="parent-class-section" class="nav-section">
|
63
|
-
<h3>Parent</h3>
|
64
|
-
|
65
|
-
|
66
|
-
<p class="link"><a href="../Object.html">Object</a>
|
67
|
-
|
68
|
-
</div>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
</div>
|
74
|
-
</nav>
|
75
|
-
|
76
|
-
<main role="main" aria-labelledby="class-Silkey::ContractFactory">
|
77
|
-
<h1 id="class-Silkey::ContractFactory" class="class">
|
78
|
-
class Silkey::ContractFactory
|
79
|
-
</h1>
|
80
|
-
|
81
|
-
<section class="description">
|
82
|
-
|
83
|
-
</section>
|
84
|
-
|
85
|
-
|
86
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
</section>
|
97
|
-
|
98
|
-
</main>
|
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.2.1.
|
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
|
-
|
@@ -1,106 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class Silkey::LoggerService - 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="class">
|
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
|
-
|
60
|
-
<div id="class-metadata">
|
61
|
-
|
62
|
-
<div id="parent-class-section" class="nav-section">
|
63
|
-
<h3>Parent</h3>
|
64
|
-
|
65
|
-
|
66
|
-
<p class="link"><a href="../Object.html">Object</a>
|
67
|
-
|
68
|
-
</div>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
</div>
|
74
|
-
</nav>
|
75
|
-
|
76
|
-
<main role="main" aria-labelledby="class-Silkey::LoggerService">
|
77
|
-
<h1 id="class-Silkey::LoggerService" class="class">
|
78
|
-
class Silkey::LoggerService
|
79
|
-
</h1>
|
80
|
-
|
81
|
-
<section class="description">
|
82
|
-
|
83
|
-
</section>
|
84
|
-
|
85
|
-
|
86
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
</section>
|
97
|
-
|
98
|
-
</main>
|
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.2.1.
|
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
|
-
|
data/doc/Silkey/Models.html
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>module Silkey::Models - 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="module">
|
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
|
-
|
60
|
-
<div id="class-metadata">
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</div>
|
67
|
-
</nav>
|
68
|
-
|
69
|
-
<main role="main" aria-labelledby="module-Silkey::Models">
|
70
|
-
<h1 id="module-Silkey::Models" class="module">
|
71
|
-
module Silkey::Models
|
72
|
-
</h1>
|
73
|
-
|
74
|
-
<section class="description">
|
75
|
-
|
76
|
-
</section>
|
77
|
-
|
78
|
-
|
79
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
</section>
|
90
|
-
|
91
|
-
</main>
|
92
|
-
|
93
|
-
|
94
|
-
<footer id="validator-badges" role="contentinfo">
|
95
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
96
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
|
97
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
|
-
</footer>
|
99
|
-
|
@@ -1,622 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class Silkey::Models::JwtPayload - 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="class">
|
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
|
-
|
60
|
-
<div id="class-metadata">
|
61
|
-
|
62
|
-
<div id="parent-class-section" class="nav-section">
|
63
|
-
<h3>Parent</h3>
|
64
|
-
|
65
|
-
|
66
|
-
<p class="link"><a href="../../Object.html">Object</a>
|
67
|
-
|
68
|
-
</div>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<!-- Method Quickref -->
|
73
|
-
<div id="method-list-section" class="nav-section">
|
74
|
-
<h3>Methods</h3>
|
75
|
-
|
76
|
-
<ul class="link-list" role="directory">
|
77
|
-
|
78
|
-
<li ><a href="#method-i-import">#import</a>
|
79
|
-
|
80
|
-
<li ><a href="#method-i-message_to_sign_by_silkey">#message_to_sign_by_silkey</a>
|
81
|
-
|
82
|
-
<li ><a href="#method-i-message_to_sign_by_user">#message_to_sign_by_user</a>
|
83
|
-
|
84
|
-
<li ><a href="#method-i-scope">#scope</a>
|
85
|
-
|
86
|
-
<li ><a href="#method-i-scope_divider">#scope_divider</a>
|
87
|
-
|
88
|
-
<li ><a href="#method-i-set_address">#set_address</a>
|
89
|
-
|
90
|
-
<li ><a href="#method-i-set_email">#set_email</a>
|
91
|
-
|
92
|
-
<li ><a href="#method-i-set_ref_id">#set_ref_id</a>
|
93
|
-
|
94
|
-
<li ><a href="#method-i-set_scope">#set_scope</a>
|
95
|
-
|
96
|
-
<li ><a href="#method-i-set_silkey_signature">#set_silkey_signature</a>
|
97
|
-
|
98
|
-
<li ><a href="#method-i-set_user_signature">#set_user_signature</a>
|
99
|
-
|
100
|
-
<li ><a href="#method-i-validate">#validate</a>
|
101
|
-
|
102
|
-
</ul>
|
103
|
-
</div>
|
104
|
-
|
105
|
-
</div>
|
106
|
-
</nav>
|
107
|
-
|
108
|
-
<main role="main" aria-labelledby="class-Silkey::Models::JwtPayload">
|
109
|
-
<h1 id="class-Silkey::Models::JwtPayload" class="class">
|
110
|
-
class Silkey::Models::JwtPayload
|
111
|
-
</h1>
|
112
|
-
|
113
|
-
<section class="description">
|
114
|
-
|
115
|
-
</section>
|
116
|
-
|
117
|
-
|
118
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
<section class="constants-list">
|
125
|
-
<header>
|
126
|
-
<h3>Constants</h3>
|
127
|
-
</header>
|
128
|
-
<dl>
|
129
|
-
|
130
|
-
<dt id="SCOPE_DIVIDER">SCOPE_DIVIDER
|
131
|
-
|
132
|
-
<dd>
|
133
|
-
|
134
|
-
|
135
|
-
</dl>
|
136
|
-
</section>
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
143
|
-
<header>
|
144
|
-
<h3>Public Instance Methods</h3>
|
145
|
-
</header>
|
146
|
-
|
147
|
-
|
148
|
-
<div id="method-i-import" class="method-detail ">
|
149
|
-
|
150
|
-
<div class="method-heading">
|
151
|
-
<span class="method-name">import</span><span
|
152
|
-
class="method-args">(hash)</span>
|
153
|
-
|
154
|
-
<span class="method-click-advice">click to toggle source</span>
|
155
|
-
|
156
|
-
</div>
|
157
|
-
|
158
|
-
|
159
|
-
<div class="method-description">
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
<div class="method-source-code" id="import-source">
|
167
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 126</span>
|
168
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">import</span>(<span class="ruby-identifier">hash</span>)
|
169
|
-
<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
170
|
-
<span class="ruby-identifier">var</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">underscore</span>
|
171
|
-
|
172
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">==</span> <span class="ruby-string">'scope'</span>
|
173
|
-
<span class="ruby-identifier">set_scope</span>(<span class="ruby-identifier">v</span>)
|
174
|
-
<span class="ruby-keyword">else</span>
|
175
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{var}"</span>, <span class="ruby-identifier">v</span>)
|
176
|
-
<span class="ruby-keyword">end</span>
|
177
|
-
<span class="ruby-keyword">end</span>
|
178
|
-
|
179
|
-
<span class="ruby-keyword">self</span>
|
180
|
-
<span class="ruby-keyword">end</span></pre>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
</div>
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
</div>
|
189
|
-
|
190
|
-
|
191
|
-
<div id="method-i-message_to_sign_by_silkey" class="method-detail ">
|
192
|
-
|
193
|
-
<div class="method-heading">
|
194
|
-
<span class="method-name">message_to_sign_by_silkey</span><span
|
195
|
-
class="method-args">()</span>
|
196
|
-
|
197
|
-
<span class="method-click-advice">click to toggle source</span>
|
198
|
-
|
199
|
-
</div>
|
200
|
-
|
201
|
-
|
202
|
-
<div class="method-description">
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
<div class="method-source-code" id="message_to_sign_by_silkey-source">
|
210
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 97</span>
|
211
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">message_to_sign_by_silkey</span>
|
212
|
-
<span class="ruby-keyword">return</span> <span class="ruby-string">''</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">email</span>)
|
213
|
-
|
214
|
-
<span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">silkey_signature_timestamp</span>)
|
215
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">silkey_signature_timestamp</span> = <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">current_timestamp</span>
|
216
|
-
<span class="ruby-keyword">end</span>
|
217
|
-
|
218
|
-
<span class="ruby-identifier">str_hex</span> = [
|
219
|
-
<span class="ruby-string">'email'</span>, <span class="ruby-identifier">email</span>,
|
220
|
-
<span class="ruby-string">'silkeySignatureTimestamp'</span>
|
221
|
-
].<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">str</span><span class="ruby-operator">|</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-string">'H*'</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">''</span>)
|
222
|
-
|
223
|
-
<span class="ruby-node">"#{str_hex}#{Silkey::Utils.int_to_hex(silkey_signature_timestamp.to_s)}"</span>
|
224
|
-
<span class="ruby-keyword">end</span></pre>
|
225
|
-
</div>
|
226
|
-
|
227
|
-
</div>
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
</div>
|
233
|
-
|
234
|
-
|
235
|
-
<div id="method-i-message_to_sign_by_user" class="method-detail ">
|
236
|
-
|
237
|
-
<div class="method-heading">
|
238
|
-
<span class="method-name">message_to_sign_by_user</span><span
|
239
|
-
class="method-args">()</span>
|
240
|
-
|
241
|
-
<span class="method-click-advice">click to toggle source</span>
|
242
|
-
|
243
|
-
</div>
|
244
|
-
|
245
|
-
|
246
|
-
<div class="method-description">
|
247
|
-
|
248
|
-
<p>Creates message that's need to be sign by user</p>
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
<div class="method-source-code" id="message_to_sign_by_user-source">
|
254
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 76</span>
|
255
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">message_to_sign_by_user</span>
|
256
|
-
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">address</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">user_signature_timestamp</span>)
|
257
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">user_signature_timestamp</span> = <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">current_timestamp</span>
|
258
|
-
<span class="ruby-keyword">end</span>
|
259
|
-
|
260
|
-
<span class="ruby-identifier">str1_hex</span> = <span class="ruby-string">'address'</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-string">'H*'</span>)[<span class="ruby-value">0</span>]
|
261
|
-
<span class="ruby-identifier">adr_hex</span> = <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">remove0x</span>(<span class="ruby-identifier">address</span>).<span class="ruby-identifier">downcase</span>
|
262
|
-
|
263
|
-
<span class="ruby-identifier">str2_hex</span> = [
|
264
|
-
<span class="ruby-string">'refId'</span>, <span class="ruby-identifier">ref_id</span>.<span class="ruby-identifier">to_s</span>,
|
265
|
-
<span class="ruby-string">'scope'</span>, <span class="ruby-identifier">scope</span>,
|
266
|
-
<span class="ruby-string">'userSignatureTimestamp'</span>
|
267
|
-
].<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">str</span><span class="ruby-operator">|</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-string">'H*'</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">''</span>)
|
268
|
-
|
269
|
-
<span class="ruby-identifier">str_hex</span> = <span class="ruby-node">"#{str1_hex}#{adr_hex}#{str2_hex}"</span>
|
270
|
-
|
271
|
-
<span class="ruby-keyword">return</span> <span class="ruby-identifier">str_hex</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">user_signature_timestamp</span>)
|
272
|
-
|
273
|
-
<span class="ruby-node">"#{str_hex}#{Silkey::Utils.int_to_hex(user_signature_timestamp.to_s)}"</span>
|
274
|
-
<span class="ruby-keyword">end</span></pre>
|
275
|
-
</div>
|
276
|
-
|
277
|
-
</div>
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
</div>
|
283
|
-
|
284
|
-
|
285
|
-
<div id="method-i-scope" class="method-detail ">
|
286
|
-
|
287
|
-
<div class="method-heading">
|
288
|
-
<span class="method-name">scope</span><span
|
289
|
-
class="method-args">()</span>
|
290
|
-
|
291
|
-
<span class="method-click-advice">click to toggle source</span>
|
292
|
-
|
293
|
-
</div>
|
294
|
-
|
295
|
-
|
296
|
-
<div class="method-description">
|
297
|
-
|
298
|
-
<p>rubocop:enable Style/HashSyntax</p>
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
<div class="method-source-code" id="scope-source">
|
304
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 21</span>
|
305
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">scope</span>
|
306
|
-
<span class="ruby-identifier">_scope</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">SCOPE_DIVIDER</span>)
|
307
|
-
<span class="ruby-keyword">end</span></pre>
|
308
|
-
</div>
|
309
|
-
|
310
|
-
</div>
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
</div>
|
316
|
-
|
317
|
-
|
318
|
-
<div id="method-i-scope_divider" class="method-detail ">
|
319
|
-
|
320
|
-
<div class="method-heading">
|
321
|
-
<span class="method-name">scope_divider</span><span
|
322
|
-
class="method-args">()</span>
|
323
|
-
|
324
|
-
<span class="method-click-advice">click to toggle source</span>
|
325
|
-
|
326
|
-
</div>
|
327
|
-
|
328
|
-
|
329
|
-
<div class="method-description">
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
<div class="method-source-code" id="scope_divider-source">
|
337
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 25</span>
|
338
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">scope_divider</span>
|
339
|
-
<span class="ruby-constant">SCOPE_DIVIDER</span>
|
340
|
-
<span class="ruby-keyword">end</span></pre>
|
341
|
-
</div>
|
342
|
-
|
343
|
-
</div>
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
</div>
|
349
|
-
|
350
|
-
|
351
|
-
<div id="method-i-set_address" class="method-detail ">
|
352
|
-
|
353
|
-
<div class="method-heading">
|
354
|
-
<span class="method-name">set_address</span><span
|
355
|
-
class="method-args">(addr)</span>
|
356
|
-
|
357
|
-
<span class="method-click-advice">click to toggle source</span>
|
358
|
-
|
359
|
-
</div>
|
360
|
-
|
361
|
-
|
362
|
-
<div class="method-description">
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
<div class="method-source-code" id="set_address-source">
|
370
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 37</span>
|
371
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_address</span>(<span class="ruby-identifier">addr</span>)
|
372
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"`#{addr}` is not ethereum address"</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">ethereum_address?</span>(<span class="ruby-identifier">addr</span>)
|
373
|
-
|
374
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">address</span> = <span class="ruby-identifier">addr</span>
|
375
|
-
<span class="ruby-keyword">self</span>
|
376
|
-
<span class="ruby-keyword">end</span></pre>
|
377
|
-
</div>
|
378
|
-
|
379
|
-
</div>
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
</div>
|
385
|
-
|
386
|
-
|
387
|
-
<div id="method-i-set_email" class="method-detail ">
|
388
|
-
|
389
|
-
<div class="method-heading">
|
390
|
-
<span class="method-name">set_email</span><span
|
391
|
-
class="method-args">(email)</span>
|
392
|
-
|
393
|
-
<span class="method-click-advice">click to toggle source</span>
|
394
|
-
|
395
|
-
</div>
|
396
|
-
|
397
|
-
|
398
|
-
<div class="method-description">
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
<div class="method-source-code" id="set_email-source">
|
406
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 44</span>
|
407
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_email</span>(<span class="ruby-identifier">email</span>)
|
408
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">email</span> = <span class="ruby-identifier">email</span>
|
409
|
-
<span class="ruby-keyword">self</span>
|
410
|
-
<span class="ruby-keyword">end</span></pre>
|
411
|
-
</div>
|
412
|
-
|
413
|
-
</div>
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
</div>
|
419
|
-
|
420
|
-
|
421
|
-
<div id="method-i-set_ref_id" class="method-detail ">
|
422
|
-
|
423
|
-
<div class="method-heading">
|
424
|
-
<span class="method-name">set_ref_id</span><span
|
425
|
-
class="method-args">(ref_id)</span>
|
426
|
-
|
427
|
-
<span class="method-click-advice">click to toggle source</span>
|
428
|
-
|
429
|
-
</div>
|
430
|
-
|
431
|
-
|
432
|
-
<div class="method-description">
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
<div class="method-source-code" id="set_ref_id-source">
|
440
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 49</span>
|
441
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_ref_id</span>(<span class="ruby-identifier">ref_id</span>)
|
442
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref_id</span> = <span class="ruby-identifier">ref_id</span>
|
443
|
-
<span class="ruby-keyword">self</span>
|
444
|
-
<span class="ruby-keyword">end</span></pre>
|
445
|
-
</div>
|
446
|
-
|
447
|
-
</div>
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
</div>
|
453
|
-
|
454
|
-
|
455
|
-
<div id="method-i-set_scope" class="method-detail ">
|
456
|
-
|
457
|
-
<div class="method-heading">
|
458
|
-
<span class="method-name">set_scope</span><span
|
459
|
-
class="method-args">(scope)</span>
|
460
|
-
|
461
|
-
<span class="method-click-advice">click to toggle source</span>
|
462
|
-
|
463
|
-
</div>
|
464
|
-
|
465
|
-
|
466
|
-
<div class="method-description">
|
467
|
-
|
468
|
-
<p>rubocop:disable Naming/AccessorMethodName</p>
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
<div class="method-source-code" id="set_scope-source">
|
474
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 30</span>
|
475
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_scope</span>(<span class="ruby-identifier">scope</span>)
|
476
|
-
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">scope</span>)
|
477
|
-
|
478
|
-
<span class="ruby-identifier">_scope</span>[<span class="ruby-identifier">scope</span>] = <span class="ruby-keyword">true</span>
|
479
|
-
<span class="ruby-keyword">self</span>
|
480
|
-
<span class="ruby-keyword">end</span></pre>
|
481
|
-
</div>
|
482
|
-
|
483
|
-
</div>
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
</div>
|
489
|
-
|
490
|
-
|
491
|
-
<div id="method-i-set_silkey_signature" class="method-detail ">
|
492
|
-
|
493
|
-
<div class="method-heading">
|
494
|
-
<span class="method-name">set_silkey_signature</span><span
|
495
|
-
class="method-args">(sig, timestamp)</span>
|
496
|
-
|
497
|
-
<span class="method-click-advice">click to toggle source</span>
|
498
|
-
|
499
|
-
</div>
|
500
|
-
|
501
|
-
|
502
|
-
<div class="method-description">
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
<div class="method-source-code" id="set_silkey_signature-source">
|
510
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 63</span>
|
511
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_silkey_signature</span>(<span class="ruby-identifier">sig</span>, <span class="ruby-identifier">timestamp</span>)
|
512
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"silkey signature invalid: `#{sig}`"</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">signature?</span>(<span class="ruby-identifier">sig</span>)
|
513
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-string">'empty silkey signature timestamp'</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">timestamp</span>)
|
514
|
-
|
515
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">silkey_signature</span> = <span class="ruby-identifier">sig</span>
|
516
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">silkey_signature_timestamp</span> = <span class="ruby-identifier">timestamp</span>
|
517
|
-
<span class="ruby-keyword">self</span>
|
518
|
-
<span class="ruby-keyword">end</span></pre>
|
519
|
-
</div>
|
520
|
-
|
521
|
-
</div>
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
</div>
|
527
|
-
|
528
|
-
|
529
|
-
<div id="method-i-set_user_signature" class="method-detail ">
|
530
|
-
|
531
|
-
<div class="method-heading">
|
532
|
-
<span class="method-name">set_user_signature</span><span
|
533
|
-
class="method-args">(sig, timestamp)</span>
|
534
|
-
|
535
|
-
<span class="method-click-advice">click to toggle source</span>
|
536
|
-
|
537
|
-
</div>
|
538
|
-
|
539
|
-
|
540
|
-
<div class="method-description">
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
<div class="method-source-code" id="set_user_signature-source">
|
548
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 54</span>
|
549
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_user_signature</span>(<span class="ruby-identifier">sig</span>, <span class="ruby-identifier">timestamp</span>)
|
550
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"user signature invalid: `#{sig}`"</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">signature?</span>(<span class="ruby-identifier">sig</span>)
|
551
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-string">'empty user signature timestamp'</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">timestamp</span>)
|
552
|
-
|
553
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">user_signature</span> = <span class="ruby-identifier">sig</span>
|
554
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">user_signature_timestamp</span> = <span class="ruby-identifier">timestamp</span>
|
555
|
-
<span class="ruby-keyword">self</span>
|
556
|
-
<span class="ruby-keyword">end</span></pre>
|
557
|
-
</div>
|
558
|
-
|
559
|
-
</div>
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
</div>
|
565
|
-
|
566
|
-
|
567
|
-
<div id="method-i-validate" class="method-detail ">
|
568
|
-
|
569
|
-
<div class="method-heading">
|
570
|
-
<span class="method-name">validate</span><span
|
571
|
-
class="method-args">()</span>
|
572
|
-
|
573
|
-
<span class="method-click-advice">click to toggle source</span>
|
574
|
-
|
575
|
-
</div>
|
576
|
-
|
577
|
-
|
578
|
-
<div class="method-description">
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
<div class="method-source-code" id="validate-source">
|
586
|
-
<pre><span class="ruby-comment"># File lib/silkey/models/jwt_payload.rb, line 112</span>
|
587
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate</span>
|
588
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"address is invalid: #{address}"</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">ethereum_address?</span>(<span class="ruby-identifier">address</span>)
|
589
|
-
|
590
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">signature?</span>(<span class="ruby-identifier">user_signature</span>)
|
591
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"user_signature is invalid: #{user_signature}"</span>
|
592
|
-
<span class="ruby-keyword">end</span>
|
593
|
-
|
594
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-string">'user_signature_timestamp is empty'</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">user_signature_timestamp</span>)
|
595
|
-
|
596
|
-
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Silkey</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">scope</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">scope</span> <span class="ruby-operator">==</span> <span class="ruby-string">'id'</span>
|
597
|
-
|
598
|
-
<span class="ruby-identifier">validate_scope_email</span>
|
599
|
-
<span class="ruby-keyword">end</span></pre>
|
600
|
-
</div>
|
601
|
-
|
602
|
-
</div>
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
</div>
|
608
|
-
|
609
|
-
|
610
|
-
</section>
|
611
|
-
|
612
|
-
</section>
|
613
|
-
|
614
|
-
</main>
|
615
|
-
|
616
|
-
|
617
|
-
<footer id="validator-badges" role="contentinfo">
|
618
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
619
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
|
620
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
621
|
-
</footer>
|
622
|
-
|