oauth2: fix typo in Token docs and clarify mutability of Token

Change-Id: I1093cffbd4b6fe25cd5b7cfb31e820b15fcfa41f
Reviewed-on: https://go-review.googlesource.com/2197
Reviewed-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
Brad Fitzpatrick 2014-12-30 14:30:46 -08:00
parent a379e41d44
commit dfb470cc49
2 changed files with 2 additions and 1 deletions

View File

@ -61,6 +61,7 @@ type Config struct {
type TokenSource interface { type TokenSource interface {
// Token returns a token or an error. // Token returns a token or an error.
// Token must be safe for concurrent use by multiple goroutines. // Token must be safe for concurrent use by multiple goroutines.
// The returned Token must not be modified.
Token() (*Token, error) Token() (*Token, error)
} }

View File

@ -16,7 +16,7 @@ import (
// //
// Most users of this package should not access fields of Token // Most users of this package should not access fields of Token
// directly. They're exported mostly for use by related packages // directly. They're exported mostly for use by related packages
// implementing derivate OAuth2 flows. // implementing derivative OAuth2 flows.
type Token struct { type Token struct {
// AccessToken is the token that authorizes and authenticates // AccessToken is the token that authorizes and authenticates
// the requests. // the requests.