mirror of
https://github.com/golang/oauth2.git
synced 2025-07-21 00:00:09 +08:00
oauth2: fix docs for Config.DeviceAuth
Config.DeviceAccess should be Config.DeviceAuth when using GenerateVerifier() or S256ChallengeOption() Change-Id: Ie21a808387f731d270ae54ea1705de3e786cad7f GitHub-Last-Rev: 2d6b4fd736ce785cc1675b1963be165529b09b1f GitHub-Pull-Request: golang/oauth2#763 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/636216 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
This commit is contained in:
parent
314ee5b92b
commit
ac571fa341
4
pkce.go
4
pkce.go
@ -21,7 +21,7 @@ const (
|
||||
//
|
||||
// A fresh verifier should be generated for each authorization.
|
||||
// S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL
|
||||
// (or Config.DeviceAccess) and VerifierOption(verifier) to Config.Exchange
|
||||
// (or Config.DeviceAuth) and VerifierOption(verifier) to Config.Exchange
|
||||
// (or Config.DeviceAccessToken).
|
||||
func GenerateVerifier() string {
|
||||
// "RECOMMENDED that the output of a suitable random number generator be
|
||||
@ -51,7 +51,7 @@ func S256ChallengeFromVerifier(verifier string) string {
|
||||
}
|
||||
|
||||
// S256ChallengeOption derives a PKCE code challenge derived from verifier with
|
||||
// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess
|
||||
// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAuth
|
||||
// only.
|
||||
func S256ChallengeOption(verifier string) AuthCodeOption {
|
||||
return challengeOption{
|
||||
|
Loading…
x
Reference in New Issue
Block a user