Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeRedirect ¶
func ServeRedirect(port int, path string, callback func(code string)) (state string, closeFunc func(), err error)
ServeRedirect starts a local HTTP server to receive an OAuth2 authorization code at the given localhost port and path. It accepts a callback to store the received and validated code.
This function returns a state that must be included in the initial OAuth2 request and a function that must be called to close the server. If an error is returned, no server will have been started and the close function will be nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.