Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
356d384
🚚 Rename to masq2
pboling Jan 14, 2025
b4b61f1
Rails 4 Gemfile
Dec 13, 2017
508d54a
Rails 4 changes
Dec 13, 2017
9dccc71
Update travis details and gemspec
Dec 13, 2017
14f03c6
Fix test schema to match column rename
Dec 13, 2017
944068d
Rails 4.1 Masq Support
Dec 18, 2017
78ebd19
Rails 4.1 remove turn dependency
Dec 19, 2017
95656eb
Tidy up instance variable not initialized warnings
Dec 19, 2017
a2f4b23
Travis tests expand_path change
Dec 19, 2017
89eb7ef
Rails 4.2 Upgrade
Dec 20, 2017
ff3f9e0
Update deprication and failing tests
Dec 20, 2017
f7fd5b9
Update travis badge for branch
Dec 20, 2017
19fffe1
Fix broken tests for rails 4.2
Dec 20, 2017
78399fe
Rails 5.0 Masq upgrade
Jan 3, 2018
a1543ea
Test deprication changes
Jan 3, 2018
0aa5cf2
Rails 5.0 get tests passing
Jan 3, 2018
d1c7d02
Rails 5.0 travis badge update
Jan 3, 2018
5b04024
Rails 5.0 remove deprications
Jan 3, 2018
efcbc8a
Remove find_by search shorthands
Jan 26, 2018
935b981
Expect auth token
Aug 21, 2019
eae3ede
🚨 Fix Markdown formatting
pboling Nov 8, 2024
a7108df
🔒️ Use HTTPS for rubygems source
pboling Nov 8, 2024
ac7f322
⬆️ Rails ~> 5.1
pboling Nov 8, 2024
601cea6
🔥 auto_explain_threshold_in_seconds was deprecated in Rails 4.0, remo…
pboling Nov 8, 2024
ebae030
🚨 Linting
pboling Nov 8, 2024
2c02c44
🚨 where(**).first => find_by
pboling Nov 8, 2024
e49d4e7
⬆️ Rails 4 => 5 upgrade: Migrations
pboling Nov 8, 2024
fcf88ee
✨ Allow either id or login for accounts/show
pboling Nov 8, 2024
d73d0e5
✨ Allow ERB within YAML for config file
pboling Nov 8, 2024
0327e37
🔧 Rails 4.2 config updates
pboling Nov 8, 2024
5c799a7
➕ erb
pboling Nov 8, 2024
39295b0
⬆️ Rails 4 => 5 upgrade: Controller & Parameters
pboling Nov 8, 2024
155c26e
✨ Allow logout via DELETE HTTP method
pboling Nov 8, 2024
fd2d12c
🐛 Fix locale key issues
pboling Nov 8, 2024
860ab0f
⬆️ Rails 5.0 => 5.1 upgrade: before_filter => before_action
pboling Nov 8, 2024
fdb9eba
⬆️ Rails 5.0 => 5.1 upgrade: avoid loading sprockets
pboling Nov 8, 2024
f7184a3
🐛 Fix before_destroy callback on Persona
pboling Nov 8, 2024
9e11bb4
🔥 mass_assignment_sanitizer isn't part of Rails 5.1
pboling Nov 8, 2024
c90f986
🔥 kill asset pipeline
pboling Nov 8, 2024
f8c66c3
🔥 Fix deprecation for Rails 5.2
pboling Nov 8, 2024
895d735
💚 Fix tests
pboling Nov 8, 2024
bfb7929
🔥 Travis is dead
pboling Nov 8, 2024
63dc6c0
✅ Timestamp math & comparison can be inaccurate
pboling Nov 8, 2024
8940422
✅ String equality > Object equality
pboling Nov 8, 2024
2fa1dca
➕ mysql2, pg for tests
pboling Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 2.7.8
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
source "http://rubygems.org"
source "https://rubygems.org"

