discourse_mountable_sso 0.0.1
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 +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +6 -0
- data/Rakefile +40 -0
- data/app/assets/javascripts/discourse_mountable_sso/application.js +15 -0
- data/app/assets/stylesheets/discourse_mountable_sso/application.css +13 -0
- data/app/controllers/discourse_mountable_sso/application_controller.rb +4 -0
- data/app/controllers/discourse_mountable_sso/discourse_sso_controller.rb +35 -0
- data/app/helpers/discourse_mountable_sso/application_helper.rb +4 -0
- data/app/views/layouts/discourse_mountable_sso/application.html.erb +14 -0
- data/config/routes.rb +3 -0
- data/lib/discourse_mountable_sso/configuration.rb +11 -0
- data/lib/discourse_mountable_sso/engine.rb +5 -0
- data/lib/discourse_mountable_sso/single_sign_on.rb +104 -0
- data/lib/discourse_mountable_sso/version.rb +3 -0
- data/lib/discourse_mountable_sso.rb +11 -0
- data/lib/tasks/discourse_mountable_sso_tasks.rake +4 -0
- data/test/discourse_mountable_sso_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/images/header_bg.png +0 -0
- data/test/dummy/app/assets/images/rails.png +0 -0
- data/test/dummy/app/assets/images/ruby-source-logo.png +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/login.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +91 -0
- data/test/dummy/app/assets/stylesheets/login.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +51 -0
- data/test/dummy/app/controllers/sessions_controller.rb +51 -0
- data/test/dummy/app/controllers/users_controller.rb +26 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/user.rb +42 -0
- data/test/dummy/app/views/layouts/application.html.erb +42 -0
- data/test/dummy/app/views/sessions/home.html.erb +1 -0
- data/test/dummy/app/views/sessions/login.html.erb +15 -0
- data/test/dummy/app/views/sessions/profile.html.erb +1 -0
- data/test/dummy/app/views/sessions/setting.html.erb +1 -0
- data/test/dummy/app/views/users/new.html.erb +32 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +42 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/discourse_config.rb +6 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20120319110639_create_users.rb +11 -0
- data/test/dummy/db/schema.rb +25 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/log/development.log +8438 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/CAF/FF0/sprockets%2F7d59289db40c84ab90ba221598408d31 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CDE/490/sprockets%2F48dba258a70774e9038bbc1280fe8134 +0 -0
- data/test/dummy/tmp/cache/assets/D2D/420/sprockets%2F9a1401b402e78bf1b5e9c31c01fe760d +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D69/D30/sprockets%2F34a9c65c0c96b635e0be0d76cd25af25 +0 -0
- data/test/dummy/tmp/cache/assets/D71/280/sprockets%2Fff59dd175fb96b014fe2bc490554d0f1 +0 -0
- data/test/dummy/tmp/cache/assets/D99/400/sprockets%2Fc4a46e4d6b50babbb4723883ae376e4f +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- metadata +203 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '05e9822fee379c8fc9bb9f2ba55a6f0c75eee302e24801ab06bda8f2873fdf89d5bf49385909f12b594b9c1962d52a6bc2d412f389ed6cb3e5e8d685ef6fdf1d'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
match ':controller(/:action(/:id))(.:format)', :via => [:get,:post]
|
4
|
+
root :to => 'sessions#login'
|
5
|
+
|
6
|
+
match "signup", :to => "users#new", :via => [:get], :as => 'signup'
|
7
|
+
match "login", :to => "sessions#login", :via => [:get], :as => 'login'
|
8
|
+
match "logout", :to => "sessions#logout", :via => [:get], :as => 'logout'
|
9
|
+
match "home", :to => "sessions#home", :via => [:get], :as => 'home'
|
10
|
+
match "profile", :to => "sessions#profile", :via => [:get], :as => 'profile'
|
11
|
+
match "setting", :to => "sessions#setting", :via => [:get], :as => 'setting'
|
12
|
+
|
13
|
+
mount DiscourseMountableSso::Engine => "/discourse_mountable_sso"
|
14
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20120319110639) do
|
15
|
+
|
16
|
+
create_table "users", :force => true do |t|
|
17
|
+
t.string "username"
|
18
|
+
t.string "email"
|
19
|
+
t.string "encrypted_password"
|
20
|
+
t.string "salt"
|
21
|
+
t.datetime "created_at", :null => false
|
22
|
+
t.datetime "updated_at", :null => false
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|