Documentation ¶
Index ¶
- Constants
- type AuthorizedClient
- type Provider
- func (p Provider) AuthenticateUser(values url.Values) (client *AuthorizedClient, err error)
- func (p Provider) CallbackHandler(ctx context.Context, clientChan chan *AuthorizedClient) func(w http.ResponseWriter, r *http.Request)
- func (p Provider) ErrorHandler() func(w http.ResponseWriter, r *http.Request)
- func (p Provider) ValidateToken(token *oauth2.Token) (*oauth2.Token, error)
Constants ¶
View Source
const (
// AuthorizationPrefix is authorization prefix
AuthorizationPrefix = "Bearer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedClient ¶
AuthorizedClient is authorized client and token
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider contains oauth provider config
func NewProvider ¶
NewProvider returns new provider
func (Provider) AuthenticateUser ¶
func (p Provider) AuthenticateUser(values url.Values) (client *AuthorizedClient, err error)
AuthenticateUser starts the login process
func (Provider) CallbackHandler ¶
func (p Provider) CallbackHandler(ctx context.Context, clientChan chan *AuthorizedClient) func(w http.ResponseWriter, r *http.Request)
CallbackHandler is oauth callback handler
func (Provider) ErrorHandler ¶
func (p Provider) ErrorHandler() func(w http.ResponseWriter, r *http.Request)
ErrorHandler is oauth error handler
Click to show internal directories.
Click to hide internal directories.