group :development, :test do
platforms :ruby, :mswin, :mingw do
gem 'sqlite3'
#gem 'mysql2'
#gem 'pg'
gem 'mysql2'
gem 'pg'
gem 'byebug'
#gem 'activerecord-oracle_enhanced-adapter'
#gem 'ruby-plsql'
#gem 'ruby-oci8'
end
gem 'minitest'
gem 'rails-controller-testing'
gem 'test-unit', '~> 3.0'
gem 'turn'
gem 'mocha'
gem 'ruby_gntp'
gem 'guard-minitest'
Expand Down
243 changes: 145 additions & 98 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,129 +2,176 @@ PATH
remote: .
specs:
masq (0.3.4)
erb
i18n_data
rails (~> 3.2.0)
rails (~> 5.1.0)
rails-controller-testing
ruby-openid
ruby-yadis
yubikey

GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
actionmailer (3.2.22.2)
actionpack (= 3.2.22.2)
mail (~> 2.5.4)
actionpack (3.2.22.2)
activemodel (= 3.2.22.2)
activesupport (= 3.2.22.2)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.22.2)
activesupport (= 3.2.22.2)
builder (~> 3.0.0)
activerecord (3.2.22.2)
activemodel (= 3.2.22.2)
activesupport (= 3.2.22.2)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.22.2)
activemodel (= 3.2.22.2)
activesupport (= 3.2.22.2)
activesupport (3.2.22.2)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
ansi (1.5.0)
arel (3.0.3)
builder (3.0.4)
concurrent-ruby (1.0.5)
erubis (2.7.0)
actioncable (5.1.7)
actionpack (= 5.1.7)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.7)
actionpack (= 5.1.7)
actionview (= 5.1.7)
activejob (= 5.1.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.7)
actionview (= 5.1.7)
activesupport (= 5.1.7)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.7)
activesupport (= 5.1.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.7)
activesupport (= 5.1.7)
globalid (>= 0.3.6)
activemodel (5.1.7)
activesupport (= 5.1.7)
activerecord (5.1.7)
activemodel (= 5.1.7)
activesupport (= 5.1.7)
arel (~> 8.0)
activesupport (5.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (8.0.0)
builder (3.3.0)
byebug (11.1.3)
cgi (0.4.1)
concurrent-ruby (1.3.4)
crass (1.0.6)
date (3.4.0)
erb (4.0.4)
cgi (>= 0.3.3)
erubi (1.13.0)
globalid (1.1.0)
activesupport (>= 5.0)
guard-compat (1.2.1)
guard-minitest (2.4.5)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
hike (1.2.3)
i18n (0.9.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
i18n_data (0.8.0)
journey (1.0.4)
json (1.8.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.4)
mime-types (1.25.1)
minitest (4.7.5)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.12.2)
polyglot (0.3.5)
power_assert (0.2.2)
rack (1.4.7)
rack-cache (1.6.1)
rack (>= 0.4)
rack-ssl (1.3.4)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (3.2.22.2)
actionmailer (= 3.2.22.2)
actionpack (= 3.2.22.2)
activerecord (= 3.2.22.2)
activeresource (= 3.2.22.2)
activesupport (= 3.2.22.2)
bundler (~> 1.0)
railties (= 3.2.22.2)
railties (3.2.22.2)
actionpack (= 3.2.22.2)
activesupport (= 3.2.22.2)
rack-ssl (~> 1.3.2)
i18n_data (0.17.1)
simple_po_parser (~> 1.1)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.1)
mocha (2.5.0)
ruby2_keywords (>= 0.0.5)
mysql2 (0.5.6)
net-imap (0.4.17)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.15.6-arm64-darwin)
racc (~> 1.4)
pg (1.5.9)
racc (1.8.1)
rack (2.2.10)
rack-test (2.1.0)
rack (>= 1.3)
rails (5.1.7)
actioncable (= 5.1.7)
actionmailer (= 5.1.7)
actionpack (= 5.1.7)
actionview (= 5.1.7)
activejob (= 5.1.7)
activemodel (= 5.1.7)
activerecord (= 5.1.7)
activesupport (= 5.1.7)
bundler (>= 1.3.0)
railties (= 5.1.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (5.1.7)
actionpack (= 5.1.7)
activesupport (= 5.1.7)
method_source
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (12.3.0)
rb-fsevent (0.9.7)
rdoc (3.12.2)
json (~> 1.4)
ruby-openid (2.7.0)
thor (>= 0.18.1, < 2.0)
rake (13.2.1)
rb-fsevent (0.11.2)
ruby-openid (2.9.2)
ruby-yadis (0.3.4)
ruby2_keywords (0.0.5)
ruby_gntp (0.3.4)
sprockets (2.2.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.11)
test-unit (3.0.8)
power_assert
thor (0.20.0)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turn (0.9.7)
ansi
minitest (~> 4)
tzinfo (0.3.53)
simple_po_parser (1.1.6)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
thor (1.3.2)
thread_safe (0.3.6)
timeout (0.4.2)
tzinfo (1.2.11)
thread_safe (~> 0.1)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
yubikey (1.4.1)

PLATFORMS
ruby
arm64-darwin-22

DEPENDENCIES
byebug
guard-minitest
masq!
minitest
mocha
mysql2
pg
rails-controller-testing
rb-fsevent
ruby_gntp
sqlite3
test-unit (~> 3.0)
turn

BUNDLED WITH
1.12.5
2.4.22
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# Masq OpenID Server
# Masq2 OpenID Server

[![Build Status](https://travis-ci.org/bardbess/masq.svg?branch=master)](http://travis-ci.org/bardbess/masq)
Masq2 is a mountable Rails engine that provides OpenID server/identity provider functionality.
It is the successor to the [masq gem](https://github.com/dennisreimann/masq), which in turn
was the successor of the stand-alone Rails application of the same purpose, [masquerade](http://github.com/dennisreimann/masquerade/).

Masq is a mountable Rails engine that provides OpenID server/identity provider functionality.
It is the successor of the stand-alone Rails application [masquerade](http://github.com/dennisreimann/masquerade/).
Because of this history, and the desire to be drop-in compatible with `masq`,
the namespace remains `Masq`, not `Masq2`.

The project is released under the MIT-License and its source code is available at [GitHub](http://github.com/dennisreimann/masquerade/).
The project is released under the MIT-License and its source code is available at [GitHub](http://github.com/oauth-xx/masq2/).
Feel free to fork and submit patches :)

## Installation

0. In case you want to run masq as a standalone application (not integrated into an existing app), you will have to generate a barebone Rails app first:
1. In case you want to run Masq2 as a standalone application (not integrated into an existing app), you will have to generate a bare-bone Rails app first:
* `rails new my_openid_provider`

1. Add masq to your Gemfile and install it:
* `gem 'masq'`
2. Add `masq2` to your Gemfile and install it:
* `gem 'masq2'`
* `bundle install`

2. Copy the configuration and edit it:
3. Copy the configuration and edit it:
* `bundle exec rake masq:install:config`
* `$EDITOR config/masq.yml`

3. Copy the migrations and migrate:
4. Copy the migrations and migrate:
* `bundle exec rake masq:install:migrations`
* `bundle exec rake db:migrate`

4. Configure the routes by mounting the masq engine:
5. Configure the routes by mounting the masq engine:
* For integration into an existing app, mount it in a subdirectory, like:
* `mount Masq::Engine => "/masq"` or
* `mount Masq::Engine => "/openid"`
Expand Down Expand Up @@ -56,7 +58,9 @@ client-server communication (like requesting simple registration data).

### Introduction

This fork adds ORACLE database support to the existing dennisreimann/masq gem.
`masq2` adds ORACLE database support, as well as support for
Rails 5.1, 5.2, 6.0, 6.1, 7.0, 7.1, 7.2, 8.0,
which `masq` never had.

The main functionality is in the server controller, which is the endpoint for incoming
OpenID requests. The server controller is supposed to only interact with relying parties
Expand All @@ -66,11 +70,13 @@ handy methods to access and answer OpenID requests.
### Testing

You can run the tests with Rake:
* `DB_ADAPTER=sqlite3 bundle exec rake app:masq:test:ci`
* `DB_ADAPTER=mysql2 bundle exec rake app:masq:test:ci`
* `DB_ADAPTER=postgresql bundle exec rake app:masq:test:ci`

* `DB_ADAPTER=sqlite3 bundle exec rake app:masq:test:ci`
* `DB_ADAPTER=mysql2 bundle exec rake app:masq:test:ci`
* `DB_ADAPTER=postgresql bundle exec rake app:masq:test:ci`

The Rake task configures the database.yml for the chosen adapter.

In case you prefer running the tests continuously, use Guard:
* `bundle exec guard`

* `bundle exec guard`
Loading