Documentation ¶
Overview ¶
Package auth GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrOAuthProviderNotFound = errors.New("OAuthProvider Not Found")
)
Functions ¶
func RegisterOAuthProvider ¶
func RegisterOAuthProvider(ctx context.Context, op OAuthProvider)
Types ¶
type AccountExchanger ¶
type Auth ¶
type Auth interface { ListAuthProvider() (list []*ProviderInfo) AuthCodeURL(ctx context.Context, name string, redirectURI string) (redirectTo *url.URL, err error) ExchangeToken(ctx context.Context, name string, code string) (token *Token, err error) }
func FromContext ¶
type Authorizations ¶
func ParseAuthorization ¶
func ParseAuthorization(s string) (auths Authorizations)
func (Authorizations) Add ¶
func (auths Authorizations) Add(k string, v string)
func (Authorizations) Get ¶
func (auths Authorizations) Get(k string) string
func (Authorizations) RuntimeDoc ¶
func (Authorizations) RuntimeDoc(names ...string) ([]string, bool)
func (Authorizations) String ¶
func (auths Authorizations) String() string
type OAuthProvider ¶
type OAuthRegister ¶
type OAuthRegister interface {
Register(op OAuthProvider)
}
type OIDC ¶
type OIDC struct { // OpenIDConnect Endpoint, when empty, oidc feature disabled. Endpoint string `flag:",omitempty"` }
type Provider ¶
type Provider struct { // Should be full callback URI // example https://host/authorize/callback/{name} RedirectURI string `flag:",omitempty"` AutoCreatedBy string `flag:",omitempty"` // contains filtered or unexported fields }
func (*Provider) InjectContext ¶
func (*Provider) SetAccountExchanger ¶
func (c *Provider) SetAccountExchanger(ae AccountExchanger)
func (*Provider) SetDefaults ¶
func (c *Provider) SetDefaults()
type ProviderInfo ¶
func (ProviderInfo) RuntimeDoc ¶
func (v ProviderInfo) RuntimeDoc(names ...string) ([]string, bool)
Click to show internal directories.
Click to hide internal directories.