DEV: Move `saml_request_method` handling into the OmniAuth strategy (#44)
Putting this logic into the omniauth strategy is much cleaner because: - we no longer need a Rails controller and the associated `custom_url` parameter - we can re-use the `authn_request` instance which is automatically generated by the omniauth strategy, rather than re-implementing that logic - the behavior is decided at runtime, rather than during initialization. This makes it testable, and is another step on the way to making the plugin multisite-compatible This commit also introduces a spec for the feature.
Showing
- lib/discourse_saml/saml_omniauth_strategy.rb 53 additions, 0 deletionslib/discourse_saml/saml_omniauth_strategy.rb
- lib/saml_authenticator.rb 2 additions, 2 deletionslib/saml_authenticator.rb
- plugin.rb 3 additions, 89 deletionsplugin.rb
- spec/integration/saml_post_mode_spec.rb 40 additions, 0 deletionsspec/integration/saml_post_mode_spec.rb
lib/discourse_saml/saml_omniauth_strategy.rb
0 → 100644
spec/integration/saml_post_mode_spec.rb
0 → 100644
Please register or sign in to comment