{"action":"created","issue":{"url":"https://api.github.com/repos/box/box-windows-sdk-v2/issues/43","labels_url":"https://api.github.com/repos/box/box-windows-sdk-v2/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/box/box-windows-sdk-v2/issues/43/comments","events_url":"https://api.github.com/repos/box/box-windows-sdk-v2/issues/43/events","html_url":"https://github.com/box/box-windows-sdk-v2/issues/43","id":31942822,"number":43,"title":"As-User","user":{"login":"jhoerr","id":1151206,"avatar_url":"https://avatars.githubusercontent.com/u/1151206?v=3","gravatar_id":"","url":"https://api.github.com/users/jhoerr","html_url":"https://github.com/jhoerr","followers_url":"https://api.github.com/users/jhoerr/followers","following_url":"https://api.github.com/users/jhoerr/following{/other_user}","gists_url":"https://api.github.com/users/jhoerr/gists{/gist_id}","starred_url":"https://api.github.com/users/jhoerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhoerr/subscriptions","organizations_url":"https://api.github.com/users/jhoerr/orgs","repos_url":"https://api.github.com/users/jhoerr/repos","events_url":"https://api.github.com/users/jhoerr/events{/privacy}","received_events_url":"https://api.github.com/users/jhoerr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-04-22T03:26:33Z","updated_at":"2015-07-08T20:14:17Z","closed_at":null,"body":"I'd like to start working on support for `As-User`. However, it's not clear to me where the best entry point for this is. Here are some ideas I've had:\r\n\r\n**1.**\r\nIAuthRepository could be involved, but that would likely result in breaking changes. We could:\r\n\r\n* Add `IAuthRepository.AsUserId`, which would be consumed by `BoxResourceManager.AddAuthorization` and added as a header to the request; **or**\r\n* Move `BoxResourceManager.AddAuthorization` to `IAuthRepository.AddAuthorization`. `AuthRepository` would provide the same implementation as `BoxResourceManager` does now. A new subclass of `AuthRepository`, `AsUserAuthRepository`, could add the additional `As-User` header.\r\n\r\n**2.**\r\nAnother option is to add an optional `asUser` string to every Box*Manager method signature. `BoxResourceManager.AddAuthorization` would be responsible for adding the appropriate header. This feels pretty clunky to me:\r\n\r\n    public async Task<bool> DeleteAsync(string id, string etag=null, string asUser=null)\r\n\r\n**3.**\r\nFinally, we might add the same optional `asUser` parameter on the `BoxClient` and `Box*Manager` constructors instead of the methods. This feels a little less clunky than option (2) and wouldn't result in the breaking change of (1).\r\n\r\nThoughts?\r\n"},"comment":{"url":"https://api.github.com/repos/box/box-windows-sdk-v2/issues/comments/119718078","html_url":"https://github.com/box/box-windows-sdk-v2/issues/43#issuecomment-119718078","issue_url":"https://api.github.com/repos/box/box-windows-sdk-v2/issues/43","id":119718078,"user":{"login":"sukku007","id":13152008,"avatar_url":"https://avatars.githubusercontent.com/u/13152008?v=3","gravatar_id":"","url":"https://api.github.com/users/sukku007","html_url":"https://github.com/sukku007","followers_url":"https://api.github.com/users/sukku007/followers","following_url":"https://api.github.com/users/sukku007/following{/other_user}","gists_url":"https://api.github.com/users/sukku007/gists{/gist_id}","starred_url":"https://api.github.com/users/sukku007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sukku007/subscriptions","organizations_url":"https://api.github.com/users/sukku007/orgs","repos_url":"https://api.github.com/users/sukku007/repos","events_url":"https://api.github.com/users/sukku007/events{/privacy}","received_events_url":"https://api.github.com/users/sukku007/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T20:14:17Z","updated_at":"2015-07-08T20:14:17Z","body":"any outcome on this thread/question?"}}