anoubis_sso_server 0.1.0 → 0.1.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 +4 -4
- data/.idea/anoubis_sso_server.iml +68 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +217 -0
- data/README.md +2 -2
- data/app/controllers/anoubis_sso_server/application_controller.rb +102 -0
- data/app/models/anoubis_sso_server/application_record.rb +2 -0
- data/app/models/anoubis_sso_server/user.rb +72 -0
- data/lib/anoubis_sso_server/engine.rb +13 -0
- data/lib/anoubis_sso_server/version.rb +2 -1
- data/lib/anoubis_sso_server.rb +5 -4
- metadata +23 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd3afcb17bb8237f6f7604fa63f75d13f7caa5e2c106941293785b65c5e24b3f
|
|
4
|
+
data.tar.gz: e303e294bffa7706560274fa186fba47b17e80944a699254efad0f2410cf2b20
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5aa132b85b183c6adfb7f8792ca7d0344ef7eeda50da33931b361bb71b4f79c6c5d39e29ed2663d2335226f700d87d7458f6195182b1c12359f4882dc5a319e
|
|
7
|
+
data.tar.gz: 9228457e5c5aa6b85fe6682cd407a1b1e7c076f2cb4f069ecff9dab9792e579b33079eb370ca7f1eb1d21d64de127429d1c0a745b7f1addabfc7f3cffc5a20bf
|
|
@@ -11,7 +11,74 @@
|
|
|
11
11
|
</content>
|
|
12
12
|
<orderEntry type="jdk" jdkName="RVM: ruby-2.7.1 [anoubis_sso_server]" jdkType="RUBY_SDK" />
|
|
13
13
|
<orderEntry type="sourceFolder" forTests="false" />
|
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="actioncable (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="actionmailbox (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="actionpack (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="actiontext (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="actionview (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="activejob (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="activemodel (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="activerecord (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="activestorage (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="activesupport (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.16, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
14
28
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.6, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.9, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="domain_name (v0.5.20190701, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.10.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
34
|
+
<orderEntry type="library" scope="PROVIDED" name="globalid (v1.0.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
35
|
+
<orderEntry type="library" scope="PROVIDED" name="http-accept (v1.7.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
36
|
+
<orderEntry type="library" scope="PROVIDED" name="http-cookie (v1.0.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.9.1, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
38
|
+
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.13.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
39
|
+
<orderEntry type="library" scope="PROVIDED" name="mail (v2.7.1, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
40
|
+
<orderEntry type="library" scope="PROVIDED" name="marcel (v1.0.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
41
|
+
<orderEntry type="library" scope="PROVIDED" name="method_source (v1.0.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
42
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.4.1, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
43
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2022.0105, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
44
|
+
<orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.1.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
45
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.15.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
46
|
+
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.5.3, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
47
|
+
<orderEntry type="library" scope="PROVIDED" name="netrc (v0.11.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
48
|
+
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.5.8, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
49
|
+
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.13.1, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
50
|
+
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.21.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
51
|
+
<orderEntry type="library" scope="PROVIDED" name="parser (v3.1.0.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
52
|
+
<orderEntry type="library" scope="PROVIDED" name="racc (v1.6.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
53
|
+
<orderEntry type="library" scope="PROVIDED" name="rack (v2.2.3, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
54
|
+
<orderEntry type="library" scope="PROVIDED" name="rack-test (v1.1.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
55
|
+
<orderEntry type="library" scope="PROVIDED" name="rails (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
56
|
+
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
57
|
+
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.4.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
58
|
+
<orderEntry type="library" scope="PROVIDED" name="railties (v6.1.4.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
59
|
+
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
60
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
61
|
+
<orderEntry type="library" scope="PROVIDED" name="redis (v4.4.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
62
|
+
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.2.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
63
|
+
<orderEntry type="library" scope="PROVIDED" name="rest-client (v2.1.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
64
|
+
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
65
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.10.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
66
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.10.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
67
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.10.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
68
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.10.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
69
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.10.3, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
70
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop (v1.25.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
71
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.15.1, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
72
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
73
|
+
<orderEntry type="library" scope="PROVIDED" name="sprockets (v4.0.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
74
|
+
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.4.2, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
75
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
76
|
+
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
77
|
+
<orderEntry type="library" scope="PROVIDED" name="unf (v0.1.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
78
|
+
<orderEntry type="library" scope="PROVIDED" name="unf_ext (v0.0.8, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
79
|
+
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.1.0, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
80
|
+
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.5, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
81
|
+
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
82
|
+
<orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.5.4, RVM: ruby-2.7.1 [anoubis_sso_server]) [gem]" level="application" />
|
|
16
83
|
</component>
|
|
17
84
|
</module>
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: https://github.com/RA-Company/anoubis.git
|
|
3
|
+
revision: 8313be3e61ccd4e94b4ac91a57132a05bd82041c
|
|
4
|
+
branch: main
|
|
5
|
+
specs:
|
|
6
|
+
anoubis (2.0.0)
|
|
7
|
+
bcrypt (~> 3.1.16)
|
|
8
|
+
mysql2 (~> 0.5.3)
|
|
9
|
+
rails (~> 6.1.0)
|
|
10
|
+
redis (~> 4.4.0)
|
|
11
|
+
rest-client (~> 2.1.0)
|
|
12
|
+
|
|
13
|
+
PATH
|
|
14
|
+
remote: .
|
|
15
|
+
specs:
|
|
16
|
+
anoubis_sso_server (0.1.1)
|
|
17
|
+
anoubis (~> 2.0.0)
|
|
18
|
+
|
|
19
|
+
GEM
|
|
20
|
+
remote: https://rubygems.org/
|
|
21
|
+
specs:
|
|
22
|
+
actioncable (6.1.4.4)
|
|
23
|
+
actionpack (= 6.1.4.4)
|
|
24
|
+
activesupport (= 6.1.4.4)
|
|
25
|
+
nio4r (~> 2.0)
|
|
26
|
+
websocket-driver (>= 0.6.1)
|
|
27
|
+
actionmailbox (6.1.4.4)
|
|
28
|
+
actionpack (= 6.1.4.4)
|
|
29
|
+
activejob (= 6.1.4.4)
|
|
30
|
+
activerecord (= 6.1.4.4)
|
|
31
|
+
activestorage (= 6.1.4.4)
|
|
32
|
+
activesupport (= 6.1.4.4)
|
|
33
|
+
mail (>= 2.7.1)
|
|
34
|
+
actionmailer (6.1.4.4)
|
|
35
|
+
actionpack (= 6.1.4.4)
|
|
36
|
+
actionview (= 6.1.4.4)
|
|
37
|
+
activejob (= 6.1.4.4)
|
|
38
|
+
activesupport (= 6.1.4.4)
|
|
39
|
+
mail (~> 2.5, >= 2.5.4)
|
|
40
|
+
rails-dom-testing (~> 2.0)
|
|
41
|
+
actionpack (6.1.4.4)
|
|
42
|
+
actionview (= 6.1.4.4)
|
|
43
|
+
activesupport (= 6.1.4.4)
|
|
44
|
+
rack (~> 2.0, >= 2.0.9)
|
|
45
|
+
rack-test (>= 0.6.3)
|
|
46
|
+
rails-dom-testing (~> 2.0)
|
|
47
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
48
|
+
actiontext (6.1.4.4)
|
|
49
|
+
actionpack (= 6.1.4.4)
|
|
50
|
+
activerecord (= 6.1.4.4)
|
|
51
|
+
activestorage (= 6.1.4.4)
|
|
52
|
+
activesupport (= 6.1.4.4)
|
|
53
|
+
nokogiri (>= 1.8.5)
|
|
54
|
+
actionview (6.1.4.4)
|
|
55
|
+
activesupport (= 6.1.4.4)
|
|
56
|
+
builder (~> 3.1)
|
|
57
|
+
erubi (~> 1.4)
|
|
58
|
+
rails-dom-testing (~> 2.0)
|
|
59
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
60
|
+
activejob (6.1.4.4)
|
|
61
|
+
activesupport (= 6.1.4.4)
|
|
62
|
+
globalid (>= 0.3.6)
|
|
63
|
+
activemodel (6.1.4.4)
|
|
64
|
+
activesupport (= 6.1.4.4)
|
|
65
|
+
activerecord (6.1.4.4)
|
|
66
|
+
activemodel (= 6.1.4.4)
|
|
67
|
+
activesupport (= 6.1.4.4)
|
|
68
|
+
activestorage (6.1.4.4)
|
|
69
|
+
actionpack (= 6.1.4.4)
|
|
70
|
+
activejob (= 6.1.4.4)
|
|
71
|
+
activerecord (= 6.1.4.4)
|
|
72
|
+
activesupport (= 6.1.4.4)
|
|
73
|
+
marcel (~> 1.0.0)
|
|
74
|
+
mini_mime (>= 1.1.0)
|
|
75
|
+
activesupport (6.1.4.4)
|
|
76
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
77
|
+
i18n (>= 1.6, < 2)
|
|
78
|
+
minitest (>= 5.1)
|
|
79
|
+
tzinfo (~> 2.0)
|
|
80
|
+
zeitwerk (~> 2.3)
|
|
81
|
+
ast (2.4.2)
|
|
82
|
+
bcrypt (3.1.16)
|
|
83
|
+
builder (3.2.4)
|
|
84
|
+
concurrent-ruby (1.1.9)
|
|
85
|
+
crass (1.0.6)
|
|
86
|
+
diff-lcs (1.5.0)
|
|
87
|
+
domain_name (0.5.20190701)
|
|
88
|
+
unf (>= 0.0.5, < 1.0.0)
|
|
89
|
+
erubi (1.10.0)
|
|
90
|
+
globalid (1.0.0)
|
|
91
|
+
activesupport (>= 5.0)
|
|
92
|
+
http-accept (1.7.0)
|
|
93
|
+
http-cookie (1.0.4)
|
|
94
|
+
domain_name (~> 0.5)
|
|
95
|
+
i18n (1.9.1)
|
|
96
|
+
concurrent-ruby (~> 1.0)
|
|
97
|
+
loofah (2.13.0)
|
|
98
|
+
crass (~> 1.0.2)
|
|
99
|
+
nokogiri (>= 1.5.9)
|
|
100
|
+
mail (2.7.1)
|
|
101
|
+
mini_mime (>= 0.1.1)
|
|
102
|
+
marcel (1.0.2)
|
|
103
|
+
method_source (1.0.0)
|
|
104
|
+
mime-types (3.4.1)
|
|
105
|
+
mime-types-data (~> 3.2015)
|
|
106
|
+
mime-types-data (3.2022.0105)
|
|
107
|
+
mini_mime (1.1.2)
|
|
108
|
+
mini_portile2 (2.7.1)
|
|
109
|
+
minitest (5.15.0)
|
|
110
|
+
mysql2 (0.5.3)
|
|
111
|
+
netrc (0.11.0)
|
|
112
|
+
nio4r (2.5.8)
|
|
113
|
+
nokogiri (1.13.1)
|
|
114
|
+
mini_portile2 (~> 2.7.0)
|
|
115
|
+
racc (~> 1.4)
|
|
116
|
+
nokogiri (1.13.1-x86_64-linux)
|
|
117
|
+
racc (~> 1.4)
|
|
118
|
+
parallel (1.21.0)
|
|
119
|
+
parser (3.1.0.0)
|
|
120
|
+
ast (~> 2.4.1)
|
|
121
|
+
racc (1.6.0)
|
|
122
|
+
rack (2.2.3)
|
|
123
|
+
rack-test (1.1.0)
|
|
124
|
+
rack (>= 1.0, < 3)
|
|
125
|
+
rails (6.1.4.4)
|
|
126
|
+
actioncable (= 6.1.4.4)
|
|
127
|
+
actionmailbox (= 6.1.4.4)
|
|
128
|
+
actionmailer (= 6.1.4.4)
|
|
129
|
+
actionpack (= 6.1.4.4)
|
|
130
|
+
actiontext (= 6.1.4.4)
|
|
131
|
+
actionview (= 6.1.4.4)
|
|
132
|
+
activejob (= 6.1.4.4)
|
|
133
|
+
activemodel (= 6.1.4.4)
|
|
134
|
+
activerecord (= 6.1.4.4)
|
|
135
|
+
activestorage (= 6.1.4.4)
|
|
136
|
+
activesupport (= 6.1.4.4)
|
|
137
|
+
bundler (>= 1.15.0)
|
|
138
|
+
railties (= 6.1.4.4)
|
|
139
|
+
sprockets-rails (>= 2.0.0)
|
|
140
|
+
rails-dom-testing (2.0.3)
|
|
141
|
+
activesupport (>= 4.2.0)
|
|
142
|
+
nokogiri (>= 1.6)
|
|
143
|
+
rails-html-sanitizer (1.4.2)
|
|
144
|
+
loofah (~> 2.3)
|
|
145
|
+
railties (6.1.4.4)
|
|
146
|
+
actionpack (= 6.1.4.4)
|
|
147
|
+
activesupport (= 6.1.4.4)
|
|
148
|
+
method_source
|
|
149
|
+
rake (>= 0.13)
|
|
150
|
+
thor (~> 1.0)
|
|
151
|
+
rainbow (3.1.1)
|
|
152
|
+
rake (13.0.6)
|
|
153
|
+
redis (4.4.0)
|
|
154
|
+
regexp_parser (2.2.0)
|
|
155
|
+
rest-client (2.1.0)
|
|
156
|
+
http-accept (>= 1.7.0, < 2.0)
|
|
157
|
+
http-cookie (>= 1.0.2, < 2.0)
|
|
158
|
+
mime-types (>= 1.16, < 4.0)
|
|
159
|
+
netrc (~> 0.8)
|
|
160
|
+
rexml (3.2.5)
|
|
161
|
+
rspec (3.10.0)
|
|
162
|
+
rspec-core (~> 3.10.0)
|
|
163
|
+
rspec-expectations (~> 3.10.0)
|
|
164
|
+
rspec-mocks (~> 3.10.0)
|
|
165
|
+
rspec-core (3.10.2)
|
|
166
|
+
rspec-support (~> 3.10.0)
|
|
167
|
+
rspec-expectations (3.10.2)
|
|
168
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
169
|
+
rspec-support (~> 3.10.0)
|
|
170
|
+
rspec-mocks (3.10.2)
|
|
171
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
172
|
+
rspec-support (~> 3.10.0)
|
|
173
|
+
rspec-support (3.10.3)
|
|
174
|
+
rubocop (1.25.0)
|
|
175
|
+
parallel (~> 1.10)
|
|
176
|
+
parser (>= 3.1.0.0)
|
|
177
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
178
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
179
|
+
rexml
|
|
180
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
|
181
|
+
ruby-progressbar (~> 1.7)
|
|
182
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
183
|
+
rubocop-ast (1.15.1)
|
|
184
|
+
parser (>= 3.0.1.1)
|
|
185
|
+
ruby-progressbar (1.11.0)
|
|
186
|
+
sprockets (4.0.2)
|
|
187
|
+
concurrent-ruby (~> 1.0)
|
|
188
|
+
rack (> 1, < 3)
|
|
189
|
+
sprockets-rails (3.4.2)
|
|
190
|
+
actionpack (>= 5.2)
|
|
191
|
+
activesupport (>= 5.2)
|
|
192
|
+
sprockets (>= 3.0.0)
|
|
193
|
+
thor (1.2.1)
|
|
194
|
+
tzinfo (2.0.4)
|
|
195
|
+
concurrent-ruby (~> 1.0)
|
|
196
|
+
unf (0.1.4)
|
|
197
|
+
unf_ext
|
|
198
|
+
unf_ext (0.0.8)
|
|
199
|
+
unicode-display_width (2.1.0)
|
|
200
|
+
websocket-driver (0.7.5)
|
|
201
|
+
websocket-extensions (>= 0.1.0)
|
|
202
|
+
websocket-extensions (0.1.5)
|
|
203
|
+
zeitwerk (2.5.4)
|
|
204
|
+
|
|
205
|
+
PLATFORMS
|
|
206
|
+
ruby
|
|
207
|
+
x86_64-linux
|
|
208
|
+
|
|
209
|
+
DEPENDENCIES
|
|
210
|
+
anoubis!
|
|
211
|
+
anoubis_sso_server!
|
|
212
|
+
rake (~> 13.0)
|
|
213
|
+
rspec (~> 3.0)
|
|
214
|
+
rubocop (~> 1.21)
|
|
215
|
+
|
|
216
|
+
BUNDLED WITH
|
|
217
|
+
2.3.6
|
data/README.md
CHANGED
|
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
32
32
|
|
|
33
33
|
## Contributing
|
|
34
34
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/RA-Company/anoubis_sso_server. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/RA-Company/anoubis_sso_server/blob/master/CODE_OF_CONDUCT.md).
|
|
36
36
|
|
|
37
37
|
## License
|
|
38
38
|
|
|
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
40
40
|
|
|
41
41
|
## Code of Conduct
|
|
42
42
|
|
|
43
|
-
Everyone interacting in the AnoubisSsoServer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
43
|
+
Everyone interacting in the AnoubisSsoServer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/RA-Company/anoubis_sso_server/blob/master/CODE_OF_CONDUCT.md).
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
## Main application class inherited from {https://api.rubyonrails.org/v6.1.4/classes/ActionController/API.html ActionController::API}
|
|
2
|
+
class AnoubisSsoServer::ApplicationController < Anoubis::ApplicationController
|
|
3
|
+
## Selected SSO system
|
|
4
|
+
attr_accessor :current_system
|
|
5
|
+
|
|
6
|
+
## Returns main SSO server URL.
|
|
7
|
+
attr_accessor :sso_server
|
|
8
|
+
|
|
9
|
+
## Returns SSO Login URL used for redirect when user isn't logged in.
|
|
10
|
+
attr_accessor :sso_login_url
|
|
11
|
+
|
|
12
|
+
## Returns SSO silent url used for silent refresh token.
|
|
13
|
+
attr_accessor :sso_silent_url
|
|
14
|
+
|
|
15
|
+
##
|
|
16
|
+
# Returns main SSO server URL. Link should be defined in Rails.configuration.anoubis.sso_server configuration parameter
|
|
17
|
+
# @return [String] link to SSO server
|
|
18
|
+
def sso_server
|
|
19
|
+
@sso_server ||= get_sso_server
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
private def get_sso_server
|
|
23
|
+
begin
|
|
24
|
+
value = Rails.configuration.anoubis_sso_server
|
|
25
|
+
rescue StandardError
|
|
26
|
+
value = ''
|
|
27
|
+
render json: { error: 'Please setup Rails.configuration.anoubis_sso_server configuration variable' }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
value
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# Returns SSO Login URL used for redirect when user isn't logged in.
|
|
35
|
+
# Link can be redefined in Rails.configuration.anoubis_sso_login_url configuration parameter. If this variable isn't defined
|
|
36
|
+
# URL wil be defined as {sso_server}login
|
|
37
|
+
# @return [String] SSO login URL
|
|
38
|
+
def sso_login_url
|
|
39
|
+
@sso_login_url ||= get_sso_login_url
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
private def get_sso_login_url
|
|
43
|
+
begin
|
|
44
|
+
value = Rails.configuration.anoubis_sso_login_url
|
|
45
|
+
rescue
|
|
46
|
+
value = sso_server + 'login'
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
value
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
##
|
|
53
|
+
# Returns SSO silent url used for silent refresh token.
|
|
54
|
+
# Link can be redefined in Rails.configuration.anoubis_sso_silent_url configuration parameter. If this variable isn't defined
|
|
55
|
+
# URL wil be defined as {sso_server}silent.html
|
|
56
|
+
# @return [String] SSO login URL
|
|
57
|
+
def sso_silent_url
|
|
58
|
+
@sso_silent_url ||= get_sso_silent_url
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
private def get_sso_silent_url
|
|
62
|
+
begin
|
|
63
|
+
value = Rails.configuration.anoubis_sso_silent_url
|
|
64
|
+
rescue
|
|
65
|
+
value = sso_server + 'silent.html'
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
value
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
##
|
|
72
|
+
# Check current origin of header by Regexp defined in Rails.configuration.anoubis_sso_origin configuration parameter
|
|
73
|
+
# @return [Boolean] request host origin validation
|
|
74
|
+
def check_origin
|
|
75
|
+
request.headers['origin'].match(Rails.configuration.anoubis_sso_origin)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
##
|
|
79
|
+
# Return OAUTH session for current request. Session name gets from cookies. If session present but it's timeout was expired, then session regenerated.
|
|
80
|
+
def get_oauth_session
|
|
81
|
+
if cookies.key? :oauth_session
|
|
82
|
+
begin
|
|
83
|
+
session = JSON.parse(self.redis.get("#{redis_prefix}session:#{cookies[:oauth_session]}"),{ symbolize_names: true })
|
|
84
|
+
rescue
|
|
85
|
+
cookies[:oauth_session] = nil
|
|
86
|
+
session = nil
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if session
|
|
91
|
+
if session[:ttl] < Time.now.utc.to_i
|
|
92
|
+
session_name = SecureRandom.uuid
|
|
93
|
+
session[:ttl] = Time.now.utc.to_i + session[:timeout]
|
|
94
|
+
redis.del("#{redis_prefix}session:#{cookies[:oauth_session]}")
|
|
95
|
+
cookies[:oauth_session] = session_name
|
|
96
|
+
redis.set("#{redis_prefix}session:#{session_name}", session.to_json, { ex: 86400 })
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
session
|
|
101
|
+
end
|
|
102
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
class AnoubisSsoServer::User < ApplicationRecord
|
|
2
|
+
self.table_name = 'users'
|
|
3
|
+
|
|
4
|
+
has_secure_password
|
|
5
|
+
validates :email, presence: true
|
|
6
|
+
|
|
7
|
+
before_validation :before_validation_user_on_create, on: :create
|
|
8
|
+
before_save :before_save_user
|
|
9
|
+
after_destroy :after_destroy_user
|
|
10
|
+
|
|
11
|
+
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
|
|
12
|
+
|
|
13
|
+
validates :email, presence: true, length: { maximum: 50 },
|
|
14
|
+
format: { with: VALID_EMAIL_REGEX },
|
|
15
|
+
uniqueness: { case_sensitive: true }
|
|
16
|
+
|
|
17
|
+
validates :name, presence: true, length: { maximum: 100 }
|
|
18
|
+
validates :surname, presence: true, length: { maximum: 100 }
|
|
19
|
+
|
|
20
|
+
validates :password, length: { in: 5..30 }, on: [:create]
|
|
21
|
+
validates :password, length: { in: 5..30 }, on: [:update], if: :password_changed?
|
|
22
|
+
validates :password_confirmation, length: { in: 5..30 }, on: [:create]
|
|
23
|
+
validates :password_confirmation, length: { in: 5..30 }, on: [:update], if: :password_changed?
|
|
24
|
+
|
|
25
|
+
validates :uuid, presence: true, length: { maximum: 40 }, uniqueness: { case_sensitive: true }
|
|
26
|
+
validates :public, presence: true, length: { maximum: 40 }, uniqueness: { case_sensitive: true }
|
|
27
|
+
|
|
28
|
+
def before_validation_user_on_create
|
|
29
|
+
self.uuid = SecureRandom.uuid
|
|
30
|
+
self.public = SecureRandom.uuid
|
|
31
|
+
self.timezone = 'GMT' if !self.timezone
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def before_save_user
|
|
35
|
+
self.timezone = 'GMT' if !self.timezone
|
|
36
|
+
self.email = self.email.downcase
|
|
37
|
+
self.clear_cache
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def after_destroy_user
|
|
41
|
+
self.clear_cache
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def save_cache
|
|
45
|
+
self.redis.set(self.redis_prefix + 'user:' + self.uuid, self.to_json(except: [:password_digest])) if self.redis
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def clear_cache
|
|
49
|
+
self.redis.del(self.redis_prefix + 'user:' + self.uuid) if self.redis
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def password_changed?
|
|
53
|
+
!password.blank?
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.load_cache(redis, uuid)
|
|
57
|
+
begin
|
|
58
|
+
data = JSON.parse redis.get(User.redis_prefix + 'user:' + uuid), { symbolize_names: true }
|
|
59
|
+
rescue
|
|
60
|
+
data = nil
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
unless data
|
|
64
|
+
user = self.where(uuid: uuid).first
|
|
65
|
+
if user
|
|
66
|
+
return JSON.parse(user.to_json(except: [:password_digest]), { symbolize_names: true })
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
data
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module AnoubisSsoServer
|
|
2
|
+
##
|
|
3
|
+
# Main AnubisSsoServer Engine class
|
|
4
|
+
class Engine < ::Rails::Engine
|
|
5
|
+
isolate_namespace AnoubisSsoServer
|
|
6
|
+
config.generators.api_only = true
|
|
7
|
+
|
|
8
|
+
config.generators do |g|
|
|
9
|
+
g.test_framework :rspec
|
|
10
|
+
g.fixture_replacement :factory_bot, :dir => 'spec/factories'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
data/lib/anoubis_sso_server.rb
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
require_relative "anoubis_sso_server/version"
|
|
2
|
+
require_relative "anoubis_sso_server/engine"
|
|
4
3
|
|
|
4
|
+
## Main module of library for create basic SSO Server based on OAUTH authentication.
|
|
5
5
|
module AnoubisSsoServer
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
## Default error class
|
|
7
|
+
class Error < StandardError;
|
|
8
|
+
end
|
|
8
9
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anoubis_sso_server
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrey Ryabov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-01-
|
|
12
|
-
dependencies:
|
|
11
|
+
date: 2022-01-29 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: anoubis
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 2.0.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 2.0.0
|
|
13
27
|
description: Library for create basic SSO Server based on OAUTH authentication.
|
|
14
28
|
email:
|
|
15
29
|
- andrey.ryabov@ra-company.kz
|
|
@@ -29,10 +43,15 @@ files:
|
|
|
29
43
|
- CHANGELOG.md
|
|
30
44
|
- CODE_OF_CONDUCT.md
|
|
31
45
|
- Gemfile
|
|
46
|
+
- Gemfile.lock
|
|
32
47
|
- LICENSE.txt
|
|
33
48
|
- README.md
|
|
34
49
|
- Rakefile
|
|
50
|
+
- app/controllers/anoubis_sso_server/application_controller.rb
|
|
51
|
+
- app/models/anoubis_sso_server/application_record.rb
|
|
52
|
+
- app/models/anoubis_sso_server/user.rb
|
|
35
53
|
- lib/anoubis_sso_server.rb
|
|
54
|
+
- lib/anoubis_sso_server/engine.rb
|
|
36
55
|
- lib/anoubis_sso_server/version.rb
|
|
37
56
|
- sig/anoubis_sso_server.rbs
|
|
38
57
|
homepage: https://github.com/RA-Company/
|
|
@@ -50,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
50
69
|
requirements:
|
|
51
70
|
- - ">="
|
|
52
71
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: 2.
|
|
72
|
+
version: 2.7.1
|
|
54
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
74
|
requirements:
|
|
56
75
|
- - ">="
|