public ActionResult ExplicitIndex() { ConsumerKeyModel model = this.GenerateConsumerKeyModel(); model.CallbackUrl = this.Request.Url.Scheme + "://" + this.Request.Url.Authority + "/OpenAuth/OAuthCallback"; return(View(model)); }
private ConsumerKeyModel GenerateConsumerKeyModel() { OAuthKeyConfiguration oauthConfiguration = OAuthKeyConfiguration.GetInstance(); ConsumerKeyModel model = new ConsumerKeyModel(); model.ConsumerKey = oauthConfiguration.ConsumerKey; model.ConsumerSecret = oauthConfiguration.ConsumerSecret; model.CallbackUrl = this.Request.Url.Scheme + "://" + this.Request.Url.Authority + "/OpenAuth/OAuthCallback"; model.EndpointModel = this.GenerateEndPointModel(); return(model); }
public ActionResult Index() { OAuthKeyConfiguration oauthConfiguration = OAuthKeyConfiguration.GetInstance(); EndpointConfiguration endpointConfiguration = EndpointConfiguration.GetInstance(); ConsumerKeyModel model = new ConsumerKeyModel(); model.ConsumerKey = oauthConfiguration.ConsumerKey; model.ConsumerSecret = oauthConfiguration.ConsumerSecret; model.CallbackUrl = this.Request.Url.Scheme + "://" + this.Request.Url.Authority + "/DevDefined/OAuthCallback"; EndpointModel endpointModel = new EndpointModel(); endpointModel.ServiceUri = endpointConfiguration.ServiceUri; endpointModel.RequestTokenUri = endpointConfiguration.RequestTokenUri; endpointModel.AuthorizationUri = endpointConfiguration.AuthorizationUri; endpointModel.AccessTokenUri = endpointConfiguration.AccessTokenUri; model.EndpointModel = endpointModel; return(View(model)); }