{"action":"created","issue":{"url":"https://api.github.com/repos/mohiva/play-silhouette/issues/323","labels_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/323/comments","events_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/323/events","html_url":"https://github.com/mohiva/play-silhouette/issues/323","id":65061178,"number":323,"title":"Add method to skip the update of an existing authenticator in a Silhouette action","user":{"login":"akkie","id":307006,"avatar_url":"https://avatars.githubusercontent.com/u/307006?v=3","gravatar_id":"","url":"https://api.github.com/users/akkie","html_url":"https://github.com/akkie","followers_url":"https://api.github.com/users/akkie/followers","following_url":"https://api.github.com/users/akkie/following{/other_user}","gists_url":"https://api.github.com/users/akkie/gists{/gist_id}","starred_url":"https://api.github.com/users/akkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akkie/subscriptions","organizations_url":"https://api.github.com/users/akkie/orgs","repos_url":"https://api.github.com/users/akkie/repos","events_url":"https://api.github.com/users/akkie/events{/privacy}","received_events_url":"https://api.github.com/users/akkie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-03-29T13:26:08Z","updated_at":"2015-04-01T12:10:27Z","closed_at":null,"body":"In every Silhouette action, an authenticator gets automatically [updated](https://github.com/mohiva/play-silhouette/blob/master/silhouette/app/com/mohiva/play/silhouette/api/Silhouette.scala#L275) on every request. This must be done with the result of the action, because every authenticator can update client side data. The problem is now that it isn't possible to manipulate an authenticator manually inside an action, because it gets automatically overridden with the updated authenticator. To work around this issue I've created the methods [discard](https://github.com/mohiva/play-silhouette/blob/master/silhouette/app/com/mohiva/play/silhouette/api/Authenticator.scala#L59) and [renew](https://github.com/mohiva/play-silhouette/blob/master/silhouette/app/com/mohiva/play/silhouette/api/Authenticator.scala#L75) in the current stable version. I've also [limited the access](https://github.com/mohiva/play-silhouette/blob/master/silhouette/app/com/mohiva/play/silhouette/api/services/AuthenticatorService.scala#L97) to the authenticator service to prevent the users for misusage.\r\n\r\nNow it seems that this isn't enough, because of [this issue](https://groups.google.com/forum/#!topic/play-silhouette/nNz8lh2O-6Y).\r\n\r\nMy proposal to fix this issue is to implement an additional `skip` method equally to the `discard` and `renew` methods. I'd also remove the access restriction for the authenticator service to fix #315 because this misusage is also possible with this restriction. With the open access to the service, there is no need more for the `discard` and `renew` methods of the authenticator because the service can now be used directly.\r\n\r\nAs result we had only the `skip` method, which instructs Silhouette to skip the update of the authenticator, so that an manually updated authenticator can be send to the client.\r\n\r\n@igorbernstein @rfranco Any suggestions?"},"comment":{"url":"https://api.github.com/repos/mohiva/play-silhouette/issues/comments/88454057","html_url":"https://github.com/mohiva/play-silhouette/issues/323#issuecomment-88454057","issue_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/323","id":88454057,"user":{"login":"akkie","id":307006,"avatar_url":"https://avatars.githubusercontent.com/u/307006?v=3","gravatar_id":"","url":"https://api.github.com/users/akkie","html_url":"https://github.com/akkie","followers_url":"https://api.github.com/users/akkie/followers","following_url":"https://api.github.com/users/akkie/following{/other_user}","gists_url":"https://api.github.com/users/akkie/gists{/gist_id}","starred_url":"https://api.github.com/users/akkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akkie/subscriptions","organizations_url":"https://api.github.com/users/akkie/orgs","repos_url":"https://api.github.com/users/akkie/repos","events_url":"https://api.github.com/users/akkie/events{/privacy}","received_events_url":"https://api.github.com/users/akkie/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T12:10:27Z","updated_at":"2015-04-01T12:10:27Z","body":"@studiodev Yes, you are right. But I think we do not need two methods, because it can be handled as with the current `discard` and `renew` results. \r\n\r\nhttps://github.com/mohiva/play-silhouette/blob/master/silhouette/app/com/mohiva/play/silhouette/api/Silhouette.scala#L269\r\n\r\nI'm overall not happy with the result wrapping approach, because if could prevent a user to use it's own result type."}}