social_stream-oauth2_server 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/Gemfile +5 -0
- data/README.rdoc +3 -0
- data/Rakefile +26 -0
- data/app/assets/images/logos/small/site.png +0 -0
- data/app/assets/javascripts/social_stream-oauth2_server.js +6 -0
- data/app/assets/javascripts/social_stream/site_client.js +15 -0
- data/app/assets/stylesheets/social_stream-oauth2_server.css.sass +24 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/applications/_applications-oauth2server.css.sass +45 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/applications/layout/_applications-oauth2server.css.sass +51 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/applications/responsive/_responsive-1200px-min.css.sass +7 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/applications/responsive/_responsive-767px-max.css.sass +35 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/applications/responsive/_responsive-768px-979px.css.sass +8 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/create/_create-oauth2server.css.sass +11 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/create/_error_create-oauth2server.css.sass +13 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/create/layout/_create-oauth2server.css.sass +19 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/create/responsive/_responsive-1200px-min.css.sass +7 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/create/responsive/_responsive-767px-max.css.sass +16 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/create/responsive/_responsive-768px-979px.css.sass +8 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/show/_show-oauth2server.css.sass +42 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/show/layout/_show-oauth2server.css.sass +71 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/show/responsive/_responsive-1200px-min.css.sass +7 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/show/responsive/_responsive-767px-max.css.sass +16 -0
- data/app/assets/stylesheets/social_stream/oauth2_server/show/responsive/_responsive-768px-979px.css.sass +8 -0
- data/app/controllers/authorizations_controller.rb +67 -0
- data/app/controllers/site/clients_controller.rb +39 -0
- data/app/decorators/social_stream/base/actor_decorator.rb +3 -0
- data/app/decorators/social_stream/base/user_decorator.rb +3 -0
- data/app/helpers/site_client_helper.rb +17 -0
- data/app/models/oauth2_token.rb +33 -0
- data/app/models/oauth2_token/access_token.rb +32 -0
- data/app/models/oauth2_token/authorization_code.rb +5 -0
- data/app/models/oauth2_token/refresh_token.rb +7 -0
- data/app/models/relation/admin.rb +9 -0
- data/app/models/relation/auth.rb +8 -0
- data/app/models/site/client.rb +38 -0
- data/app/overrides/frontpage/_presentation/client_site_presentation.html.erb.deface +8 -0
- data/app/overrides/layouts/_header_dropdown_menu/applications_entry.html.erb.deface +4 -0
- data/app/views/authorizations/error.html.erb +4 -0
- data/app/views/authorizations/new.html.erb +27 -0
- data/app/views/site/clients/_form.html.erb +39 -0
- data/app/views/site/clients/_new.modal.html.erb +9 -0
- data/app/views/site/clients/_presentation.html.erb +13 -0
- data/app/views/site/clients/index.html.erb +42 -0
- data/app/views/site/clients/new.html.erb +10 -0
- data/app/views/site/clients/show.html.erb +44 -0
- data/config/locales/en.yml +29 -0
- data/config/locales/es.yml +29 -0
- data/config/routes.rb +10 -0
- data/db/migrate/20130115102300_create_social_stream_oauth2_server.rb +25 -0
- data/lib/generators/social_stream/oauth2_server/install_generator.rb +23 -0
- data/lib/social_stream-oauth2_server.rb +19 -0
- data/lib/social_stream/migrations/oauth2_server.rb +8 -0
- data/lib/social_stream/oauth2_server.rb +5 -0
- data/lib/social_stream/oauth2_server/controllers/helpers.rb +41 -0
- data/lib/social_stream/oauth2_server/engine.rb +21 -0
- data/lib/social_stream/oauth2_server/models/actor.rb +11 -0
- data/lib/social_stream/oauth2_server/models/user.rb +35 -0
- data/lib/social_stream/oauth2_server/token_endpoint.rb +41 -0
- data/lib/social_stream/oauth2_server/version.rb +5 -0
- data/lib/tasks/db/populate.rake +37 -0
- data/social_stream-oauth2_server.gemspec +19 -0
- data/spec/controllers/authorizations_controller_spec.rb +179 -0
- data/spec/controllers/dummy_controller_spec.rb +43 -0
- data/spec/factories/site_client.rb +6 -0
- data/spec/models/relation/auth_spec.rb +15 -0
- data/spec/models/site/client_spec.rb +22 -0
- metadata +156 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b25a88e655c69efdc439e96aa132462b232e43c5
|
4
|
+
data.tar.gz: 12e63fe3a205656b2216048de447571109b128a3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6ca006233a29b14603efe843ef392b67de7057058eb61260c4a8e6e39d9f6ab6804b3626652f7a4097297d551c6b439fe98396f0ad1f972e4c7eff02154d3496
|
7
|
+
data.tar.gz: 635390b44a440b8ba1643e3c4a54ed08ce0b1cea2eaae56716b044a223954bede6957facb7e138c62a818f7d6d73675e0aeb64ba4b3a68b79ada1d592bbd9796
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'bundler/gem_tasks'
|
3
|
+
|
4
|
+
require 'rdoc/task'
|
5
|
+
|
6
|
+
require 'rspec/core'
|
7
|
+
require 'rspec/core/rake_task'
|
8
|
+
|
9
|
+
RSpec::Core::RakeTask.new(:spec)
|
10
|
+
|
11
|
+
task :default => :spec
|
12
|
+
|
13
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
14
|
+
rdoc.rdoc_dir = 'rdoc'
|
15
|
+
rdoc.title = 'Socialstream OAuth2 Server'
|
16
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
17
|
+
rdoc.rdoc_files.include('README.rdoc')
|
18
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
19
|
+
end
|
20
|
+
|
21
|
+
# Modify this gem's tags
|
22
|
+
class Bundler::GemHelper
|
23
|
+
def version_tag
|
24
|
+
"oauth2_server#{version}"
|
25
|
+
end
|
26
|
+
end
|
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
//= require social_stream/callback
|
2
|
+
|
3
|
+
SocialStream.SiteClient = (function(SS, $, undefined) {
|
4
|
+
var callback = new SS.Callback();
|
5
|
+
|
6
|
+
var initNewModal = function() {
|
7
|
+
$('.new_site_client-modal-link').attr('href', '#new_site_client-modal');
|
8
|
+
};
|
9
|
+
|
10
|
+
callback.register('index', initNewModal);
|
11
|
+
|
12
|
+
return callback.extend({
|
13
|
+
});
|
14
|
+
|
15
|
+
})(SocialStream, jQuery);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@import "social_stream/oauth2_server/applications/applications-oauth2server"
|
2
|
+
@import "social_stream/oauth2_server/applications/layout/applications-oauth2server"
|
3
|
+
|
4
|
+
@import "social_stream/oauth2_server/applications/responsive/responsive-1200px-min"
|
5
|
+
@import "social_stream/oauth2_server/applications/responsive/responsive-768px-979px"
|
6
|
+
@import "social_stream/oauth2_server/applications/responsive/responsive-767px-max"
|
7
|
+
|
8
|
+
|
9
|
+
@import "social_stream/oauth2_server/create/create-oauth2server"
|
10
|
+
@import "social_stream/oauth2_server/create/layout/create-oauth2server"
|
11
|
+
|
12
|
+
@import "social_stream/oauth2_server/create/responsive/responsive-1200px-min"
|
13
|
+
@import "social_stream/oauth2_server/create/responsive/responsive-768px-979px"
|
14
|
+
@import "social_stream/oauth2_server/create/responsive/responsive-767px-max"
|
15
|
+
|
16
|
+
@import "social_stream/oauth2_server/create/error_create-oauth2server"
|
17
|
+
|
18
|
+
|
19
|
+
@import "social_stream/oauth2_server/show/show-oauth2server"
|
20
|
+
@import "social_stream/oauth2_server/show/layout/show-oauth2server"
|
21
|
+
|
22
|
+
@import "social_stream/oauth2_server/show/responsive/responsive-1200px-min"
|
23
|
+
@import "social_stream/oauth2_server/show/responsive/responsive-768px-979px"
|
24
|
+
@import "social_stream/oauth2_server/show/responsive/responsive-767px-max"
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#site_clients
|
2
|
+
.site_clients
|
3
|
+
header
|
4
|
+
font-size: 21px
|
5
|
+
color: $gray
|
6
|
+
a
|
7
|
+
font-size: 14px
|
8
|
+
.btn
|
9
|
+
@extend .btn-blue
|
10
|
+
.soften
|
11
|
+
@include opacity (100)
|
12
|
+
|
13
|
+
.name,
|
14
|
+
.url,
|
15
|
+
.users
|
16
|
+
color: $gray
|
17
|
+
|
18
|
+
.name
|
19
|
+
font-size: 16px
|
20
|
+
|
21
|
+
.url
|
22
|
+
a
|
23
|
+
color: $gray
|
24
|
+
&:hover
|
25
|
+
color: $blue
|
26
|
+
|
27
|
+
.users
|
28
|
+
font-size: 16px
|
29
|
+
span
|
30
|
+
color: $blue
|
31
|
+
|
32
|
+
#new_site_client-modal
|
33
|
+
.modal-body
|
34
|
+
input
|
35
|
+
&[type="file"]
|
36
|
+
line-height: 0px
|
37
|
+
|
38
|
+
.field_with_errors
|
39
|
+
input
|
40
|
+
&[type="text"]
|
41
|
+
background-clor: red
|
42
|
+
|
43
|
+
#new_application
|
44
|
+
.btn
|
45
|
+
@extend .btn-blue
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#site_clients
|
2
|
+
@include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
3
|
+
#toolbar
|
4
|
+
display: none !important
|
5
|
+
.site_clients
|
6
|
+
@include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
7
|
+
header
|
8
|
+
a
|
9
|
+
float: right
|
10
|
+
.button_to
|
11
|
+
float: right
|
12
|
+
.soften
|
13
|
+
margin: 9px 0 10px 0
|
14
|
+
clear: both
|
15
|
+
img
|
16
|
+
display: inline
|
17
|
+
@include size (40px, 40px)
|
18
|
+
float: left
|
19
|
+
|
20
|
+
.name,
|
21
|
+
.url,
|
22
|
+
.users
|
23
|
+
display: inline-block
|
24
|
+
|
25
|
+
.name,
|
26
|
+
.url
|
27
|
+
margin-left: 20px
|
28
|
+
@include grid-core-span(7, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
29
|
+
|
30
|
+
.users
|
31
|
+
@include grid-core-span(3, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
32
|
+
float: right
|
33
|
+
margin-top: -8px
|
34
|
+
text-align: right
|
35
|
+
|
36
|
+
|
37
|
+
#new_site_client-modal
|
38
|
+
.modal-body
|
39
|
+
max-height: 520px
|
40
|
+
padding: 0 15px 15px 15px
|
41
|
+
form.new_site_client
|
42
|
+
margin-left: 0px
|
43
|
+
width: 100%
|
44
|
+
.name,
|
45
|
+
.url
|
46
|
+
margin-left: 0px
|
47
|
+
width: 100%
|
48
|
+
input
|
49
|
+
&[type="file"]
|
50
|
+
line-height: 0px
|
51
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
//
|
2
|
+
// Responsive: Landscape phone to desktop/tablet
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
@media (max-width: 767px)
|
7
|
+
|
8
|
+
#new_site_client
|
9
|
+
.new_site_client
|
10
|
+
@include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
11
|
+
h1
|
12
|
+
@extend .hidden-phone
|
13
|
+
@extend .hidden-tablet
|
14
|
+
#error_explanation
|
15
|
+
h2
|
16
|
+
font-size: 20px
|
17
|
+
#new_application
|
18
|
+
section
|
19
|
+
input
|
20
|
+
&[type="file"],
|
21
|
+
&[type="text"]
|
22
|
+
@include grid-core-span(11, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
23
|
+
margin-left: 2.9%
|
24
|
+
textarea
|
25
|
+
@include grid-core-span(11, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
26
|
+
margin-left: 2.9%
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
// UP TO LANDSCAPE PHONE
|
31
|
+
// ---------------------
|
32
|
+
|
33
|
+
@media (max-width: 480px)
|
34
|
+
|
35
|
+
|
data/app/assets/stylesheets/social_stream/oauth2_server/create/layout/_create-oauth2server.css.sass
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#content
|
2
|
+
.box
|
3
|
+
padding: 14px 20px 74px 20px
|
4
|
+
input
|
5
|
+
width: 60%
|
6
|
+
&[type="submit"]
|
7
|
+
width: 100%
|
8
|
+
margin-top: 10px
|
9
|
+
.upload
|
10
|
+
float: right
|
11
|
+
margin: -25px 6px 0px 0px
|
12
|
+
.image
|
13
|
+
width: 135px
|
14
|
+
height: 135px
|
15
|
+
margin-top: -131px
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#new_application
|
2
|
+
section
|
3
|
+
border-bottom: 1px dashed #ccc
|
4
|
+
label
|
5
|
+
font-size: 22px
|
6
|
+
font-weight: bold
|
7
|
+
color: #ccc
|
8
|
+
|
9
|
+
|
10
|
+
#oauth2_server
|
11
|
+
h1
|
12
|
+
text-align: left
|
13
|
+
.content
|
14
|
+
@include gradient-vertical($startColor: #ccc, $endColor: #f9f9f9)
|
15
|
+
.media
|
16
|
+
.media-body
|
17
|
+
.name,
|
18
|
+
.url,
|
19
|
+
.users
|
20
|
+
color: $gray
|
21
|
+
.name
|
22
|
+
font-size: 16px
|
23
|
+
.url
|
24
|
+
a
|
25
|
+
color: $gray
|
26
|
+
&:hover
|
27
|
+
color: $blue
|
28
|
+
.result,
|
29
|
+
.client_secret
|
30
|
+
background-color: #f9f9f9
|
31
|
+
@extend border-radius-5
|
32
|
+
font-size: 15px
|
33
|
+
|
34
|
+
.client_secret
|
35
|
+
border: 1px solid ccc
|
36
|
+
overflow-y: hidden
|
37
|
+
overflow-x: scroll
|
38
|
+
|
39
|
+
.users
|
40
|
+
font-size: 16px
|
41
|
+
span
|
42
|
+
color: $blue
|
data/app/assets/stylesheets/social_stream/oauth2_server/show/layout/_show-oauth2server.css.sass
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
#new_application
|
2
|
+
padding: 5px 7px
|
3
|
+
form
|
4
|
+
margin: 0 0 40px
|
5
|
+
section
|
6
|
+
padding-top: 15px
|
7
|
+
label
|
8
|
+
padding-left: 14px
|
9
|
+
.title
|
10
|
+
input
|
11
|
+
@include size(26px, 97%)
|
12
|
+
.url,
|
13
|
+
.callback_url
|
14
|
+
textarea
|
15
|
+
display: inline
|
16
|
+
@include size(21px, 97%)
|
17
|
+
padding-top: 7px
|
18
|
+
|
19
|
+
.description
|
20
|
+
height: 100px
|
21
|
+
textarea
|
22
|
+
display: inline-block
|
23
|
+
@include size (52px, 97%)
|
24
|
+
padding-top: 7px
|
25
|
+
input
|
26
|
+
&[type="submit"]
|
27
|
+
float: right
|
28
|
+
margin-top: 14px
|
29
|
+
margin-right: 1px
|
30
|
+
|
31
|
+
|
32
|
+
#oauth2_server
|
33
|
+
width: 80%
|
34
|
+
margin-left: 2.85%
|
35
|
+
display: inline-block
|
36
|
+
h1
|
37
|
+
@include clearfix
|
38
|
+
margin-bottom: 4px
|
39
|
+
.soften
|
40
|
+
margin-bottom: 0px
|
41
|
+
.content
|
42
|
+
padding: 14px
|
43
|
+
.media
|
44
|
+
margin-top: 0
|
45
|
+
.media-body
|
46
|
+
margin-left: 2.85%
|
47
|
+
img
|
48
|
+
display: inline
|
49
|
+
@include size (40px, 40px)
|
50
|
+
h4
|
51
|
+
margin-bottom: 0px
|
52
|
+
.name,
|
53
|
+
.url,
|
54
|
+
.users
|
55
|
+
display: inline-block
|
56
|
+
.name,
|
57
|
+
.url
|
58
|
+
margin-left: 20px
|
59
|
+
|
60
|
+
.result,
|
61
|
+
.client_secret
|
62
|
+
padding: 7px
|
63
|
+
margin-bottom: 20px
|
64
|
+
|
65
|
+
.client_secret
|
66
|
+
height: 23px
|
67
|
+
p
|
68
|
+
width: 250%
|
69
|
+
.users
|
70
|
+
float: right
|
71
|
+
margin-top: 7px
|