Documentation
¶
Overview ¶
Package provider is an external auth provider e.g oauth
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointOption ¶
type EndpointOption func(*EndpointOptions)
func WithLoginHint ¶
func WithLoginHint(hint string) EndpointOption
func WithState ¶
func WithState(c string) EndpointOption
type EndpointOptions ¶
type Grant ¶
type Grant struct {
// token for reuse
Token string
// Expiry of the token
Expiry time.Time
// Scopes associated with grant
Scopes []string
}
Grant is a granted authorisation
type Option ¶
type Option func(*Options)
Option returns a function which sets an option
func Credentials ¶
Credentials is an option which sets the client id and secret
type Options ¶
type Options struct {
// ClientID is the application's ID.
ClientID string
// ClientSecret is the application's secret.
ClientSecret string
// Endpoint for the provider
Endpoint string
// Redirect url incase of UI
Redirect string
// Scope of the oauth request
Scope string
}
Options a provider can have
type Provider ¶
type Provider interface {
// String returns the name of the provider
String() string
// Options returns the options of a provider
Options() Options
// Endpoint for the provider
Endpoint(...EndpointOption) string
// Redirect url incase of UI
Redirect() string
}
Provider is an auth provider
Click to show internal directories.
Click to hide internal directories.