mohiva/play-silhouette — pull request #217 by akkie (2014-10-24 18:20:53+00:00)
Title: Some authenticators cannot be discarded inside a Silhouette action

Due the fact that the update method gets called on every subsequent request to update the authenticator related data in the backing store and in the result, it isn't possible to discard or renew the authenticator simultaneously. This is because the "update" method would override the result created by the "renew" or "discard" method, because it will be executed as last in the chain.

As example:
If we discard the session in a Silhouette action then it will be removed from session. But at the end the update method will embed the session again, because it gets called with the result of the action.

So we restrict the access to this methods and force the developer to use the "renew" and "discard" methods on the Authenticator instance. These methods wrap the result into a marker result, for which we can execute the appropriate method on this service.