Documentation ¶
Overview ¶
Package pkce implements the OAuth PKCE Authorization Flow for client applications by starting a server at localhost to receive the web redirect after the user has authorized the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BrowserParams ¶
type BrowserParams struct { ClientID string Audience string RedirectURI string Scopes []string CodeVerifier string CodeChallenge string }
BrowserParams are GET query parameters for initiating the PKCE flow.
type CodeResponse ¶
CodeResponse represents the code received by the local server's callback handler.
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
Flow holds the state for the steps of OAuth Web Application flow.
func (*Flow) AccessToken ¶
AccessToken blocks until the browser flow has completed and returns the access token.
func (*Flow) BrowserURL ¶
func (flow *Flow) BrowserURL(baseURL string, params BrowserParams) (string, error)
BrowserURL appends GET query parameters to baseURL and returns the url that the user should navigate to in their web browser. nolint:gocritic // external code too much risk changing