discourse_mountable_sso 0.0.1 → 0.0.2

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODk3YWM0ZDgwODE4N2E1Mjk3NWYwYjMxOTZmYWYyMTUwMzJhYzY4Yw==
4
+ ODY3Y2VmNjE0Y2JhY2Y4NjE1MzU3Mjc3MGYyZTZkMzM3ZDUyNTI1Zg==
5
5
  data.tar.gz: !binary |-
6
- YmI2NjQ4NDFhY2Q5ZWFjMGU3NjZkOTcxYjU2MjRmZTY2ODJjMWE2NA==
6
+ MzE0ZTU3MTE2NjBlMmQ1OTVkZmE2ZWI4ODBkMzhkYTNkM2E5Mjk2Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjZhMGJiNmQwNzAyNGFlZmU2ZDdiYjY2NjEwZjZiZjEzMjNjMTFjYzU5YTIx
10
- OWQzNWExOTBkNjk2ODk4ZmExODRlNDBiMjkwNWEyNjEyNTc4Y2E1ZTQ0ZDk1
11
- ZWUyY2NkM2Y3MDA2MDBiZGVjNDQxYzQ4MWJiMDIyZTZkYmE1NWY=
9
+ ZjdmYWQ3MmU3ZjZlMTJjNDkzYTBiYTI5MTRhNmRiYWFkYTcwNzk5ODYyNGEx
10
+ YmM3MTRhYmRiYmMxYzA3YWM3ZjJkNmVlMmVlMWE0OWUyM2I4NjY2YjNmZWMw
11
+ MTI1ZTk0ZGFhODZjMTk0MzAwOTc1MDVkNWIyY2M3ZjdkNTQzN2M=
12
12
  data.tar.gz: !binary |-
13
- YjgzMzYxNGZjZmJkZjZjMzYwNGViMTc3YTUyYTllZDIwZThhMTVlZmIyN2Yw
14
- NWQ3YWEyMDU3MWE1YjhkODEzMGVkZDBkMmQ5ZTMzOTgwNjJjODcxNWQ2NGNh
15
- ZDViOGM5Mjk4ZDEyYjNmMmZkMDQxMzZiZDg4YTA4NWU1N2FiZjM=
13
+ ZjRkNDA5NWNkMzk1Zjk3ZDU4NThlZDcwMWEzNzY4OTEwNWRiMTY0MmE4YmRm
14
+ N2NmOWUwYzNlMzYzYjRkM2U3YTQ3Yjg1YjlhNDRmZDZiM2RkYzRjYTdlMzhm
15
+ ZTNlMTcxOTYwNWJiNDZjZDZjZDNjYzkwOTU5MTQzZTlhNjhmNTQ=
data/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # DiscourseMountableSso
2
+
3
+ Discourse Mountable Sso is a mountable engine made to handle [Discourse](https://github.com/discourse/discourse/) single sign on technique.
4
+
5
+ ##Getting started
6
+
7
+ Discourse mountable sso 0.0.1 works with Rails 3.2.14 . You can add it to your Gemfile with:
8
+
9
+ ```ruby
10
+ gem 'discourse_mountable_sso'
11
+ ```
12
+
13
+ Run the bundle command to install it.
14
+
15
+ After you install Discourse mountable sso and add it to your Gemfile, you need to create a file in config/initializers in your application named discourse_config.rb filled with the below data
16
+
17
+
18
+ ```ruby
19
+ #config/initializers/discourse_config.rb
20
+ DiscourseMountableSso.configuration.secret = "#{SECRET}"
21
+ DiscourseMountableSso.configuration.discourse_url = "#{DISCOURSE_URL}"
22
+ DiscourseMountableSso.configuration.login_path = "#{LOGIN_PATH}"
23
+ DiscourseMountableSso.configuration.discourse_data_method = "#{DISCOURSE_DATA_METHOD}"
24
+ DiscourseMountableSso.configuration.logged_in_check_method = "#{CHECK_LOGIN_METHOD}"
25
+ DiscourseMountableSso.configuration.store_return_to_url_method = "#{RETURN_TO_URL_METHOD}"
26
+ ```
27
+ ##Configuration description
28
+
29
+ * secret : Is the the secret you configured in your discourse admin panel
30
+ * discourse_url : Is the URL of your discourse application.
31
+ * login_path : Is the login path of your own app as www.example.com/login then your login path will be "/login"
32
+ * discourse_data_method : Is a method returns the user data for discourse in this format:
33
+ * ``` {:avatar_url=>"http://www.example.com/avatar1.jpg", :email=>"lorem@ipsum.com", :name=>"lorem", :username=>"lorem", :external_id=>1}```
34
+ * logged_in_check_method : Is a method to check if the user is logged in or not and returns true or false.
35
+ * store_return_to_url_method : Is a method to store the return_to path as after the user log-in in your app it'll be redirected back to discourse server.
36
+
37
+ ##Note:
38
+ * We use a cookie named [:discourse_mountable_sso][:query_string]
39
+
40
+
@@ -1,3 +1,3 @@
1
1
  module DiscourseMountableSso
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_mountable_sso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohamed N.Salah
@@ -14,22 +14,22 @@ dependencies:
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - <
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '4.2'
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 3.2.14
22
+ version: '3.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ~>
27
+ - - <
28
28
  - !ruby/object:Gem::Version
29
- version: '3.2'
29
+ version: '4.2'
30
30
  - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
- version: 3.2.14
32
+ version: '3.2'
33
33
  description: Discourse Mountable Sso is a mountable engine made to handle Discourse
34
34
  single sign on technique,it works with Rails 3.2.14
35
35
  email:
@@ -39,7 +39,7 @@ extensions: []
39
39
  extra_rdoc_files: []
40
40
  files:
41
41
  - MIT-LICENSE
42
- - README.rdoc
42
+ - README.md
43
43
  - Rakefile
44
44
  - app/assets/javascripts/discourse_mountable_sso/application.js
45
45
  - app/assets/stylesheets/discourse_mountable_sso/application.css
@@ -115,8 +115,9 @@ files:
115
115
  - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
116
116
  - test/integration/navigation_test.rb
117
117
  - test/test_helper.rb
118
- homepage: ''
119
- licenses: []
118
+ homepage: https://rubygems.org/gems/discourse_mountable_sso
119
+ licenses:
120
+ - MIT-LICENSE
120
121
  metadata: {}
121
122
  post_install_message:
122
123
  rdoc_options: []
data/README.rdoc DELETED
@@ -1,6 +0,0 @@
1
- = DiscourseMountableSso
2
-
3
- First you need to create a file in config/initializers in your application name discourse_config.rb
4
- ```ruby
5
- gem 'discourse_mountable_sso'
6
- ```