m3dev / octoparts

Octoparts, the backend services aggregator
https://m3dev.github.io/octoparts/
Other
151 stars 18 forks source link

After Play 2.4 upgrade, remove support for plugin-ish behaviour #181

Closed lloydmeta closed 8 years ago

lloydmeta commented 8 years ago

With Play 2.4, plugins are deprecated, and although modules are their replacement, there is no longer any support for plugin-ish behaviour (adhoc Play.current.plugin[MyPlugin]).

In addition, we have gone the compile-time DI route, which makes supporting runtime injected plugins difficult.

My proposal is the following:

  1. Rename the plugins project to simply octo-auth, and remove all remnants of Plugin
    • Rename perhaps to AuthHandler
  2. In AuthSupport, take def authHandler: Option[AuthHandler]
  3. Add a AuthHandlerModule to the wiring package to hold a lazily instantiated Option[AuthHandler]
  4. Add a val authHandler: Option[AuthHandler]``param toAdminController`, which will be wired by Macwire

If end users want to pass a custom AuthHandler, they just need to modify AuthHandlerModule

lloydmeta commented 8 years ago

This is a breaking change so we should probably do a version bump

lloydmeta commented 8 years ago

Closing since #155 was merged with the culling of the plugin.