rack-oauth2-server 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/Gemfile +0 -2
- data/VERSION +1 -1
- data/bin/oauth2-server +8 -5
- data/rack-oauth2-server.gemspec +1 -0
- data/test/rails/log/test.log +2618 -0
- metadata +18 -4
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.2
|
data/bin/oauth2-server
CHANGED
@@ -9,10 +9,9 @@ if (i = ARGV.index("--db")) && ARGV[i+1]
|
|
9
9
|
url = ARGV[i + 1]
|
10
10
|
uri = URI.parse(url)
|
11
11
|
uri = URI.parse("mongo://#{url}") if uri.opaque
|
12
|
-
db = uri.path.sub(/^\//, "")
|
13
|
-
|
14
|
-
|
15
|
-
Server.database = conn[db]
|
12
|
+
db = Mongo::Connection.new(uri.host, uri.port)[uri.path.sub(/^\//, "")]
|
13
|
+
db.authenticate uri.user, uri.password if uri.user
|
14
|
+
Server.database = db
|
16
15
|
ARGV[i,2] = []
|
17
16
|
end
|
18
17
|
|
@@ -37,7 +36,7 @@ when "register"
|
|
37
36
|
redirect_uri = $stdin.gets
|
38
37
|
client = Server::Client.create(:display_name=>display_name, :link=>link, :redirect_uri=>redirect_uri)
|
39
38
|
rescue
|
40
|
-
puts "\nFailed to register client: #{
|
39
|
+
puts "\nFailed to register client: #{$!}"
|
41
40
|
exit -1
|
42
41
|
end
|
43
42
|
puts "Registered #{client.display_name}"
|
@@ -59,6 +58,10 @@ when "setup"
|
|
59
58
|
exit -1
|
60
59
|
end
|
61
60
|
print <<-TEXT
|
61
|
+
|
62
|
+
Next Steps
|
63
|
+
==========
|
64
|
+
|
62
65
|
Make sure you ONLY authorize administrators to use the oauth-admin scope.
|
63
66
|
For example:
|
64
67
|
|