private void Form1_Load(object sender, EventArgs e) { // OAuth clients registration // NOTE: Specify their own client IDs and secret keys OAuthManager.RegisterClient ( new FacebookClient ( "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd" ) { Parameters = new NameValueCollection { { "display", "popup" } } } ); OAuthManager.RegisterClient ( new VkontakteClient ( "4457505", "wW5lFMVbsw0XwYFgCGG0" ) { Parameters = new NameValueCollection { { "display", "popup" } }, Scope = "status,friends,email" } ); OAuthManager.RegisterClient ( new MailRuClient ( "722701", "d0622d3d9c9efc69e4ca42aa173b938a" ) ); OAuthManager.RegisterClient ( new YandexClient ( "0ee5f0bf2cd141a1b194a2b71b0332ce", "59d76f7c09b54ad38e6b15f792da7a9a" ) ); // add buttons to the form foreach (string providerName in OAuthManager.RegisteredClients.Keys) { var btn = new Button(); btn.Text = providerName; btn.Click += new EventHandler(btn_Click); flowLayoutPanel1.Controls.Add(btn); } }
void Application_Start(object sender, EventArgs e) { // Código que se ejecuta al iniciar la aplicación AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //Oauth OAuthManager.RegisterClient ( "google", "188020733885-mbtmrvhv4nqjf24ip0j04vun2q91sh5o.apps.googleusercontent.com", "GsxR_vq5myxnq_QqUbVIXT7F" ); OAuthManager.RegisterClient ( "facebook", "1978055228883879", "7c47ef27b3c51327b7a0983e03a187c6" ); }
protected void Application_Start(object sender, EventArgs e) { OAuthManager.RegisterClient ( "vk", "6321519", "QSQ1hDbauZXRCOwBqdKw" ); OAuthManager.RegisterClient ( "google", "7217423339-i95d3cl3s9nip1f790s891qlc0au6cnc.apps.googleusercontent.com", "dz0hCWelnOpfbvcr7g9NI2Zj" ); OAuthManager.RegisterClient ( "facebook", "156221961821221", "c7f50e02445b972da8f7db2f89f2c738" ); SmtpHelper.ClientCreate("*****@*****.**", "kiritorito1110111"); RegisterRoutes(RouteTable.Routes); }
/// <summary> /// Registartion OAuth clients. /// </summary> private void RegistrationOAuthClients() { foreach (string clientName in ConfigurationManager.AppSettings["oauth:clients"].Split(',')) { if (String.IsNullOrEmpty(clientName)) { continue; } if (String.IsNullOrEmpty(ConfigurationManager.AppSettings[String.Format("oauth:{0}:id", clientName)])) { throw new ArgumentNullException(String.Format(Test.Resources.Strings.ClientIdIsRequired, clientName)); } if (String.IsNullOrEmpty(ConfigurationManager.AppSettings[String.Format("oauth:{0}:key", clientName)])) { throw new ArgumentNullException(String.Format(Test.Resources.Strings.ClientKeyIsRequired, clientName)); } // public key for odnoklassniki.ru ArrayList args = null; if (clientName.Equals("odnoklassniki", StringComparison.OrdinalIgnoreCase)) { if (String.IsNullOrEmpty(ConfigurationManager.AppSettings[String.Format("oauth:{0}:publicKey", clientName)])) { throw new ArgumentNullException(String.Format(Test.Resources.Strings.PublicKeyIsRequired, clientName)); } args = new ArrayList(); args.Add(ConfigurationManager.AppSettings[String.Format("oauth:{0}:publicKey", clientName)]); } // -- // necessary permissions string scope = null; if (!String.IsNullOrEmpty(ConfigurationManager.AppSettings[String.Format("oauth:{0}:scope", clientName)])) { scope = ConfigurationManager.AppSettings[String.Format("oauth:{0}:scope", clientName)]; } // -- // other parameters NameValueCollection parameters = null; if (!String.IsNullOrEmpty(ConfigurationManager.AppSettings[String.Format("oauth:{0}:parameters", clientName)])) { parameters = HttpUtility.ParseQueryString(ConfigurationManager.AppSettings[String.Format("oauth:{0}:parameters", clientName)]); } // -- OAuthManager.RegisterClient ( clientName, ConfigurationManager.AppSettings[String.Format("oauth:{0}:id", clientName)], ConfigurationManager.AppSettings[String.Format("oauth:{0}:key", clientName)], initArgs: (args != null ? args.ToArray() : null), scope: scope, parameters: parameters ); } }
protected void Application_Start(object sender, EventArgs e) { OAuthManager.RegisterClient ( new DropboxClient ( "0le6wsyp3y085wy", "48afwq9yth83y7u" ) ); }
protected void Application_Start(object sender, EventArgs e) { OAuthManager.RegisterClient ( "google", "546998793431-lngma9lbhbv89hnh7uemtj6htbdjoei3.apps.googleusercontent.com", "YCPcNvhtQPIWVgw2JAY0S6n2", "https://www.googleapis.com/auth/drive" // for details please visit https://developers.google.com/drive/web/scopes ); }
//http://kbyte.ru/ru/Programming/Articles.aspx?id=82&mode=art Nemiro.OAuth public ActionResult Vk(string provider = "VK") { try { OAuthManager.RegisterClient(new VkontakteClient("", "")); string returnUrl = Url.Action("ExternalLoginResult", "Auth", null, null, Request.Url.Host); return(Redirect(OAuthWeb.GetAuthorizationUrl(provider, returnUrl))); } catch { string returnUrl = Url.Action("ExternalLoginResult", "Auth", null, null, Request.Url.Host); return(Redirect(OAuthWeb.GetAuthorizationUrl(provider, returnUrl))); } }
void Application_Start(object sender, EventArgs e) { // Code that runs on application startup RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); OAuthManager.RegisterClient ( "google", Hidden.GoogleClientID, Hidden.GoogleSecret ); }
//Registar os vários serviços usados para autenticação public static void initiateAuth() { OAuthManager.RegisterClient( "google", "***********", "***********" ); OAuthManager.RegisterClient( "facebook", "***********", "***********" ); }
private void RegisterClient() { OAuthManager.RegisterClient ( new VkontakteClient ( "5042701", "JzLKIvmVK2hrLqd7NeOH" ) { Parameters = new NameValueCollection { { "display", "popup" } }, Scope = "friends, messages" } ); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); // set custom requests provider OAuthManager.SetAuthRequestsProvider(typeof(MemCacheOAuthRequestsProvider)); // OAuth clients registration // NOTE: Specify their own client IDs and secret keys OAuthManager.RegisterClient ( "facebook", "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd" ); OAuthManager.RegisterClient ( "mail.ru", "722701", "d0622d3d9c9efc69e4ca42aa173b938a" ); OAuthManager.RegisterClient ( "google", "1058655871432-83b9micke7cll89jfmcno5nftha3e95o.apps.googleusercontent.com", "AeEbEGQqoKgOZb41JUVLvEJL" ); OAuthManager.RegisterClient ( "github", "e14122695d88f5c95bce", "cde23ec001c5180e01e865f4efb57cb0bc848c16" ); OAuthManager.RegisterClient ( "live", "0000000040124265", "6ViSGIbw9N59s5Ndsfz-zaeezlBt62Ep" ); }
private void Yandexauthwindow_Loaded(object sender, RoutedEventArgs e) { var client = new YandexClient ( "ef69cea3cf4946d0b00dec064f1b26ee", "9446b005f22f4a5592b5a78d250551d2" ); if (!OAuthManager.IsRegisteredClient("Yandex")) { OAuthManager.RegisterClient ( client ); } yandexweb.Navigate(source: OAuthWeb.GetAuthorizationUrl("Yandex")); }
void Application_Start(object sender, EventArgs e) { // Código que se ejecuta al iniciar la aplicación RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); OAuthManager.RegisterClient ( "google", "188020733885-bdb8ombkpbceqp3d1ar23a7f95qa99o8.apps.googleusercontent.com", "NYFcv_bkcgPg_wY1Z104A_i1" ); OAuthManager.RegisterClient ( "facebook", "1978055228883879", "7c47ef27b3c51327b7a0983e03a187c6" ); }
void Application_Start(object sender, EventArgs e) { // Código que se ejecuta al iniciar la aplicación RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); OAuthManager.RegisterClient ( "yahoo", "dj0yJmk9Qm1vZ3p2TmtQUm4zJmQ9WVdrOU4wbGlkWGxJT" + "kc4bWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD0xZQ--", "a55738627652db0acfe464de2d9be13963b0ba1f" ); OAuthManager.RegisterClient ( "twitter", "cXzSHLUy57C4gTBgMGRDuqQtr", "3SSldiSb5H4XeEMOIIF4osPWxOy19jrveDcPHaWtHDQqgDYP9P" ); OAuthManager.RegisterClient ( "google", "188020733885-bdb8ombkpbceqp3d1ar23a7f95qa99o8.apps.googleusercontent.com", "NYFcv_bkcgPg_wY1Z104A_i1" ); OAuthManager.RegisterClient ( "facebook", "1978055228883879", "7c47ef27b3c51327b7a0983e03a187c6" ); // identificador de aplicacion 1978055228883879 //Clave secreta de aplicacion 7c47ef27b3c51327b7a0983e03a187c6 }
protected void Application_Start(object sender, EventArgs e) { OAuthManager.RegisterClient ( "facebook", "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd", parameters: new NameValueCollection { { "display", "popup" } } ); OAuthManager.RegisterClient ( "foursquare", "LHYZN1KUXN50L141QCQFNNVOYBGUE3G3FCWFZ3EEZTOZHY5Q", "HWXYFLLSS2IUQ0H4XNCDAZEFZKIU3MZRP5G55TNBDHRPNOQT", parameters: new NameValueCollection { { "display", "touch" } } ); }
void Application_Start(object sender, EventArgs e) { GlobalConfiguration.Configure(WebApiConfig.Register); GlobalConfiguration.Configuration.Formatters.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter); ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition { Path = "~/scripts/jquery-3.4.1.min.js", DebugPath = "~/scripts/jquery-3.4.1.js", CdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js", CdnDebugPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.js" } ); OAuthManager.RegisterClient ( "google", "53457353296-4bvakretn744evl3j4rtvalj27tvb5us.apps.googleusercontent.com", "zqzhoSebS9eZAJn7IhQiglDI", "https://www.googleapis.com/auth/userinfo.profile" ); }
protected void Application_Start(object sender, EventArgs e) { // IMPORTANT: You can not register clients by provider name. // Registration should be carried out through the creation of instances of the class. // custom facebook client OAuthManager.RegisterClient ( new MyFacebookClient ( "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd" ) ); // standard twitter client OAuthManager.RegisterClient ( new Nemiro.OAuth.Clients.TwitterClient ( "1Ayh2ZM2l9chloiFsmxNpi7Gg", "dbVXKWVIlH5fRuVI0FvE2ZDsZAbBg74UrGFYwW1kLSwc0ceJnJ" ) ); // custom twitter client OAuthManager.RegisterClient ( // the client has the same name as the original "Custom", // <---- you must add the difference new MyTwitterClient ( "1Ayh2ZM2l9chloiFsmxNpi7Gg", "dbVXKWVIlH5fRuVI0FvE2ZDsZAbBg74UrGFYwW1kLSwc0ceJnJ" ) ); }
protected void Application_Start(object sender, EventArgs e) { // OAuth clients registration // NOTE: Specify their own client IDs and secret keys OAuthManager.RegisterClient ( "facebook", "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd" ); OAuthManager.RegisterClient ( new TwitterClient ( "1Ayh2ZM2l9chloiFsmxNpi7Gg", "dbVXKWVIlH5fRuVI0FvE2ZDsZAbBg74UrGFYwW1kLSwc0ceJnJ" ) ); OAuthManager.RegisterClient ( new VkontakteClient ( "2419779", "31nnASa9T1eO150VCFgr" ) ); OAuthManager.RegisterClient ( new MailRuClient ( "722701", "d0622d3d9c9efc69e4ca42aa173b938a" ) ); OAuthManager.RegisterClient ( new GoogleClient ( "1058655871432-83b9micke7cll89jfmcno5nftha3e95o.apps.googleusercontent.com", "AeEbEGQqoKgOZb41JUVLvEJL" ) ); OAuthManager.RegisterClient ( new YandexClient ( "73f7c76efea245aba31da2a89feff1b7", "f516cd1aa00a4fc8a94ca67b5701f727" ) ); OAuthManager.RegisterClient ( new GitHubClient ( "e14122695d88f5c95bce", "cde23ec001c5180e01e865f4efb57cb0bc848c16" ) ); OAuthManager.RegisterClient ( new LiveClient ( "0000000040124265", "6ViSGIbw9N59s5Ndsfz-zaeezlBt62Ep" ) ); OAuthManager.RegisterClient ( new AmazonClient ( "amzn1.application-oa2-client.f0ffe4edc256488dae00dcaf96d75d1b", "764dcefe49b441c8c6244c93e5d5d04de54fda6dfdc83da9693bf346f4dc4515" ) { ReturnUrl = "http://localhost" } ); OAuthManager.RegisterClient ( new FoursquareClient ( "LHYZN1KUXN50L141QCQFNNVOYBGUE3G3FCWFZ3EEZTOZHY5Q", "HWXYFLLSS2IUQ0H4XNCDAZEFZKIU3MZRP5G55TNBDHRPNOQT" ) ); }
protected void Application_Start() { #region mvc AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); #endregion // OAuth clients registration // NOTE: Specify their own client IDs and secret keys OAuthManager.RegisterClient ( new FacebookClient ( "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd" ) ); OAuthManager.RegisterClient ( new TwitterClient ( "1Ayh2ZM2l9chloiFsmxNpi7Gg", "dbVXKWVIlH5fRuVI0FvE2ZDsZAbBg74UrGFYwW1kLSwc0ceJnJ" ) ); OAuthManager.RegisterClient ( new VkontakteClient ( "2419779", "31nnASa9T1eO150VCFgr" ) ); OAuthManager.RegisterClient ( new MailRuClient ( "722701", "d0622d3d9c9efc69e4ca42aa173b938a" ) ); OAuthManager.RegisterClient ( new GoogleClient ( "1058655871432-83b9micke7cll89jfmcno5nftha3e95o.apps.googleusercontent.com", "AeEbEGQqoKgOZb41JUVLvEJL" ) ); OAuthManager.RegisterClient ( new YandexClient ( "7b0a53d23e384033be3a414739be255f", "3c85e4a1148640b2a490cbd8c75384df" ) ); OAuthManager.RegisterClient ( new OdnoklassnikiClient ( "1093434880", "CC85541E6B8A3EF53E8FCBD3", "CBAPHNCCEBABABABA" ) ); OAuthManager.RegisterClient ( new GitHubClient ( "e14122695d88f5c95bce", "cde23ec001c5180e01e865f4efb57cb0bc848c16" ) ); OAuthManager.RegisterClient ( new LiveClient ( "0000000040124265", "6ViSGIbw9N59s5Ndsfz-zaeezlBt62Ep" ) ); OAuthManager.RegisterClient ( new AmazonClient ( "amzn1.application-oa2-client.f0ffe4edc256488dae00dcaf96d75d1b", "764dcefe49b441c8c6244c93e5d5d04de54fda6dfdc83da9693bf346f4dc4515" ) { ReturnUrl = "http://localhost" } ); OAuthManager.RegisterClient ( new FoursquareClient ( "LHYZN1KUXN50L141QCQFNNVOYBGUE3G3FCWFZ3EEZTOZHY5Q", "HWXYFLLSS2IUQ0H4XNCDAZEFZKIU3MZRP5G55TNBDHRPNOQT" ) ); }
protected void Application_Start() { #region mvc AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); #endregion // OAuth clients registration // NOTE: Specify their own client IDs and secret keys OAuthManager.RegisterClient ( new FacebookClient ( "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd" ) { Scope = "public_profile,email" //Parameters = new NameValueCollection { { "display", "popup" } } } ); OAuthManager.RegisterClient ( new TwitterClient ( "1Ayh2ZM2l9chloiFsmxNpi7Gg", "dbVXKWVIlH5fRuVI0FvE2ZDsZAbBg74UrGFYwW1kLSwc0ceJnJ" ) ); OAuthManager.RegisterClient ( new VkontakteClient ( "2419779", "31nnASa9T1eO150VCFgr" ) ); OAuthManager.RegisterClient ( new MailRuClient ( "722701", "d0622d3d9c9efc69e4ca42aa173b938a" ) ); OAuthManager.RegisterClient ( new GoogleClient ( "1058655871432-83b9micke7cll89jfmcno5nftha3e95o.apps.googleusercontent.com", "AeEbEGQqoKgOZb41JUVLvEJL" ) // { Parameters = new NameValueCollection { { "approval_prompt", "force" } } } ); OAuthManager.RegisterClient ( new YandexClient ( "7b0a53d23e384033be3a414739be255f", "3c85e4a1148640b2a490cbd8c75384df" ) ); OAuthManager.RegisterClient ( new OdnoklassnikiClient ( "1094959360", "E45991423E8C5AE249B44E84", "CBACMEECEBABABABA" ) ); OAuthManager.RegisterClient ( new GitHubClient ( "e14122695d88f5c95bce", "cde23ec001c5180e01e865f4efb57cb0bc848c16" ) ); OAuthManager.RegisterClient ( new LiveClient ( "0000000040124265", "6ViSGIbw9N59s5Ndsfz-zaeezlBt62Ep" ) ); OAuthManager.RegisterClient ( new AmazonClient ( "amzn1.application-oa2-client.f0ffe4edc256488dae00dcaf96d75d1b", "764dcefe49b441c8c6244c93e5d5d04de54fda6dfdc83da9693bf346f4dc4515" ) { ReturnUrl = "http://localhost" } ); OAuthManager.RegisterClient ( "foursquare", "LHYZN1KUXN50L141QCQFNNVOYBGUE3G3FCWFZ3EEZTOZHY5Q", "HWXYFLLSS2IUQ0H4XNCDAZEFZKIU3MZRP5G55TNBDHRPNOQT" // parameters: new NameValueCollection { { "display", "webpopup" } } // webpopup ); OAuthManager.RegisterClient ( new TumblrClient ( "2EZbsj2oF8OAouPlDWSVnESetAchImzPLV4q0IcQH7DGKECuzJ", "4WZ3HBDwNuz5ZDZY8qyK1qA5QFHEJY7gkPK6ooYFCN4yw6crKd" ) ); OAuthManager.RegisterClient ( new InstagramClient ( "215a1941ebed4e4fa74e94dd84762836", "ba53a710e1624870bc066e7a9ae38601" ) ); OAuthManager.RegisterClient ( new AssemblaClient ( "bOS4QkXnmr5jhdacwqjQXA", "701ee6dedf74fc4ad75bfa7476666a2f" ) ); }
private void Form1_Load(object sender, EventArgs e) { // OAuth clients registration // NOTE: Specify their own client IDs and secret keys OAuthManager.RegisterClient ( new FacebookClient ( "1435890426686808", "c6057dfae399beee9e8dc46a4182e8fd" ) { Parameters = new NameValueCollection { { "display", "popup" } } } ); /*OAuthManager.RegisterClient * ( * new TwitterClient * ( * "cXzSHLUy57C4gTBgMGRDuqQtr", * "3SSldiSb5H4XeEMOIIF4osPWxOy19jrveDcPHaWtHDQqgDYP9P" * ) * );*/ OAuthManager.RegisterClient ( new VkontakteClient ( "4457505", "wW5lFMVbsw0XwYFgCGG0" ) { Parameters = new NameValueCollection { { "display", "popup" } }, Scope = "status,friends,email" } ); OAuthManager.RegisterClient ( new MailRuClient ( "722701", "d0622d3d9c9efc69e4ca42aa173b938a" ) ); /*OAuthManager.RegisterClient * ( * new GoogleClient * ( * "1058655871432-fscjqht7ou30a75gjkde1eu1brsvbqkn.apps.googleusercontent.com", * "SI5bIZkrSB5rO03YF-CdsCJC" * ) * { * ReturnUrl = "http://localhost/" * } * );*/ OAuthManager.RegisterClient ( new YandexClient ( "0ee5f0bf2cd141a1b194a2b71b0332ce", "59d76f7c09b54ad38e6b15f792da7a9a" ) ); OAuthManager.RegisterClient ( new OdnoklassnikiClient ( "1094959360", "E45991423E8C5AE249B44E84", "CBACMEECEBABABABA" ) { ReturnUrl = "http://localhost" // return url - it's important } ); /*OAuthManager.RegisterClient * ( * new LiveClient * ( * "0000000040124265", * "6ViSGIbw9N59s5Ndsfz-zaeezlBt62Ep" * ) * );*/ /*OAuthManager.RegisterClient * ( * new AmazonClient * ( * "amzn1.application-oa2-client.f0ffe4edc256488dae00dcaf96d75d1b", * "764dcefe49b441c8c6244c93e5d5d04de54fda6dfdc83da9693bf346f4dc4515" * ) * );*/ // add buttons to the form foreach (string providerName in OAuthManager.RegisteredClients.Keys) { var btn = new Button(); btn.Text = providerName; btn.Click += new EventHandler(btn_Click); flowLayoutPanel1.Controls.Add(btn); } }