v0.3.0
This release changes the way you construct a uaa.API
using uaa.New
, and implements the functional options pattern (#25).
Breaking Changes:
uaa.New(target string, authOpt AuthenticationOption, opts ...Option)
removedzoneID
, and added a new required argument (auaa.AuthenticationOption
) (and also additional optionaluaa.Option
arguments)- Remove constructors:
- Remove
uaa.NewWithClientCredentials
- Remove
uaa.NewWithPasswordCredentials
- Remove
uaa.NewWithAuthorizationCode
- Remove
uaa.NewWithRefreshToken
- Remove
uaa.NewWithToken
- Remove
- Remove
uaa.API
builders:- Remove
uaa.API.WithClient
- Remove
uaa.API.WithSkipSSLValidation
- Remove
uaa.API.WithClientCredentials
- Remove
uaa.API.WithPasswordCredentials
- Remove
uaa.API.WithAuthorizationCode
- Remove
uaa.API.WithRefreshToken
- Remove
uaa.API.WithToken
- Remove
- Rename
uaa.API.AuthenticatedClient
>uaa.API.Client
- Unexport
uaa.API
fields:- Remove
uaa.API.UnauthenticatedClient
(use theuaa.WithClient
option instead) - Remove
uaa.API.ZoneID
(use theuaa.WithZoneID
option instead) - Remove
uaa.API.Verbose
(use theuaa.WithVerbosity
option instead) - Remove
uaa.API.UserAgent
(use theuaa.WithUserAgent
option instead)
- Remove
Features:
- Clarify usage of
uaa.New
in theREADME
- Add
uaa.Option
, with implementations:- Add
uaa.WithClient
- Add
uaa.WithSkipSSLValidation
- Add
uaa.WithZoneID(zoneID string)
- Add
uaa.WithVerbosity(verbose bool)
- Add
uaa.WithUserAgent(userAgent string)
- Add
- Add
uaa.AuthenticationOption
, with implementations:- Add
uaa.WithClientCredentials
- Add
uaa.WithPasswordCredentials
- Add
uaa.WithAuthorizationCode
- Add
uaa.WithRefreshToken
- Add
uaa.WithToken
- Add
uaa.WithNoAuthentication()
for scenarios where you just want to make unauthenticated calls
- Add
Detailed changes: v0.2.7...v0.3.0