Documentation ¶
Index ¶
- func SpotifyConfig(appBaseURL string, config *Config, scopes []spotify.Scope) *oauth2.Config
- type Config
- type OAuth
- func (o *OAuth) AccessToken(user *model.User) (string, error)
- func (o *OAuth) BindToMux(mux *mux.Router)
- func (o *OAuth) CallbackHandler(rw http.ResponseWriter, req *http.Request)
- func (o *OAuth) MustBeAuthed(handler http.HandlerFunc, errorHandler func(http.ResponseWriter, error)) http.HandlerFunc
- func (o *OAuth) OptionallyAuthed(handler http.HandlerFunc, errorHandler func(http.ResponseWriter, error)) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func (*OAuth) CallbackHandler ¶
func (o *OAuth) CallbackHandler(rw http.ResponseWriter, req *http.Request)
func (*OAuth) MustBeAuthed ¶
func (o *OAuth) MustBeAuthed(handler http.HandlerFunc, errorHandler func(http.ResponseWriter, error)) http.HandlerFunc
func (*OAuth) OptionallyAuthed ¶
func (o *OAuth) OptionallyAuthed(handler http.HandlerFunc, errorHandler func(http.ResponseWriter, error)) http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.