oauth2 v0.7.0 Release Notes

Release Date: 2016-08-16 // over 5 years ago
  • ๐Ÿ‘Œ Improvements

    • โž• Add support for custom serializers based on MIME types.
    • โœ‚ Remove dependency on HTTPoison in favor of using hackney directly.
    • โœ‚ Remove dependency on mimetype_parser.
    • โœ… Poison is now only a test dependency.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ“œ expires_in values that are returned as strings are now properly parsed into integers for expires_at.

    Backward Incompatible Changes

    Prior to version v0.7.0 OAuth2.Client was primarily used for the purpose of interfacing with the OAuth server to retrieve a token. OAuth2.Token was then responsible for using that token to make authenticated requests.

    โ™ป๏ธ In v0.7.0 this interface has been refactored so that an OAuth2.Client struct now references an OAuth2.Token directly and many of the action methods have ๐Ÿšš been moved so that they are called on OAuth2.Client, with an instance of the client struct as their first argument.

    Please consult the README for an example of general usage to retrieve a token and make a request.

    ๐Ÿšš The following methods have been moved and adjusted so that they take a OAuth2.Client.t which contains a token, rather than a token directly:

    • OAuth2.AccessToken.get -> OAuth2.Client.get
    • OAuth2.AccessToken.get! -> OAuth2.Client.get!
    • OAuth2.AccessToken.put -> OAuth2.Client.put
    • OAuth2.AccessToken.put! -> OAuth2.Client.put!
    • OAuth2.AccessToken.patch -> OAuth2.Client.patch
    • OAuth2.AccessToken.patch! -> OAuth2.Client.patch!
    • OAuth2.AccessToken.post -> OAuth2.Client.post
    • OAuth2.AccessToken.post! -> OAuth2.Client.post!
    • OAuth2.AccessToken.delete -> OAuth2.Client.delete
    • OAuth2.AccessToken.delete! -> OAuth2.Client.delete!
    • OAuth2.AccessToken.refresh -> OAuth2.Client.refresh_token
    • OAuth2.AccessToken.refresh! -> OAuth2.Client.refresh_token!

    โž• Additionally, the following methods have been moved to OAuth2.Request

    • OAuth2.AccessToken.request -> OAuth2.Request.request
    • OAuth2.AccessToken.request! -> OAuth2.Request.request!

    Diff: https://github.com/scrogson/oauth2/compare/v0.6.0...v0.7.0