Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultDeniedHandler handles the requests that were denied access because // of OAuth1. By default, returns a 401 status code with a generic message. DefaultDeniedHandler = http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Error(w, "Unauthorized", 401) })) )
Functions ¶
This section is empty.
Types ¶
type OAuth1 ¶
type OAuth1 struct {
// A function that return the consumer secret and the username of the associated consumer key
CheckerFunc OAuthCheckerFunc
// DeniedHandler is called if the request is unauthorized. If it is nil,
// the DefaultDeniedHandler variable is used.
DeniedHandler http.Handler
// WithBodyHash will check for the optionnal oauth_body_hash, default to no
// see http://oauth.googlecode.com/svn'/spec/ext/body_hash/1.0/drafts/4/spec.html
WithBodyHash bool
}
type OAuthCheckerFunc ¶
Click to show internal directories.
Click to hide internal directories.