{"action":"created","issue":{"url":"https://api.github.com/repos/seratch/AWScala/issues/128","repository_url":"https://api.github.com/repos/seratch/AWScala","labels_url":"https://api.github.com/repos/seratch/AWScala/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/seratch/AWScala/issues/128/comments","events_url":"https://api.github.com/repos/seratch/AWScala/issues/128/events","html_url":"https://github.com/seratch/AWScala/issues/128","id":168854296,"number":128,"title":"CredentialsProvider trait limits usage","user":{"login":"adamnfish","id":29761,"avatar_url":"https://avatars.githubusercontent.com/u/29761?v=3","gravatar_id":"","url":"https://api.github.com/users/adamnfish","html_url":"https://github.com/adamnfish","followers_url":"https://api.github.com/users/adamnfish/followers","following_url":"https://api.github.com/users/adamnfish/following{/other_user}","gists_url":"https://api.github.com/users/adamnfish/gists{/gist_id}","starred_url":"https://api.github.com/users/adamnfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamnfish/subscriptions","organizations_url":"https://api.github.com/users/adamnfish/orgs","repos_url":"https://api.github.com/users/adamnfish/repos","events_url":"https://api.github.com/users/adamnfish/events{/privacy}","received_events_url":"https://api.github.com/users/adamnfish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-02T10:43:41Z","updated_at":"2016-08-10T06:40:31Z","closed_at":null,"body":"awscala provides a `CredentialsProvider` trait that doesn't seem to offer any benefit. It simply extends the Java SDK's own `AWSCredentialsProvider` interface which provides identical methods.\r\n\r\nOne problem with this is that the client classes accept an awscala `CredentialsProvider` in the constructor, rather than Amazon's type. This means it isn't possible to pass e.g. a provider chain to these classes.\r\n\r\nConsider the following [from here](https://github.com/seratch/AWScala/blob/master/src/main/scala/awscala/sts/STS.scala#L80) (with imports inlined for clarity):\r\n```scala\r\nclass STSClient(credentialsProvider: awscala.CredentialsProvider = awscala.CredentialsLoader.load())\r\n  extends aws.AWSSecurityTokenServiceClient(credentialsProvider)\r\n  with awscala.sts.STS\r\n```\r\n\r\nWere the above instead written as follow, it would be possible to provide any valid AWS credentials provider that exists now or in the future.\r\n```scala\r\nclass STSClient(credentialsProvider: com.amazonaws.auth.AWSCredentialsProvider = awscala.CredentialsLoader.load())\r\n  extends aws.AWSSecurityTokenServiceClient(credentialsProvider)\r\n  with awscala.sts.STS\r\n```\r\nNote that the default argument remains a valid type here. I've adopted the latter example in my own code so I can pass provider chains.\r\n\r\nI'm happy to raise a Pull Request that fixes this but I wanted to first check if there's a reason why this approach was taken. If I've missed something then let me know.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/seratch/AWScala/issues/comments/238778890","html_url":"https://github.com/seratch/AWScala/issues/128#issuecomment-238778890","issue_url":"https://api.github.com/repos/seratch/AWScala/issues/128","id":238778890,"user":{"login":"seratch","id":19658,"avatar_url":"https://avatars.githubusercontent.com/u/19658?v=3","gravatar_id":"","url":"https://api.github.com/users/seratch","html_url":"https://github.com/seratch","followers_url":"https://api.github.com/users/seratch/followers","following_url":"https://api.github.com/users/seratch/following{/other_user}","gists_url":"https://api.github.com/users/seratch/gists{/gist_id}","starred_url":"https://api.github.com/users/seratch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seratch/subscriptions","organizations_url":"https://api.github.com/users/seratch/orgs","repos_url":"https://api.github.com/users/seratch/repos","events_url":"https://api.github.com/users/seratch/events{/privacy}","received_events_url":"https://api.github.com/users/seratch/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T06:40:31Z","updated_at":"2016-08-10T06:40:31Z","body":"The purpose to have `CredentialsProvider` is to avoid any effects by AWS SDK's API changes. But I can understand your point. Initially, this library's goal is providing easy-to-use / handy way to deal with AWS SDK on the Scala REPL. If your pull requests meet it, any improvements are welcome."}}
{"actor":{"display_login":"seratch"}}