Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
Flow implements the three-legged OAuth authentication flow.
func NewOAuthFlow ¶
NewOAuthFlow returns a Flow instance that can be used to execute a three-legged OAuth flow using the service provider from the specified configuration option. The callbackListenAddr specifies an address to bind to for handling OAuth redirect callbacks. If left empty, the default 127.0.0.1:8080 address will be used instead. The redirectHost parameter specifies the hostname to be inserted into generated redirect URLs. For CLI applications this can be left empty in which case the callback listen address will be used instead. For non-CLI services redirectHost would normally point to a load balancer instance that routes incoming requests to the specified callbackListenAddr.
func (*Flow) Authenticate ¶
Authenticate starts a new three-legged OAuth flow. It returns back a URL that the client must to visit to authorize access. Once the user has completed the manual authorization step, the authorization result will be published to the returned channel.
Clients can safely invoke Authenticate in a concurrent fashion.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result represents the result of an OAuth authentication attempt.