kivra/oauth2 — pull request #41 by drobakowski (2014-05-30 12:15:48+00:00)
Title: Fix oauth2_response:to_proplist/1 for correct scoping according to RFC6749 section 3.3

Scopes should be expressed as a list of space-delimited, case-sensitive strings.

At the moment:
```erlang
oauth2_response:to_proplist(oauth2_response:new(..., ..., ..., [<<"herp">>, <<"derp">>], ...)).
[...
{<<"scope">>,<<"herpderp">>},
...
]
```
Should be:
```erlang
oauth2_response:to_proplist(oauth2_response:new(..., ..., ..., [<<"herp">>, <<"derp">>], ...)).
[...
{<<"scope">>,<<"herp derp">>},
...
]
```

I've also refactored ```oauth2_response_tests:to_proplist_test/0``` to a property-based PropEr test, but wasn't sure how to handle the type for ```resource_owner::term()``` proper. For now i've declared it as ```binary()```, since this is the type which ```resource_owner``` should be converted to.