Skip to content

Commit e129b01

Browse files
committed
First commit
0 parents  commit e129b01

File tree

62 files changed

+1802
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1802
-0
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## MAC OS
2+
.DS_Store
3+
4+
## TEXTMATE
5+
*.tmproj
6+
tmtags
7+
8+
## EMACS
9+
*~
10+
\#*
11+
.\#*
12+
13+
## VIM
14+
*.swp
15+
16+
## PROJECT::GENERAL
17+
.bundle
18+
db/*.sqlite3
19+
log/*.log
20+
tmp

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'http://rubygems.org'
2+
3+
gemspec

Gemfile.lock

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
PATH
2+
remote: .
3+
specs:
4+
connect (0.0.1)
5+
constant_cache
6+
html5_validators
7+
openid_connect
8+
rack-oauth2
9+
rails (~> 4.0.2)
10+
squeel (~> 1.1)
11+
12+
GEM
13+
remote: http://rubygems.org/
14+
specs:
15+
actionmailer (4.0.3)
16+
actionpack (= 4.0.3)
17+
mail (~> 2.5.4)
18+
actionpack (4.0.3)
19+
activesupport (= 4.0.3)
20+
builder (~> 3.1.0)
21+
erubis (~> 2.7.0)
22+
rack (~> 1.5.2)
23+
rack-test (~> 0.6.2)
24+
activemodel (4.0.3)
25+
activesupport (= 4.0.3)
26+
builder (~> 3.1.0)
27+
activerecord (4.0.3)
28+
activemodel (= 4.0.3)
29+
activerecord-deprecated_finders (~> 1.0.2)
30+
activesupport (= 4.0.3)
31+
arel (~> 4.0.0)
32+
activerecord-deprecated_finders (1.0.3)
33+
activesupport (4.0.3)
34+
i18n (~> 0.6, >= 0.6.4)
35+
minitest (~> 4.2)
36+
multi_json (~> 1.3)
37+
thread_safe (~> 0.1)
38+
tzinfo (~> 0.3.37)
39+
arel (4.0.2)
40+
atomic (1.1.14)
41+
attr_required (1.0.0)
42+
bindata (2.0.0)
43+
builder (3.1.4)
44+
constant_cache (0.0.2)
45+
activerecord (>= 2.0.2)
46+
activesupport (>= 2.0.2)
47+
erubis (2.7.0)
48+
hike (1.2.3)
49+
html5_validators (1.1.2)
50+
httpclient (2.3.4.1)
51+
i18n (0.6.9)
52+
json (1.8.1)
53+
json-jwt (0.6.1)
54+
activesupport
55+
bindata
56+
multi_json (>= 1.3)
57+
securecompare
58+
url_safe_base64
59+
mail (2.5.4)
60+
mime-types (~> 1.16)
61+
treetop (~> 1.4.8)
62+
mime-types (1.25.1)
63+
minitest (4.7.5)
64+
multi_json (1.8.4)
65+
openid_connect (0.7.3)
66+
activemodel
67+
attr_required (>= 0.0.5)
68+
json (>= 1.4.3)
69+
json-jwt (>= 0.5.5)
70+
rack-oauth2 (>= 1.0.0)
71+
swd (>= 0.1.2)
72+
tzinfo
73+
validate_email
74+
validate_url
75+
webfinger (>= 0.0.2)
76+
polyamorous (0.6.4)
77+
activerecord (>= 3.0)
78+
polyglot (0.3.4)
79+
rack (1.5.2)
80+
rack-oauth2 (1.0.7)
81+
activesupport (>= 2.3)
82+
attr_required (>= 0.0.5)
83+
httpclient (>= 2.2.0.2)
84+
multi_json (>= 1.3.6)
85+
rack (>= 1.1)
86+
rack-test (0.6.2)
87+
rack (>= 1.0)
88+
rails (4.0.3)
89+
actionmailer (= 4.0.3)
90+
actionpack (= 4.0.3)
91+
activerecord (= 4.0.3)
92+
activesupport (= 4.0.3)
93+
bundler (>= 1.3.0, < 2.0)
94+
railties (= 4.0.3)
95+
sprockets-rails (~> 2.0.0)
96+
railties (4.0.3)
97+
actionpack (= 4.0.3)
98+
activesupport (= 4.0.3)
99+
rake (>= 0.8.7)
100+
thor (>= 0.18.1, < 2.0)
101+
rake (10.1.1)
102+
securecompare (1.0.0)
103+
sprockets (2.11.0)
104+
hike (~> 1.2)
105+
multi_json (~> 1.0)
106+
rack (~> 1.0)
107+
tilt (~> 1.1, != 1.3.0)
108+
sprockets-rails (2.0.1)
109+
actionpack (>= 3.0)
110+
activesupport (>= 3.0)
111+
sprockets (~> 2.8)
112+
squeel (1.1.1)
113+
activerecord (>= 3.0)
114+
activesupport (>= 3.0)
115+
polyamorous (~> 0.6.0)
116+
swd (0.2.1)
117+
activesupport (>= 3)
118+
attr_required (>= 0.0.5)
119+
httpclient (>= 2.2.1)
120+
i18n
121+
json (>= 1.4.3)
122+
thor (0.18.1)
123+
thread_safe (0.1.3)
124+
atomic
125+
tilt (1.4.1)
126+
treetop (1.4.15)
127+
polyglot
128+
polyglot (>= 0.3.1)
129+
tzinfo (0.3.38)
130+
url_safe_base64 (0.2.2)
131+
validate_email (0.1.6)
132+
activemodel (>= 3.0)
133+
mail (>= 2.2.5)
134+
validate_url (0.2.0)
135+
activemodel (>= 3.0.0)
136+
webfinger (1.0.0)
137+
activesupport
138+
httpclient (>= 2.2.0.2)
139+
multi_json
140+
141+
PLATFORMS
142+
ruby
143+
144+
DEPENDENCIES
145+
connect!

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2011 nov matake
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Rakefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
begin
2+
require 'bundler/setup'
3+
rescue LoadError
4+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5+
end
6+
7+
require 'rdoc/task'
8+
9+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
10+
load 'rails/tasks/engine.rake'
11+
12+
Bundler::GemHelper.install_tasks
13+
14+
require 'rake/testtask'

admin/authorizations.rb

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
if defined?(ActiveAdmin)
2+
ActiveAdmin.register Connect::Authorization do
3+
menu parent: 'OpenID'
4+
5+
controller do
6+
def resource_params
7+
return [] if request.get?
8+
[params.require('connect_authorization').permit!]
9+
end
10+
end
11+
end
12+
end

admin/clients.rb

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
if defined?(ActiveAdmin)
2+
ActiveAdmin.register Connect::Client do
3+
menu parent: 'OpenID'
4+
5+
filter :name
6+
filter :identifier
7+
filter :dynamic
8+
9+
index do
10+
column :id
11+
column :name
12+
column :identifier
13+
column :jwks_uri
14+
column :sector_identifier
15+
column :native
16+
column :dynamic
17+
column :ppid
18+
column :expires_at
19+
default_actions
20+
end
21+
22+
show do
23+
attributes_table do
24+
row :account
25+
row :id
26+
row :name
27+
row :identifier
28+
row :secret
29+
row :jwks_uri
30+
row :sector_identifier
31+
row :redirect_uris do |rec|
32+
safe_join rec.redirect_uris, tag(:br)
33+
end
34+
row :native
35+
row :dynamic
36+
row :ppid
37+
row :superapp
38+
row :expires_at
39+
row :raw_registered_json
40+
row :authorization_endpoint do connect.new_authorization_url; end
41+
row :token_endpoint do connect.access_tokens_url; end
42+
row :userinfo_endpoint do connect.user_info_url; end
43+
end
44+
end
45+
46+
form do |f|
47+
f.inputs do
48+
f.input :account
49+
f.input :name
50+
f.input :jwks_uri
51+
f.input :sector_identifier
52+
f.input :native
53+
f.input :dynamic
54+
f.input :ppid
55+
f.input :superapp
56+
f.input :expires_at
57+
f.input :redirect_uri, input_html: {value: f.object.redirect_uris.try(:first)}
58+
end
59+
f.actions
60+
end
61+
62+
controller do
63+
def resource_params
64+
return [] if request.get?
65+
[params.require('connect_client').permit!]
66+
end
67+
end
68+
end
69+
end

admin/scopes.rb

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
if defined?(ActiveAdmin)
2+
ActiveAdmin.register Connect::Scope do
3+
menu parent: 'OpenID'
4+
5+
controller do
6+
def resource_params
7+
return [] if request.get?
8+
[params.require('connect_scope').permit!]
9+
end
10+
end
11+
end
12+
end

0 commit comments

Comments
 (0)