omniauth-aai 0.5.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.rspec +2 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +153 -123
- data/LICENSE.txt +21 -0
- data/README.md +8 -33
- data/lib/.DS_Store +0 -0
- data/lib/generators/aai/setup_generator.rb +44 -0
- data/lib/generators/aai/templates/migration.rb +18 -2
- data/lib/generators/aai/templates/omniauth.rb +18 -6
- data/lib/generators/aai/templates/session_controller.rb +6 -8
- data/lib/generators/aai/templates/user.rb +25 -9
- data/lib/omniauth-aai.rb +2 -1
- data/lib/omniauth-aai/version.rb +1 -1
- data/lib/omniauth/has_current_user.rb +57 -0
- data/lib/omniauth/strategies/aai.rb +117 -88
- data/omniauth-aai.gemspec +23 -17
- data/spec/example_rails3_app/.DS_Store +0 -0
- data/spec/{example_rails_app → example_rails3_app}/.gitignore +0 -0
- data/spec/{example_rails_app → example_rails3_app}/Gemfile +2 -4
- data/spec/example_rails3_app/Gemfile.lock +123 -0
- data/spec/{example_rails_app → example_rails3_app}/Rakefile +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/assets/images/rails.png +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/assets/javascripts/application.js +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/assets/javascripts/welcome.js.coffee +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/assets/stylesheets/application.css +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/assets/stylesheets/welcome.css.scss +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/controllers/application_controller.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/controllers/welcome_controller.rb +4 -2
- data/spec/{example_rails_app → example_rails3_app}/app/helpers/application_helper.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/helpers/welcome_helper.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/mailers/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/models/.gitkeep +0 -0
- data/spec/example_rails3_app/app/views/.DS_Store +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/views/layouts/application.html.erb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/views/welcome/index.html.erb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/app/views/welcome/protected.html.erb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/change_application_controller.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config.ru +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/application.rb +1 -6
- data/spec/{example_rails_app → example_rails3_app}/config/boot.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/database.yml +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/environment.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/environments/development.rb +1 -6
- data/spec/{example_rails_app → example_rails3_app}/config/environments/production.rb +0 -3
- data/spec/{example_rails_app → example_rails3_app}/config/environments/test.rb +2 -3
- data/spec/{example_rails_app → example_rails3_app}/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/initializers/inflections.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/initializers/mime_types.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/initializers/secret_token.rb +1 -0
- data/spec/{example_rails_app → example_rails3_app}/config/initializers/session_store.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/initializers/wrap_parameters.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/locales/en.yml +0 -0
- data/spec/{example_rails_app → example_rails3_app}/config/routes.rb +2 -2
- data/spec/example_rails3_app/db/development.sqlite3 +0 -0
- data/spec/example_rails3_app/db/schema.rb +16 -0
- data/spec/{example_rails_app → example_rails3_app}/db/seeds.rb +0 -0
- data/spec/example_rails3_app/db/test.sqlite3 +0 -0
- data/spec/{example_rails_app → example_rails3_app}/doc/README_FOR_APP +0 -0
- data/spec/{example_rails_app → example_rails3_app}/lib/assets/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/lib/tasks/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/log/.gitkeep +0 -0
- data/spec/example_rails3_app/log/development.log +741 -0
- data/spec/example_rails3_app/log/test.log +24 -0
- data/spec/{example_rails_app → example_rails3_app}/public/404.html +0 -0
- data/spec/{example_rails_app → example_rails3_app}/public/422.html +0 -0
- data/spec/{example_rails_app → example_rails3_app}/public/500.html +0 -0
- data/spec/{example_rails_app → example_rails3_app}/public/favicon.ico +0 -0
- data/spec/{example_rails_app → example_rails3_app}/public/robots.txt +0 -0
- data/spec/{example_rails_app → example_rails3_app}/script/rails +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/fixtures/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/functional/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/functional/welcome_controller_test.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/integration/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/performance/browsing_test.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/test_helper.rb +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/unit/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/test/unit/helpers/welcome_helper_test.rb +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/C26/690/sprockets%2F93708cb34051f3000884905e8669d74a +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/C30/B40/sprockets%2Ff006fa583c943775b96596827195b022 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/C5C/B50/sprockets%2F7a556208881f6d893d11269bf2a09158 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/C83/640/sprockets%2F3233432f81669b9bd10ef726c526d348 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/CD0/AB0/sprockets%2F2211190fb757d05874e2b25fc37a31ad +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/CE2/AD0/sprockets%2Fbd71546009ab5e606b3f27b4c6a79856 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/D14/000/sprockets%2Fffd7643b7c429e23bdb2281097a5e096 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/D5E/170/sprockets%2F2f2229c70dcf195564d4d0fd6a12ac1a +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/E29/9D0/sprockets%2Fea5ba88ffb1f831008ba38ed70bd8cfa +0 -0
- data/spec/example_rails3_app/tmp/cache/assets/E3F/0C0/sprockets%2F9addc9febe49c19a6eee9360f156afe3 +0 -0
- data/spec/{example_rails_app → example_rails3_app}/vendor/assets/javascripts/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/{example_rails_app → example_rails3_app}/vendor/plugins/.gitkeep +0 -0
- data/spec/example_rails4_app/.gitignore +17 -0
- data/spec/example_rails4_app/Gemfile +46 -0
- data/spec/example_rails4_app/Gemfile.lock +171 -0
- data/spec/example_rails4_app/README.rdoc +28 -0
- data/spec/example_rails4_app/Rakefile +6 -0
- data/spec/example_rails4_app/app/assets/images/.keep +0 -0
- data/spec/example_rails4_app/app/assets/javascripts/application.js +16 -0
- data/spec/example_rails4_app/app/assets/stylesheets/application.css +15 -0
- data/spec/example_rails4_app/app/controllers/application_controller.rb +4 -0
- data/spec/example_rails4_app/app/controllers/concerns/.keep +0 -0
- data/spec/example_rails4_app/app/controllers/session_controller.rb +38 -0
- data/spec/example_rails4_app/app/controllers/welcome_controller.rb +11 -0
- data/spec/example_rails4_app/app/helpers/application_helper.rb +2 -0
- data/spec/example_rails4_app/app/mailers/.keep +0 -0
- data/spec/example_rails4_app/app/models/.keep +0 -0
- data/spec/example_rails4_app/app/models/concerns/.keep +0 -0
- data/spec/example_rails4_app/app/models/user.rb +57 -0
- data/spec/example_rails4_app/app/views/.DS_Store +0 -0
- data/spec/example_rails4_app/app/views/layouts/application.html.erb +14 -0
- data/spec/example_rails4_app/app/views/welcome/index.html.erb +3 -0
- data/spec/example_rails4_app/app/views/welcome/protected.html.erb +2 -0
- data/spec/example_rails4_app/bin/bundle +3 -0
- data/spec/example_rails4_app/bin/rails +8 -0
- data/spec/example_rails4_app/bin/rake +8 -0
- data/spec/example_rails4_app/bin/setup +29 -0
- data/spec/example_rails4_app/bin/spring +15 -0
- data/spec/example_rails4_app/config.ru +4 -0
- data/spec/example_rails4_app/config/application.rb +26 -0
- data/spec/example_rails4_app/config/boot.rb +3 -0
- data/spec/example_rails4_app/config/database.yml +25 -0
- data/spec/example_rails4_app/config/environment.rb +5 -0
- data/spec/example_rails4_app/config/environments/development.rb +41 -0
- data/spec/example_rails4_app/config/environments/production.rb +79 -0
- data/spec/example_rails4_app/config/environments/test.rb +42 -0
- data/spec/example_rails4_app/config/initializers/assets.rb +11 -0
- data/spec/example_rails4_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/example_rails4_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/example_rails4_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/example_rails4_app/config/initializers/inflections.rb +16 -0
- data/spec/example_rails4_app/config/initializers/mime_types.rb +4 -0
- data/spec/example_rails4_app/config/initializers/omniauth.rb +23 -0
- data/spec/example_rails4_app/config/initializers/session_store.rb +3 -0
- data/spec/example_rails4_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/example_rails4_app/config/locales/en.yml +23 -0
- data/spec/example_rails4_app/config/routes.rb +10 -0
- data/spec/example_rails4_app/config/secrets.yml +22 -0
- data/spec/example_rails4_app/db/development.sqlite3 +0 -0
- data/spec/example_rails4_app/db/migrate/20150528142303_aai_create_user.rb +20 -0
- data/spec/example_rails4_app/db/migrate/20150609094544_create_aai_user.rb +26 -0
- data/spec/example_rails4_app/db/schema.rb +33 -0
- data/spec/example_rails4_app/db/seeds.rb +7 -0
- data/spec/example_rails4_app/lib/assets/.keep +0 -0
- data/spec/example_rails4_app/lib/tasks/.keep +0 -0
- data/spec/example_rails4_app/log/.keep +0 -0
- data/spec/example_rails4_app/log/development.log +7189 -0
- data/spec/example_rails4_app/log/test.log +0 -0
- data/spec/example_rails4_app/public/404.html +67 -0
- data/spec/example_rails4_app/public/422.html +67 -0
- data/spec/example_rails4_app/public/500.html +66 -0
- data/spec/example_rails4_app/public/favicon.ico +0 -0
- data/spec/example_rails4_app/public/robots.txt +5 -0
- data/spec/example_rails4_app/test/controllers/.keep +0 -0
- data/spec/example_rails4_app/test/fixtures/.keep +0 -0
- data/spec/example_rails4_app/test/helpers/.keep +0 -0
- data/spec/example_rails4_app/test/integration/.keep +0 -0
- data/spec/example_rails4_app/test/mailers/.keep +0 -0
- data/spec/example_rails4_app/test/models/.keep +0 -0
- data/spec/example_rails4_app/test/test_helper.rb +10 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/1s_XCxu5Ta3ZrQVnXIYvLyRMXFQo20cDx9dOl2Z2iF8.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/29DyBLYZiyJ3FlvLIMPsG2-7J8nAW42idLjWLEVdB_k.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/3QbXCZJvxomnkCnjUWHuRcr1GygZ_h2BHAvxwpDe8_s.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/4DpD3QisvkI9coAiaW5J81R3QEdauKikO3Gh5M8mwWo.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/6NLgJvQ8d_2Hvs_dsIe78tpsALlFUB02E_yBe-2E5cA.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/6jHw85RU0ldd0Q9aN-7rANpT7g1-koNDbSenv-m7smI.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/7BAbDbQvvxI5tyXDU4FFEVqkskvwpwBb-Okv_3k7m_A.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/9wp0IZ0iih5-OpulhDQiwTcivSJ1B0NGGT3E0QqfUvY.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/BNSnmei4pmTUWNUSAxEsb0MthlP4aMS69DOMLpxnO1w.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/CuDbyYCWFI80xf5TcM_YGo4vs7XDrDT2uGZbXL1CNlU.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/E7vUl62-SGsQ8YapPcF158Pt1JkBL-9rifcB_9dP8Dk.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/Gb8DbxW8LZBtcLvB3DaLNTXt5D0MNezSV797OaoPY9Q.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/GgQIx53L-9pWadlFfRd5NlAqwNFKf7DLPkPnsnQ7bNk.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/GjsYHKbT8fxMeVlnpmarx6Xi-_Ph0QMuk1BHoU4JDrQ.cache +2 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/H4FEyyRC4IJsChOdu1cf9NDgg8w6J1YBVNHaKN92h9o.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/If5Lvqrq1tySO8vBUqp2xvRY_mnDfGebBxBP2mxZbZY.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/IoT_x37i_0kSKYgLgbJR5-i6lvuoyNhOt9FSw-yILiQ.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/JUseOAL-WHjhDijGjAaXwOvZEJUVhMs_jFSMbXunViY.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/KJcDzapXqjQsiil8Z8og8g_9qX88kXR8p3pMopsauA8.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/KZpDQ14WKjcnWnLxlL99qFCd6ARfk0MsdegUfI30RMk.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/KZxCQPT4Q2wX3rHnJZcFGWZPTtq7oNH9llxBAALh43s.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/LgV_5lRim8CeylWertau64VwyRxtI51id8BtgIok58g.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/Nt-6pBlTra27ZPWSp2yTZSKBAePHJHgDlIoxWTgF9i8.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/PHhC5vQizTPXEkJAiD_q9ESL7UlJW-l8Ua2aoWOhv_o.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/QRU43JksZxXfCsqux8aCe2yyWueGiamUDi18N8gDA1Q.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/RECBJfTHjk7obOczR_QxMkSagYRkmidf_ZawDoZTR8A.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/RanHbvC55zjJip0GoEuKsXCXGiMAnd9n7zr67BIqBSw.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/S5179qXMIYo2z-pYHnXOtD2IYoz5ac8moYSK7pNt7m8.cache +2 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/SO9WJ6f1sF18HRfzSmwkLdVZZwRBNz1DxAaYtGbOTrE.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/SPlj-pwirc-AB3GMeOqDR5gSAiu3j6C7QnAZfGmE9_I.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/TGEldewczDNL-pNPKYkePKZe3ySFo2sisfkbnD19W4s.cache +2 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/TdlxPZJxUr_7HWj7CrC81yJyV0-40_Ogqo_1NTaEoIU.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/TowmqkMiUGEwvy7lnHQ_88ROBl0yb2D4yH0ugiNjvfA.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/Tp7wu_U3u6gFUnDoUHA40bWXyFOSSxNiXK6XPRwYmYU.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/TqgWeb7o7Z23teWSLaSdF-f3_8aYzRVbBVZhQUHuZVc.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/VOp0pIv_pTt1jyD5JQn5Ee721CyQFQTGdnz4ODw38i4.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/W8O66kikznV0XXIhsnH-3dHWm24NyxyK2BbzZvEssto.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/YLGfTegl3aFlYlDF7dfyQ5OuL6B6D3l-mcGVqtWnVQ8.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/YngNHAn-McYDpn3H2vj5Cfs7jvy6y0xXgV2lm-QqytU.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/_J-JFAM5KZ8G3xUcVV9ht5vdsdH3wHg737JhiRTNl30.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/apXOQCHHr7toaELV0vOhGpGHp0qsm15GmPpb-6SA6GI.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/c5jVOyypWys4L2Hoyc4U84gCAJg3tGepalH4_wvPjag.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/c8Xfpa8RSionpn-Hbvc5pDqvktT2tZDhvRCrUD1V_Oo.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/cihMJr_YPzjx-OxZT97hhVuVpY1rkTjbZmXFd8XHCaU.cache +3 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/dHMPXPs1sOQ-fiWIOHBlX15A53Jm0CIPz2F_hNdtS3M.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/e99bn4nHgVDcocbTGKcEmDNK9c_hXbgX6QjCJFCZHJM.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/fLv1zUMqDQeVn2AWONn1mWotZV-MKGL2VWCOWalnPkg.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/fWQJziLu4L1W29En3opeg-1CsjRQBWmvxu9pCs4bXj8.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/gLKErIDcQk5SB5QrsCeFTLyCw5500orRLwYeVdZdKMc.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/gr63R85vyTqHHJZQ-17HzBTVQzxNIG5ioLBJIG7ylUI.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/h94CfaFE7uxKkjg9ok-t1VaNrmPtIlflckdFHhn8HQs.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/hE4vknoiDD4JODeZCrqVQJsqIprogjXMLmC8OwA_Jr0.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/hS0tOwqtQJaZQ94vExFzOIkbAuInPL-qbhJ_ehyAIdA.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/jRTlxo8OfNbF2UFI9yARZfikVm2L6tckGljgpdPKJAE.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/jWzKY7vp1V-gp2DIoaBUf6FHlXy64u51evJE2HTEmHw.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/qzBkjnl32lQWbp5TzPSAUL1ai7Di46nMpBx4F7m6x5s.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/r77JGKq0Pw_xiSzw2prNjqaAF6alyTiTyCsdnbipthY.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/rJ0exYcGrKT54S-78fIu6vNCgQs3mDufsDxQ14gI_8E.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/rx80cSLfrwi0ZB09RMu0y303mn2cqY0n-HVvX4OZSvg.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/t86ZINxINr8OvlNbaSMwdIJCEKNwBO6brBig2BlQM14.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/tXvI8895yJKqfChNv65cTiwS7lytvZHFz1fXzFbzVeM.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/ueBgJWdtY_h7B_DpJgfhaB1zK-p3TTKWfXHuoog1ee0.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/umu0vtYbA7uPY--szPF2GZOzRsafL6YLGkxCLx52t0c.cache +3 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/wRYMTVh2J03EQY8OmShoXFHM5q_wkCsogrHuAv8CR6g.cache +1 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/xSK_JYmeNOLhG9YlWG_YGYarb8YLyIeMXHahwRIyhZY.cache +0 -0
- data/spec/example_rails4_app/tmp/cache/assets/development/sprockets/v3.0/yLpEexUzUtWqrKQPCErdaCnJUUkxgSLIOShi9XNRKlM.cache +0 -0
- data/spec/example_rails4_app/vendor/assets/javascripts/.keep +0 -0
- data/spec/example_rails4_app/vendor/assets/stylesheets/.keep +0 -0
- data/spec/omniauth/has_current_user_spec.rb +9 -0
- data/spec/omniauth/strategies/aai_spec.rb +83 -20
- data/spec/omniauth/strategies/brute_force_spec.rb +6 -6
- data/spec/spec_helper.rb +12 -6
- data/spec/support/omniauth_macros.rb +13 -0
- metadata +486 -195
- data/lib/action_controller/has_current_user.rb +0 -44
- data/lib/generators/aai/install_generator.rb +0 -41
- data/omniauth-aai-0.3.gem +0 -0
- data/omniauth-aai-0.4.gem +0 -0
- data/omniauth-aai-0.5.1.gem +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d22d4b8df0fc1f34dc64d446f0735c21cca72bfa
|
4
|
+
data.tar.gz: 9b68f745e51c2ae6b48b07c23823ce09324043fe
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3af83ad31bc412d7ab19bd1db0340d612152780227919626b4606742684e8c0d296bc1d2342e9694f73f7716270e9e5b4f3bc89b7b8172efa9f925df4cbe76be
|
7
|
+
data.tar.gz: 362cb866458401dea78518ff08e0b538f040223ece42757cbade3b97053c072eb56fbe31f3a156177abe513d2be3eb6a2dfdef270e65fd684a14dfb99e6e29a2
|
data/.DS_Store
ADDED
Binary file
|
data/.rspec
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,147 +1,174 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/switch-ch/omniauth-shibboleth.git
|
3
|
-
revision:
|
3
|
+
revision: 84b9264cdfda3ff724a951647892fdf91427de5c
|
4
4
|
specs:
|
5
|
-
omniauth-shibboleth (1.0
|
5
|
+
omniauth-shibboleth (1.2.0)
|
6
6
|
omniauth (>= 1.0.0)
|
7
7
|
|
8
8
|
PATH
|
9
9
|
remote: .
|
10
10
|
specs:
|
11
|
-
omniauth-aai (0.
|
11
|
+
omniauth-aai (0.6.2)
|
12
12
|
omniauth-shibboleth
|
13
13
|
|
14
14
|
GEM
|
15
15
|
remote: http://rubygems.org/
|
16
16
|
specs:
|
17
|
-
actionmailer (
|
18
|
-
actionpack (=
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
actionmailer (4.2.1)
|
18
|
+
actionpack (= 4.2.1)
|
19
|
+
actionview (= 4.2.1)
|
20
|
+
activejob (= 4.2.1)
|
21
|
+
mail (~> 2.5, >= 2.5.4)
|
22
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
23
|
+
actionpack (4.2.1)
|
24
|
+
actionview (= 4.2.1)
|
25
|
+
activesupport (= 4.2.1)
|
26
|
+
rack (~> 1.6)
|
27
|
+
rack-test (~> 0.6.2)
|
28
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
29
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
30
|
+
actionview (4.2.1)
|
31
|
+
activesupport (= 4.2.1)
|
32
|
+
builder (~> 3.1)
|
24
33
|
erubis (~> 2.7.0)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
activemodel (
|
31
|
-
activesupport (=
|
32
|
-
builder (~> 3.
|
33
|
-
activerecord (
|
34
|
-
activemodel (=
|
35
|
-
activesupport (=
|
36
|
-
arel (~>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
capybara (2.0.1)
|
34
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
36
|
+
activejob (4.2.1)
|
37
|
+
activesupport (= 4.2.1)
|
38
|
+
globalid (>= 0.3.0)
|
39
|
+
activemodel (4.2.1)
|
40
|
+
activesupport (= 4.2.1)
|
41
|
+
builder (~> 3.1)
|
42
|
+
activerecord (4.2.1)
|
43
|
+
activemodel (= 4.2.1)
|
44
|
+
activesupport (= 4.2.1)
|
45
|
+
arel (~> 6.0)
|
46
|
+
activesupport (4.2.1)
|
47
|
+
i18n (~> 0.7)
|
48
|
+
json (~> 1.7, >= 1.7.7)
|
49
|
+
minitest (~> 5.1)
|
50
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
51
|
+
tzinfo (~> 1.1)
|
52
|
+
arel (6.0.0)
|
53
|
+
builder (3.2.2)
|
54
|
+
capybara (2.4.4)
|
47
55
|
mime-types (>= 1.16)
|
48
56
|
nokogiri (>= 1.3.3)
|
49
57
|
rack (>= 1.0.0)
|
50
58
|
rack-test (>= 0.5.4)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
diff-lcs (1.1.3)
|
59
|
+
xpath (~> 2.0)
|
60
|
+
celluloid (0.16.0)
|
61
|
+
timers (~> 4.0.0)
|
62
|
+
coderay (1.1.0)
|
63
|
+
diff-lcs (1.2.5)
|
57
64
|
erubis (2.7.0)
|
58
|
-
ffi (1.
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
65
|
+
ffi (1.9.8)
|
66
|
+
formatador (0.2.5)
|
67
|
+
globalid (0.3.5)
|
68
|
+
activesupport (>= 4.1.0)
|
69
|
+
guard (2.12.5)
|
70
|
+
formatador (>= 0.2.4)
|
71
|
+
listen (~> 2.7)
|
72
|
+
lumberjack (~> 1.0)
|
73
|
+
nenv (~> 0.1)
|
74
|
+
notiffany (~> 0.0)
|
75
|
+
pry (>= 0.9.12)
|
76
|
+
shellany (~> 0.0)
|
77
|
+
thor (>= 0.18.1)
|
78
|
+
guard-compat (1.2.1)
|
79
|
+
guard-rspec (4.5.1)
|
80
|
+
guard (~> 2.1)
|
81
|
+
guard-compat (~> 1.1)
|
82
|
+
rspec (>= 2.99.0, < 4.0)
|
83
|
+
hashie (3.4.1)
|
84
|
+
hitimes (1.2.2)
|
85
|
+
i18n (0.7.0)
|
86
|
+
json (1.8.3)
|
87
|
+
listen (2.10.0)
|
88
|
+
celluloid (~> 0.16.0)
|
89
|
+
rb-fsevent (>= 0.9.3)
|
90
|
+
rb-inotify (>= 0.9)
|
91
|
+
loofah (2.0.2)
|
92
|
+
nokogiri (>= 1.5.9)
|
93
|
+
lumberjack (1.0.9)
|
94
|
+
mail (2.6.3)
|
95
|
+
mime-types (>= 1.16, < 3)
|
96
|
+
method_source (0.8.2)
|
97
|
+
mime-types (2.6.1)
|
98
|
+
mini_portile (0.6.2)
|
99
|
+
minitest (5.7.0)
|
100
|
+
nenv (0.2.0)
|
101
|
+
nokogiri (1.6.6.2)
|
102
|
+
mini_portile (~> 0.6.0)
|
103
|
+
notiffany (0.0.6)
|
104
|
+
nenv (~> 0.1)
|
105
|
+
shellany (~> 0.0)
|
106
|
+
omniauth (1.2.2)
|
107
|
+
hashie (>= 1.2, < 4)
|
108
|
+
rack (~> 1.0)
|
109
|
+
pry (0.10.1)
|
110
|
+
coderay (~> 1.1.0)
|
111
|
+
method_source (~> 0.8.1)
|
112
|
+
slop (~> 3.4)
|
113
|
+
rack (1.6.1)
|
114
|
+
rack-test (0.6.3)
|
98
115
|
rack (>= 1.0)
|
99
|
-
rails (
|
100
|
-
actionmailer (=
|
101
|
-
actionpack (=
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
116
|
+
rails (4.2.1)
|
117
|
+
actionmailer (= 4.2.1)
|
118
|
+
actionpack (= 4.2.1)
|
119
|
+
actionview (= 4.2.1)
|
120
|
+
activejob (= 4.2.1)
|
121
|
+
activemodel (= 4.2.1)
|
122
|
+
activerecord (= 4.2.1)
|
123
|
+
activesupport (= 4.2.1)
|
124
|
+
bundler (>= 1.3.0, < 2.0)
|
125
|
+
railties (= 4.2.1)
|
126
|
+
sprockets-rails
|
127
|
+
rails-deprecated_sanitizer (1.0.3)
|
128
|
+
activesupport (>= 4.2.0.alpha)
|
129
|
+
rails-dom-testing (1.0.6)
|
130
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
131
|
+
nokogiri (~> 1.6.0)
|
132
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
133
|
+
rails-html-sanitizer (1.0.2)
|
134
|
+
loofah (~> 2.0)
|
135
|
+
railties (4.2.1)
|
136
|
+
actionpack (= 4.2.1)
|
137
|
+
activesupport (= 4.2.1)
|
111
138
|
rake (>= 0.8.7)
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
rspec (2.
|
118
|
-
rspec-core (~> 2.
|
119
|
-
rspec-expectations (~> 2.
|
120
|
-
rspec-mocks (~> 2.
|
121
|
-
rspec-core (2.
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
slop (3.
|
132
|
-
sprockets (
|
133
|
-
hike (~> 1.2)
|
134
|
-
multi_json (~> 1.0)
|
139
|
+
thor (>= 0.18.1, < 2.0)
|
140
|
+
rake (10.4.2)
|
141
|
+
rb-fsevent (0.9.5)
|
142
|
+
rb-inotify (0.9.5)
|
143
|
+
ffi (>= 0.5.0)
|
144
|
+
rspec (3.2.0)
|
145
|
+
rspec-core (~> 3.2.0)
|
146
|
+
rspec-expectations (~> 3.2.0)
|
147
|
+
rspec-mocks (~> 3.2.0)
|
148
|
+
rspec-core (3.2.3)
|
149
|
+
rspec-support (~> 3.2.0)
|
150
|
+
rspec-expectations (3.2.1)
|
151
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
152
|
+
rspec-support (~> 3.2.0)
|
153
|
+
rspec-mocks (3.2.1)
|
154
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
155
|
+
rspec-support (~> 3.2.0)
|
156
|
+
rspec-support (3.2.2)
|
157
|
+
shellany (0.0.1)
|
158
|
+
slop (3.6.0)
|
159
|
+
sprockets (3.1.0)
|
135
160
|
rack (~> 1.0)
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
161
|
+
sprockets-rails (2.3.1)
|
162
|
+
actionpack (>= 3.0)
|
163
|
+
activesupport (>= 3.0)
|
164
|
+
sprockets (>= 2.8, < 4.0)
|
165
|
+
thor (0.19.1)
|
166
|
+
thread_safe (0.3.5)
|
167
|
+
timers (4.0.1)
|
168
|
+
hitimes
|
169
|
+
tzinfo (1.2.2)
|
170
|
+
thread_safe (~> 0.1)
|
171
|
+
xpath (2.0.0)
|
145
172
|
nokogiri (~> 1.3)
|
146
173
|
|
147
174
|
PLATFORMS
|
@@ -155,4 +182,7 @@ DEPENDENCIES
|
|
155
182
|
rack-test
|
156
183
|
rails
|
157
184
|
rake
|
158
|
-
rspec (~> 2
|
185
|
+
rspec (~> 3.2)
|
186
|
+
|
187
|
+
BUNDLED WITH
|
188
|
+
1.10.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 SWITCH, Zurich
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -19,16 +19,14 @@ Install as a gem via Gemfile or with
|
|
19
19
|
|
20
20
|
### Generator
|
21
21
|
|
22
|
-
rails generate aai:
|
22
|
+
rails generate aai:setup
|
23
23
|
|
24
24
|
This will generate some basic authenthication objects for rails:
|
25
25
|
|
26
|
-
* config/omniauth.rb
|
26
|
+
* config/initializers/omniauth.rb
|
27
27
|
* app/controller/session_controller.rb
|
28
28
|
* app/models/user.rb
|
29
|
-
* db/migrate/
|
30
|
-
|
31
|
-
You'll need to configure at least the 'db/migrate/create_users_adapt_and_copy_to_migration.rb' file. Just run 'rails g migration createUsersTable' copy the content of 'create_users_adapt_and_copy_to_migration.rb' and delete it.
|
29
|
+
* db/migrate/create_aai_user.rb
|
32
30
|
|
33
31
|
You can run it with '--persist false' if you don't want to persist the user to the local db.
|
34
32
|
|
@@ -50,7 +48,7 @@ By default, you will get all the standard SWITCHaai values, or you can configure
|
|
50
48
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
51
49
|
provider :aai,{
|
52
50
|
:uid_field => :'persistent-id',
|
53
|
-
:fields => [:name, :email, :
|
51
|
+
:fields => [:name, :email, :unique_id],
|
54
52
|
:extra_fields => [:'Shib-Authentication-Instant']# See lib/omniauth/strategies/aai.rb for full list.
|
55
53
|
}
|
56
54
|
```
|
@@ -74,9 +72,9 @@ In development/local mode or in cases where you don't have a SWITCHaai Service P
|
|
74
72
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
75
73
|
if Rails.env.development?
|
76
74
|
provider :developer, {
|
77
|
-
:
|
78
|
-
:
|
79
|
-
:
|
75
|
+
uid_field: :'persistent-id',
|
76
|
+
fields: [:name, :email, :persistent_id, :unique_id],
|
77
|
+
extra_fields: OmniAuth::Strategies::Aai::DEFAULT_EXTRA_FIELDS
|
80
78
|
}
|
81
79
|
end
|
82
80
|
end
|
@@ -95,7 +93,7 @@ When you deploy a new application, you may want to confirm the assumed attribute
|
|
95
93
|
|
96
94
|
### Current User
|
97
95
|
|
98
|
-
If you want to use the build in User object and the 'current_user' functionality, you can
|
96
|
+
If you want to use the build in User object and the 'current_user' functionality, you can include the has_current_user method to concerned ActionController or the ApplicationController if you want to have the functionality available globally.
|
99
97
|
|
100
98
|
```ruby
|
101
99
|
class ApplicationController < ActionController::Base
|
@@ -103,26 +101,3 @@ If you want to use the build in User object and the 'current_user' functionality
|
|
103
101
|
has_current_user
|
104
102
|
end
|
105
103
|
```
|
106
|
-
|
107
|
-
|
108
|
-
## License (MIT License)
|
109
|
-
|
110
|
-
Copyright (C) SWITCH, Zurich, original copyright (omniauth-shibboleth) 2011 by Toyokazu Akiyama.
|
111
|
-
|
112
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
113
|
-
of this software and associated documentation files (the "Software"), to deal
|
114
|
-
in the Software without restriction, including without limitation the rights
|
115
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
116
|
-
copies of the Software, and to permit persons to whom the Software is
|
117
|
-
furnished to do so, subject to the following conditions:
|
118
|
-
|
119
|
-
The above copyright notice and this permission notice shall be included in
|
120
|
-
all copies or substantial portions of the Software.
|
121
|
-
|
122
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
123
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
124
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
125
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
126
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
127
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
128
|
-
THE SOFTWARE.
|
data/lib/.DS_Store
ADDED
Binary file
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Aai
|
2
|
+
class SetupGenerator < Rails::Generators::Base
|
3
|
+
include Rails::Generators::Migration
|
4
|
+
|
5
|
+
source_root File.expand_path("../templates", __FILE__)
|
6
|
+
|
7
|
+
desc "Generate Config Files / User / Session and Routes"
|
8
|
+
|
9
|
+
class_option :persist, type: :boolean, default: true, desc: "Set to false if you don't want persistent User"
|
10
|
+
|
11
|
+
# def self.source_root
|
12
|
+
# @source_root ||= File.join(File.dirname(__FILE__), 'templates')
|
13
|
+
# end
|
14
|
+
|
15
|
+
def copy_initializer_file
|
16
|
+
copy_file "omniauth.rb", "config/initializers/omniauth.rb"
|
17
|
+
end
|
18
|
+
|
19
|
+
def copy_session_controller_file
|
20
|
+
if true
|
21
|
+
copy_file "session_controller.rb", "app/controllers/session_controller.rb"
|
22
|
+
inject_into_class "app/controllers/application_controller.rb", ApplicationController, " has_current_user\n"
|
23
|
+
route("post '/auth/:provider/callback', to: 'session#create', as: 'auth_callback'")
|
24
|
+
route("get '/auth/failure', to: 'session#failure', as: 'auth_failure'")
|
25
|
+
route("get '/auth/logout', to: 'session#destroy', as: 'logout'")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def copy_user_file
|
30
|
+
template "user.rb", "app/models/user.rb"
|
31
|
+
migration_template "migration.rb", "db/migrate/create_aai_user.rb" if options[:persist]
|
32
|
+
rake "db:migrate"
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.next_migration_number(path)
|
36
|
+
unless @prev_migration_nr
|
37
|
+
@prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
|
38
|
+
else
|
39
|
+
@prev_migration_nr += 1
|
40
|
+
end
|
41
|
+
@prev_migration_nr.to_s
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|