Skip to content
Snippets Groups Projects
Forked from Davide Depau / Discourse SAML
Source project has a limited visibility.
  • David Taylor's avatar
    95ccea3f
    DEV: Move `saml_request_method` handling into the OmniAuth strategy (#44) · 95ccea3f
    David Taylor authored
    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.
    DEV: Move `saml_request_method` handling into the OmniAuth strategy (#44)
    David Taylor authored
    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.