Skip to content

v0.3.0

Compare
Choose a tag to compare
@joefitzgerald joefitzgerald released this 14 Sep 22:39
· 70 commits to master since this release
cf865ad

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) removed zoneID, and added a new required argument (a uaa.AuthenticationOption) (and also additional optional uaa.Option arguments)
  • Remove constructors:
    • Remove uaa.NewWithClientCredentials
    • Remove uaa.NewWithPasswordCredentials
    • Remove uaa.NewWithAuthorizationCode
    • Remove uaa.NewWithRefreshToken
    • Remove uaa.NewWithToken
  • 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
  • Rename uaa.API.AuthenticatedClient > uaa.API.Client
  • Unexport uaa.API fields:
    • Remove uaa.API.UnauthenticatedClient (use the uaa.WithClient option instead)
    • Remove uaa.API.ZoneID (use the uaa.WithZoneID option instead)
    • Remove uaa.API.Verbose (use the uaa.WithVerbosity option instead)
    • Remove uaa.API.UserAgent (use the uaa.WithUserAgent option instead)

Features:

  • Clarify usage of uaa.New in the README
  • 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 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

Detailed changes: v0.2.7...v0.3.0