auth0-ruby 0.9

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.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +2 -0
  3. data/.gitignore +8 -0
  4. data/.rspec +2 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +68 -0
  7. data/README.md +27 -0
  8. data/Rakefile +9 -0
  9. data/auth0.gemspec +29 -0
  10. data/doc/Auth0.html +153 -0
  11. data/doc/Auth0/Api.html +128 -0
  12. data/doc/Auth0/Api/AuthenticationEndpoints.html +596 -0
  13. data/doc/Auth0/Api/V1.html +192 -0
  14. data/doc/Auth0/Api/V1/Clients.html +440 -0
  15. data/doc/Auth0/Api/V1/Connections.html +506 -0
  16. data/doc/Auth0/Api/V1/Logs.html +366 -0
  17. data/doc/Auth0/Api/V1/Rules.html +439 -0
  18. data/doc/Auth0/Api/V1/Users.html +1617 -0
  19. data/doc/Auth0/BadRequest.html +142 -0
  20. data/doc/Auth0/Client.html +236 -0
  21. data/doc/Auth0/Exception.html +140 -0
  22. data/doc/Auth0/Mixins.html +225 -0
  23. data/doc/Auth0/Mixins/HTTPartyProxy.html +121 -0
  24. data/doc/Auth0/Mixins/Initializer.html +298 -0
  25. data/doc/Auth0/NotFound.html +143 -0
  26. data/doc/Auth0/ServerError.html +142 -0
  27. data/doc/Auth0/Unauthorized.html +143 -0
  28. data/doc/Auth0/Unsupported.html +142 -0
  29. data/doc/Auth0/UserIdIsBlank.html +143 -0
  30. data/doc/Auth0Client.html +235 -0
  31. data/doc/_index.html +347 -0
  32. data/doc/class_list.html +58 -0
  33. data/doc/css/common.css +1 -0
  34. data/doc/css/full_list.css +57 -0
  35. data/doc/css/style.css +339 -0
  36. data/doc/file.README.html +103 -0
  37. data/doc/file_list.html +60 -0
  38. data/doc/frames.html +26 -0
  39. data/doc/index.html +103 -0
  40. data/doc/js/app.js +219 -0
  41. data/doc/js/full_list.js +181 -0
  42. data/doc/js/jquery.js +4 -0
  43. data/doc/method_list.html +327 -0
  44. data/doc/top-level-namespace.html +114 -0
  45. data/lib/auth0.rb +8 -0
  46. data/lib/auth0/api/authentication_endpoints.rb +71 -0
  47. data/lib/auth0/api/v1.rb +19 -0
  48. data/lib/auth0/api/v1/clients.rb +48 -0
  49. data/lib/auth0/api/v1/connections.rb +51 -0
  50. data/lib/auth0/api/v1/logs.rb +41 -0
  51. data/lib/auth0/api/v1/rules.rb +44 -0
  52. data/lib/auth0/api/v1/users.rb +163 -0
  53. data/lib/auth0/client.rb +7 -0
  54. data/lib/auth0/exception.rb +18 -0
  55. data/lib/auth0/mixins.rb +13 -0
  56. data/lib/auth0/mixins/httparty_proxy.rb +29 -0
  57. data/lib/auth0/mixins/initializer.rb +25 -0
  58. data/lib/auth0/version.rb +4 -0
  59. data/lib/auth0_client.rb +3 -0
  60. data/spec/lib/auth0/api/authentication_endpoints_spec.rb +56 -0
  61. data/spec/lib/auth0/api/v1/clients_spec.rb +62 -0
  62. data/spec/lib/auth0/api/v1/connections_spec.rb +62 -0
  63. data/spec/lib/auth0/api/v1/logs_spec.rb +46 -0
  64. data/spec/lib/auth0/api/v1/rules_spec.rb +40 -0
  65. data/spec/lib/auth0/api/v1/users_spec.rb +215 -0
  66. data/spec/lib/auth0/client_spec.rb +19 -0
  67. data/spec/lib/auth0/mixins/httparty_proxy_spec.rb +60 -0
  68. data/spec/lib/auth0_client_spec.rb +8 -0
  69. data/spec/spec_helper.rb +18 -0
  70. data/spec/support/dummy_class.rb +7 -0
  71. data/spec/support/dummy_class_for_proxy.rb +4 -0
  72. data/spec/support/stub_response.rb +2 -0
  73. metadata +253 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 968e28f16a7b28d27b7fb2121cad3b112a8d1d1f
