{"action":"created","issue":{"url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1128","repository_url":"https://api.github.com/repos/danialfarid/ng-file-upload","labels_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1128/labels{/name}","comments_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1128/comments","events_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1128/events","html_url":"https://github.com/danialfarid/ng-file-upload/issues/1128","id":116193591,"number":1128,"title":"Amazon authentication v4 support","user":{"login":"karensg","id":359682,"avatar_url":"https://avatars.githubusercontent.com/u/359682?v=3","gravatar_id":"","url":"https://api.github.com/users/karensg","html_url":"https://github.com/karensg","followers_url":"https://api.github.com/users/karensg/followers","following_url":"https://api.github.com/users/karensg/following{/other_user}","gists_url":"https://api.github.com/users/karensg/gists{/gist_id}","starred_url":"https://api.github.com/users/karensg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karensg/subscriptions","organizations_url":"https://api.github.com/users/karensg/orgs","repos_url":"https://api.github.com/users/karensg/repos","events_url":"https://api.github.com/users/karensg/events{/privacy}","received_events_url":"https://api.github.com/users/karensg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/danialfarid/ng-file-upload/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-11-10T20:22:07Z","updated_at":"2016-06-03T04:49:10Z","closed_at":null,"body":"First of all, lots of compliments for your great job!\r\n\r\nWould it be possible to update the version of amazon authentication to v4 and update the code example for it. At this moment, all Amazon regions support v4. However, Frankfurt is the first region that does not support v2 any more. It would be great to use this library for those buckets as well.\r\n\r\nCheers,\r\nKarens\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/comments/223490008","html_url":"https://github.com/danialfarid/ng-file-upload/issues/1128#issuecomment-223490008","issue_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1128","id":223490008,"user":{"login":"rnemec","id":2880698,"avatar_url":"https://avatars.githubusercontent.com/u/2880698?v=3","gravatar_id":"","url":"https://api.github.com/users/rnemec","html_url":"https://github.com/rnemec","followers_url":"https://api.github.com/users/rnemec/followers","following_url":"https://api.github.com/users/rnemec/following{/other_user}","gists_url":"https://api.github.com/users/rnemec/gists{/gist_id}","starred_url":"https://api.github.com/users/rnemec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnemec/subscriptions","organizations_url":"https://api.github.com/users/rnemec/orgs","repos_url":"https://api.github.com/users/rnemec/repos","events_url":"https://api.github.com/users/rnemec/events{/privacy}","received_events_url":"https://api.github.com/users/rnemec/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T04:49:10Z","updated_at":"2016-06-03T04:49:10Z","body":"@redterror , I don't know what credential scope string is, but if you mean the string passed as 'X-Amz-Credential', the answer is NO. At least I haven't changed much @flosky 's code. To make it work with temp credentials, all I did was:\r\n- server: got the sessionToken from credentials object and passed into the policy:\r\n\r\n```\r\n  if (AWS.config.credentials.sessionToken) {\r\n    policy.conditions.push(\r\n      {'X-Amz-Security-Token': AWS.config.credentials.sessionToken}\r\n    );\r\n  }\r\n```\r\n- server: also passed the sessionToken to the client in the returned JSON\r\n```\r\n  return {\r\n    signature: signature,\r\n    policy: base64Policy,\r\n    date: date,\r\n    credentials: credentials,\r\n    expiration: expiration,\r\n    sessionToken: AWS.config.credentials.sessionToken\r\n  };\r\n```\r\n- client: set the X-Amz-Security-Token in the Upload data\r\n```\r\n'X-Amz-Security-Token': response.data.sessionToken,\r\n```\r\n\r\nThat's all. TLDR:\r\n```\r\n<AccessKeyId>/<YYYYMMDD>/<region>/<service>/aws4_request\r\n```"}}
{"actor":{"display_login":"rnemec"}}