kubernetes/vendor/golang.org/x/oauth2/internal/token.go

type Token

type tokenJSON

func (e *tokenJSON) expiry() (t time.Time) {}

type expirationTime

func (e *expirationTime) UnmarshalJSON(b []byte) error {}

// RegisterBrokenAuthHeaderProvider previously did something. It is now a no-op.
//
// Deprecated: this function no longer does anything. Caller code that
// wants to avoid potential extra HTTP requests made during
// auto-probing of the provider's auth style should set
// Endpoint.AuthStyle.
func RegisterBrokenAuthHeaderProvider(tokenURL string) {}

type AuthStyle

const AuthStyleUnknown

const AuthStyleInParams

const AuthStyleInHeader

type LazyAuthStyleCache

func (lc *LazyAuthStyleCache) Get() *AuthStyleCache {}

type AuthStyleCache

// lookupAuthStyle reports which auth style we last used with tokenURL
// when calling RetrieveToken and whether we have ever done so.
func (c *AuthStyleCache) lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) {}

// setAuthStyle adds an entry to authStyleCache, documented above.
func (c *AuthStyleCache) setAuthStyle(tokenURL string, v AuthStyle) {}

// newTokenRequest returns a new *http.Request to retrieve a new token
// from tokenURL using the provided clientID, clientSecret, and POST
// body parameters.
//
// inParams is whether the clientID & clientSecret should be encoded
// as the POST body. An 'inParams' value of true means to send it in
// the POST body (along with any values in v); false means to send it
// in the Authorization header.
func newTokenRequest(tokenURL, clientID, clientSecret string, v url.Values, authStyle AuthStyle) (*http.Request, error) {}

func cloneURLValues(v url.Values) url.Values {}

func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle, styleCache *AuthStyleCache) (*Token, error) {}

func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {}

type RetrieveError

func (r *RetrieveError) Error() string {}