4
+ data.tar.gz: 5bd96f3f86aa4454a1cce8cf105a2f68e0662af9
5
+ SHA512:
6
+ metadata.gz: f026fef82e4f723a70102917f7d5585b81778e730411c73a4a636df86eaa2717198fd3b329f27d2e2ef7b50ababb193cfe3189db89caf0d04b3025b43d395b55
7
+ data.tar.gz: 7f5e504c556aef821b3f0a68fb1c12230e5561937f7f33d106ca533176f45cbe198615089f2bf4c25b672806b5c5a49668ec0496ea157d48340b225f70bb8ab5
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_JOBS: 4
@@ -0,0 +1,8 @@
1
+ .ruby-version
2
+ coverage
3
+ *.gem
4
+ .ruby-gemset
5
+ *.swp
6
+ *.swo
7
+ spec/auth0.yml
8
+ .yardoc
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in auth0.gemspec
4
+ gemspec
@@ -0,0 +1,68 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ auth0 (2.2.0)
5
+ httparty (~> 0.13)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ addressable (2.3.6)
11
+ byebug (3.5.1)
12
+ columnize (~> 0.8)
13
+ debugger-linecache (~> 1.2)
14
+ slop (~> 3.6)
15
+ columnize (0.9.0)
16
+ crack (0.4.2)
17
+ safe_yaml (~> 1.0.0)
18
+ debugger-linecache (1.2.0)
19
+ diff-lcs (1.2.5)
20
+ docile (1.1.5)
21
+ faker (1.4.3)
22
+ i18n (~> 0.5)
23
+ httparty (0.13.3)
24
+ json (~> 1.8)
25
+ multi_xml (>= 0.5.2)
26
+ i18n (0.7.0)
27
+ json (1.8.1)
28
+ multi_json (1.10.1)
29
+ multi_xml (0.5.5)
30
+ rack (1.5.2)
31
+ rack-test (0.6.2)
32
+ rack (>= 1.0)
33
+ rspec (3.1.0)
34
+ rspec-core (~> 3.1.0)
35
+ rspec-expectations (~> 3.1.0)
36
+ rspec-mocks (~> 3.1.0)
37
+ rspec-core (3.1.7)
38
+ rspec-support (~> 3.1.0)
39
+ rspec-expectations (3.1.2)
40
+ diff-lcs (>= 1.2.0, < 2.0)
41
+ rspec-support (~> 3.1.0)
42
+ rspec-mocks (3.1.3)
43
+ rspec-support (~> 3.1.0)
44
+ rspec-support (3.1.2)
45
+ safe_yaml (1.0.3)
46
+ simplecov (0.9.0)
47
+ docile (~> 1.1.0)
48
+ multi_json
49
+ simplecov-html (~> 0.8.0)
50
+ simplecov-html (0.8.0)
51
+ slop (3.6.0)
52
+ webmock (1.18.0)
53
+ addressable (>= 2.3.6)
54
+ crack (>= 0.3.2)
55
+ yard (0.8.7.6)
56
+
57
+ PLATFORMS
58
+ ruby
59
+
60
+ DEPENDENCIES
61
+ auth0!
62
+ byebug
63
+ faker
64
+ rack-test
65
+ rspec (~> 3.1.0, >= 3.1.0)
66
+ simplecov
67
+ webmock
68
+ yard
@@ -0,0 +1,27 @@
1
+ Ruby client for [Auth0](https://auth0.com)
2
+
3
+ > This used to be the omniauth strategy for [Auth0](https://auth0.com) but now is a client for the Auth0 api. The omniauth strategy has been moved to [omniauth-auth0](https://github.com/auth0/omniauth-auth0).
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ $ gem install auth0
9
+ ```
10
+
11
+ ## Basic usage
12
+
13
+ ```ruby
14
+ require "auth0"
15
+
16
+ auth0 = Auth0Client.new(
17
+ :client_id => "YOUR CLIENT ID",
18
+ :client_secret => "YOUR CLIENT SECRET",
19
+ :namespace => "<YOUR ACCOUNT>.auth0.com"
20
+ );
21
+
22
+ puts auth0.get_connections;
23
+ ```
24
+
25
+ ## License
26
+
27
+ MIT 2014 - Auth0 INC.
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+
5
+ desc "Run specs"
6
+ RSpec::Core::RakeTask.new
7
+
8
+ desc 'Run specs'
9
+ task :default => :spec
@@ -0,0 +1,29 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "auth0/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "auth0-ruby"
7
+ s.version = Auth0::VERSION
8
+ s.authors = ["Auth0", "Ezequiel Morito", "Jose Romaniello", "Petroe Ivan"]
9
+ s.email = ["petroei@gmail.com"]
10
+ s.homepage = "https://github.com/offtop/ruby-auth0"
11
+ s.summary = %q{Ruby client library for the Auth0 platform.}
12
+ s.description = %q{Ruby client library for the Auth0 platform. This is fork of https://github.com/auth0/ruby-auth0, but while auth0 is not hurring to merge prs, I've decided to make my own gem with blackjack and hookers. But I really recommend you to switch to ruby-auth0 gem after pr-9 will be merged.}
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_runtime_dependency 'httparty', '~> 0.13'
20
+
21
+ s.add_development_dependency 'rspec', '~> 3.1.0', '>= 3.1.0'
22
+ s.add_development_dependency 'rack-test'
23
+ s.add_development_dependency 'simplecov'
24
+ s.add_development_dependency 'webmock'
25
+ s.add_development_dependency 'byebug'
26
+ s.add_development_dependency 'faker'
27
+ s.add_development_dependency 'yard'
28
+ s.license = 'MIT'
29
+ end
@@ -0,0 +1,153 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Auth0
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!Auth0.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (A)</a> &raquo;
35
+
36
+
37
+ <span class="title">Auth0</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Auth0
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/auth0.rb<span class="defines">,<br />
83
+ lib/auth0/api/v1.rb,<br /> lib/auth0/version.rb,<br /> lib/auth0/exception.rb,<br /> lib/auth0/api/v1/logs.rb,<br /> lib/auth0/api/v1/users.rb,<br /> lib/auth0/api/v1/rules.rb,<br /> lib/auth0/api/v1/clients.rb,<br /> lib/auth0/api/v1/connections.rb,<br /> lib/auth0/mixins/initializer.rb,<br /> lib/auth0/mixins/httparty_proxy.rb,<br /> lib/auth0/api/authentication_endpoints.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+
92
+ <p>Namespace for ruby-auth0 logic</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+
100
+ </div><h2>Defined Under Namespace</h2>
101
+ <p class="children">
102
+
103
+
104
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Auth0/Api.html" title="Auth0::Api (module)">Api</a></span>, <span class='object_link'><a href="Auth0/Mixins.html" title="Auth0::Mixins (module)">Mixins</a></span>
105
+
106
+
107
+
108
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Auth0/BadRequest.html" title="Auth0::BadRequest (class)">BadRequest</a></span>, <span class='object_link'><a href="Auth0/Client.html" title="Auth0::Client (class)">Client</a></span>, <span class='object_link'><a href="Auth0/Exception.html" title="Auth0::Exception (class)">Exception</a></span>, <span class='object_link'><a href="Auth0/NotFound.html" title="Auth0::NotFound (class)">NotFound</a></span>, <span class='object_link'><a href="Auth0/ServerError.html" title="Auth0::ServerError (class)">ServerError</a></span>, <span class='object_link'><a href="Auth0/Unauthorized.html" title="Auth0::Unauthorized (class)">Unauthorized</a></span>, <span class='object_link'><a href="Auth0/Unsupported.html" title="Auth0::Unsupported (class)">Unsupported</a></span>, <span class='object_link'><a href="Auth0/UserIdIsBlank.html" title="Auth0::UserIdIsBlank (class)">UserIdIsBlank</a></span>
109
+
110
+
111
+ </p>
112
+
113
+ <h2>Constant Summary</h2>
114
+
115
+ <dl class="constants">
116
+
117
+ <dt id="VERSION-constant" class="">VERSION =
118
+ <div class="docstring">
119
+ <div class="discussion">
120
+
121
+ <p>current version of gem</p>
122
+
123
+
124
+ </div>
125
+ </div>
126
+ <div class="tags">
127
+
128
+
129
+ </div>
130
+ </dt>
131
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>2.2.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
132
+
133
+ </dl>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ </div>
145
+
146
+ <div id="footer">
147
+ Generated on Mon Jan 26 03:18:46 2015 by
148
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
+ 0.8.7.6 (ruby-2.0.0).
150
+ </div>
151
+
152
+ </body>
153
+ </html>
@@ -0,0 +1,128 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Auth0::Api
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!Auth0/Api.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (A)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Auth0.html" title="Auth0 (module)">Auth0</a></span></span>
36
+ &raquo;
37
+ <span class="title">Api</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Auth0::Api
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/auth0/api/v1.rb<span class="defines">,<br />
83
+ lib/auth0/api/v1/logs.rb,<br /> lib/auth0/api/v1/users.rb,<br /> lib/auth0/api/v1/rules.rb,<br /> lib/auth0/api/v1/clients.rb,<br /> lib/auth0/api/v1/connections.rb,<br /> lib/auth0/api/authentication_endpoints.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+
92
+ <p>Space for all API calls</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+
100
+ </div><h2>Defined Under Namespace</h2>
101
+ <p class="children">
102
+
103
+
104
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Api/AuthenticationEndpoints.html" title="Auth0::Api::AuthenticationEndpoints (module)">AuthenticationEndpoints</a></span>, <span class='object_link'><a href="Api/V1.html" title="Auth0::Api::V1 (module)">V1</a></span>
105
+
106
+
107
+
108
+
109
+ </p>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ </div>
120
+
121
+ <div id="footer">
122
+ Generated on Mon Jan 26 03:18:46 2015 by
123
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
+ 0.8.7.6 (ruby-2.0.0).
125
+ </div>
126
+
127
+ </body>
128
+ </html>