Beispiel #1
0
// LoginHandler handles Tumblr login requests by obtaining a request token,
// setting a temporary token secret cookie, and redirecting to the
// authorization URL.
func LoginHandler(config *oauth1.Config, cookieConfig gologin.CookieConfig, failure ctxh.ContextHandler) ctxh.ContextHandler {
	// oauth1.LoginHandler -> oauth1.CookieTempHander -> oauth1.AuthRedirectHandler
	success := oauth1Login.AuthRedirectHandler(config, failure)
	success = oauth1Login.CookieTempHandler(cookieConfig, success, failure)
	return oauth1Login.LoginHandler(config, success, failure)
}
Beispiel #2
0
// LoginHandler handles Twitter login requests by obtaining a request token and
// redirecting to the authorization URL.
func LoginHandler(config *oauth1.Config, failure ctxh.ContextHandler) ctxh.ContextHandler {
	// oauth1.LoginHandler -> oauth1.AuthRedirectHandler
	success := oauth1Login.AuthRedirectHandler(config, failure)
	return oauth1Login.LoginHandler(config, success, failure)
}