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 ¶ added in v2.5.0
type EndpointOption func(*EndpointOptions)
func WithState ¶ added in v2.5.0
func WithState(c string) EndpointOption
type EndpointOptions ¶ added in v2.5.0
type EndpointOptions struct {
State string
}
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.