oauth2cli

Go package of OAuth 2.0 authorization for command line tools, which allows simple authorization flow for better UX

APACHE-2.0 License

Stars
53
Committers
5

Bot releases are hidden (Show)

oauth2cli - v1.14.0 Latest Release

Published by int128 about 3 years ago

New feature

  • 2581d8a Add option to specify failure and redirect uris (#54, #57, #58) thanks @trietsch

Improvements

  • 3ab5a50 Fix expired certificate in e2e_test (#56)
  • 8f0bccb Fix workflow to run on pull_request (#55)

Updates

  • a3a85ea Update module github.com/google/go-cmp to v0.5.6 (#63)
  • f226f19 Update golang.org/x/sync commit hash to 036812b (#62)
  • e52852a Update golang.org/x/oauth2 commit hash to 6b3c2da (#60)
  • b78e901 Update github.com/pkg/browser commit hash to 681adbf (#59)
oauth2cli - v1.13.0

Published by int128 about 4 years ago

  • a52d98e Fix infinite wait for Shutdown() of local server (#51)
  • acbbdd6 Respect context when writing to LocalServerReadyChan (#50)
  • 42995bd Remove deprecated fields (#46)

Breaking change

LocalServerAddress and LocalServerPort have been removed. Use LocalServerBindAddress instead.

oauth2cli - v1.12.1

Published by int128 over 4 years ago

  • e0dcefd Fix deadlock on http.Server.Shutdown error (#40)
  • e6ee980 Add debug log feature (#39)
oauth2cli - v1.12.0

Published by int128 over 4 years ago

  • e48f9ce Improve default authorization success page (#38)

Screencast

oauth2cli - v1.11.0

Published by int128 over 4 years ago

  • 6633133 Add Config.RedirectURLHostname (#34)
oauth2cli - v1.10.1

Published by int128 over 4 years ago

  • d6e563d Rewrite xerrors with Go errors (#32)
oauth2cli - v1.10.0

Published by int128 over 4 years ago

  • 5b36f33 Add oauth2params package (#29)
  • e4667a2 Always use PKCE in example app (#28)
oauth2cli - v1.9.0

Published by int128 over 4 years ago

  • 212ffd8 Bump golang.org/x/oauth2 to v0.0.0-20200107190931-bf48bf16ab8d (#27)
  • 3f637be Add Config.State option (#26)
  • ddc691f Refactor (#25)
oauth2cli - v1.8.1

Published by int128 almost 5 years ago

  • 1ee72db Fix backward compatibility of LocalServerAddress, LocalServerPort (#22)
oauth2cli - v1.8.0

Published by int128 almost 5 years ago

  • 383ac96 Add Config.LocalServerBindAddress (#19)
  • 9a2338a Add TokenRequestOptions for PKCE (#16)
  • 75c68f1 Move to github.com/int128/[email protected] (#12)
oauth2cli -

Published by int128 about 5 years ago

  • f6fc1b7 Allow TLS serving (#8)
  • 907c8bb Bump dependencies for Go 1.13 (#9)
  • ec48308 Refactor: introduce flag to example app (#10)
oauth2cli -

Published by int128 about 5 years ago

  • 4b13512 Add bind address option of local server (#7) (thanks @pacoorozco)
  • 8dedd2f Refactor tests (#6)
oauth2cli -

Published by int128 about 5 years ago

  • f332bec Use channel for notifying ready of local server

Breaking changes

  • SkipOpenBrowser has been removed and oauth2cli does not open the browser. Instead use LocalServerReadyChan and open the browser manually.
  • ShowLocalServerURL has been removed. Instead use LocalServerReadyChan.

See also the example.

oauth2cli -

Published by int128 over 5 years ago

  • 3ddc777 Move to xerrors
oauth2cli -

Published by int128 over 5 years ago

  • 7e64775 Refactor specification
  • 76cb5ac Prevent channel panic if multiple responses or errors
  • 1b9bc2d Include error details on no available port

Breaking change

API specification has been changed as follows:

// new:
	token, err := oauth2cli.GetToken(ctx, oauth2cli.Config{
		OAuth2Config: oauth2.Config{/* ... */},
	}
// old:
	flow := oauth2cli.AuthCodeFlow{
		Config: oauth2.Config{/* ... */},
	}
	token, err := flow.GetToken(ctx)
oauth2cli -

Published by int128 over 5 years ago

  • 582c6a5 Add fallback of port for local server
  • ef19eca Add LocalServerSuccessResponse option

Breaking change

Type of AuthCodeFlow.LocalServerPort has been changed to []int from int. If you set a value (e.g. 8000), you need to change it to a slice (e.g. []int{8000}).

oauth2cli -

Published by int128 over 5 years ago

  • 67d7e3b Move ShowLocalServerURL to main goroutine
oauth2cli -

Published by int128 over 5 years ago

  • 3c9f47a Fix unhandled errors
  • 798a5f5 Add LocalServerMiddleware option
  • 9851a09 Change default of ShowLocalServerURL to do nothing
oauth2cli -

Published by int128 over 5 years ago

  • 8bff59a Introduce github.com/pkg/errors
  • ed6f3cc Update dependencies
oauth2cli - 1.0.0

Published by int128 almost 6 years ago

First release!