// CallbackHandler handles Tumblr callback requests by parsing the oauth token // and verifier and adding the Tubmlr access token and User to the ctx. If // authentication succeeds, handling delegates to the success handler, // otherwise to the failure handler. func CallbackHandler(config *oauth1.Config, cookieConfig gologin.CookieConfig, success, failure ctxh.ContextHandler) ctxh.ContextHandler { // oauth1.CookieTempHandler -> oauth1.CallbackHandler -> TumblrHandler -> success success = tumblrHandler(config, success, failure) success = oauth1Login.CallbackHandler(config, success, failure) return oauth1Login.CookieTempHandler(cookieConfig, success, failure) }
// CallbackHandler handles Twitter callback requests by parsing the oauth token // and verifier and adding the Twitter access token and User to the ctx. If // authentication succeeds, handling delegates to the success handler, // otherwise to the failure handler. func CallbackHandler(config *oauth1.Config, success, failure ctxh.ContextHandler) ctxh.ContextHandler { // oauth1.EmptyTempHandler -> oauth1.CallbackHandler -> TwitterHandler -> success success = twitterHandler(config, success, failure) success = oauth1Login.CallbackHandler(config, success, failure) return oauth1Login.EmptyTempHandler(success) }