当前位置: 首页>>代码示例>>C#>>正文


C# IAppBuilder.UseSignInCookies方法代码示例

本文整理汇总了C#中IAppBuilder.UseSignInCookies方法的典型用法代码示例。如果您正苦于以下问题:C# IAppBuilder.UseSignInCookies方法的具体用法?C# IAppBuilder.UseSignInCookies怎么用?C# IAppBuilder.UseSignInCookies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAppBuilder的用法示例。


在下文中一共展示了IAppBuilder.UseSignInCookies方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConfigureAuth

        // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
        public void ConfigureAuth(IAppBuilder app)
        {
            // Enable the application to use a cookie to store information for the signed in user
            // and to use a cookie to temporarily store information about a user logging in with a third party login provider
            app.UseSignInCookies();

            // Enable the application to use a cookie to store information for the signed in user
            app.UseApplicationSignInCookie();

            // Enable the application to use a cookie to temporarily store information about a user logging in with a third party login provider
            app.UseExternalSignInCookie();

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            app.UseFacebookAuthentication(
             appId: "",
            appSecret: "");

            app.UseGoogleAuthentication();
        }
开发者ID:rsrahul,项目名称:newmvc,代码行数:28,代码来源:Startup.Auth.cs

示例2: ConfigureAuth

        // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
        public void ConfigureAuth(IAppBuilder app)
        {
            // Enable the application to use a cookie to store information for the signed in user
            // and to use a cookie to temporarily store information about a user logging in with a third party login provider
            app.UseSignInCookies();

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            //app.UseFacebookAuthentication(
            //   appId: "",
            //   appSecret: "");

            //app.UseGoogleAuthentication();

            var settings = ConfigurationManager.AppSettings;

            app.UseGitHubAuthentication(
                settings["oauth.gitHub.clientId"],
                settings["oauth.gitHub.clientSecret"]);

            app.UseStackExchangeAuthentication(
                settings["oauth.stackExchange.clientId"],
                settings["oauth.stackExchange.clientSecret"],
                settings["oauth.stackExchange.key"],
                settings["oauth.stackExchange.site"]);
        }
开发者ID:kazimanzurrashid,项目名称:Community.Owin.Security,代码行数:34,代码来源:Startup.Auth.cs

示例3: ConfigureAuth

        // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
        public void ConfigureAuth(IAppBuilder app)
        {
            
            // Enable the application to use a cookie to store information for the signed in user
            // and to use a cookie to temporarily store information about a user logging in with a third party login provider

            //var options = new Microsoft.Owin.Security.Cookies.CookieAuthenticationOptions() { LoginPath = "~/#/login" };
            //Microsoft.Owin.Security.Cookies.
            var o = new Microsoft.AspNet.Identity.Owin.IdentityAuthenticationOptions();
            o.LoginPath = "/#/login";
         
            app.UseSignInCookies(o);

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            //app.UseFacebookAuthentication(
            //   appId: "",
            //   appSecret: "");

            app.UseGoogleAuthentication();
        }
开发者ID:robkobobko,项目名称:TicketDesk,代码行数:29,代码来源:Startup.Auth.cs

示例4: ConfigureAuthentication

        public static void ConfigureAuthentication(IAppBuilder app)
        {
            app.UseSignInCookies();

            var settings = ConfigurationManager.AppSettings;

            app.UseGitHubAuthentication(
                settings["oAuth.github.clientId"],
                settings["oAuth.github.clientSecret"]);

            app.UseTwitterAuthentication(
                settings["oAuth.twitter.consumerKey"],
                settings["oAuth.twitter.consumerSecret"]);

            app.UseFacebookAuthentication(
                settings["oAuth.facebook.appId"],
                settings["oAuth.facebook.appSecret"]);

            app.UseGoogleAuthentication();
        }
开发者ID:kazimanzurrashid,项目名称:textuml-dotnet,代码行数:20,代码来源:Startup.Authtication.cs

示例5: ConfigureAuth

        // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
        public void ConfigureAuth(IAppBuilder app)
        {
            // Enable the application to use a cookie to store information for the signed in user
            // and to use a cookie to temporarily store information about a user logging in with a third party login provider
            app.UseSignInCookies();

            // Uncomment the following lines to enable logging in with third party login providers
            app.UseMicrosoftAccountAuthentication(
                clientId: "0000000040105C6D",
                clientSecret: "oWTp0B9uZsmz2JXeLBgzLeCkmgCGuhqq");

            app.UseTwitterAuthentication(
               consumerKey: "ufILPAEGVqBMzTDjjk2WUA",
               consumerSecret: "FynEIIZ2Yyk8WBTP11gd9Vh4dogxoF9JSwmDr65bsEw" );

            app.UseFacebookAuthentication(
               appId: "578923398838715",
               appSecret: "ea9e0826873f376dc242f0d187d4461b");

            app.UseGoogleAuthentication();
        }
开发者ID:R4CLucky14,项目名称:FreakyFastFood,代码行数:22,代码来源:Startup.Auth.cs

示例6: ConfigureAuth

        // Weitere Informationen zum Konfigurieren der Authentifizierung finden Sie unter "http://go.microsoft.com/fwlink/?LinkId=301864".
        public void ConfigureAuth(IAppBuilder app)
        {
            // Anwendung für die Verwendung eines Cookies zum Speichern von Informationen für den angemeldeten Benutzer aktivieren
            // und ein Cookie zum vorübergehenden Speichern von Informationen zu einem Benutzer zu verwenden, der sich mit dem Anmeldeanbieter eines Drittanbieters anmeldet.
            app.UseSignInCookies();

            // Auskommentierung der folgenden Zeilen aufheben, um die Anmeldung mit Anmeldeanbietern von Drittanbietern zu ermöglichen
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            //app.UseFacebookAuthentication(
            //   appId: "",
            //   appSecret: "");

            //app.UseGoogleAuthentication();
        }
开发者ID:Banasen,项目名称:InvScan2,代码行数:22,代码来源:Startup.Auth.cs

示例7: ConfigureAuth

        // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301883
        public void ConfigureAuth(IAppBuilder app)
        {
            // Enable the application to use a cookie to store information for the signed in user
            // and also store information about a user logging in with a third party login provider.
            // This is required if your application allows users to login
            app.UseSignInCookies();

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            app.UseFacebookAuthentication(
               appId: "518499618229750",
               appSecret: "e3ad316eb2106ab00b02b8e238442545");

            app.UseGoogleAuthentication();
        }
开发者ID:hristo11111,项目名称:TelerikAcademy-HristoBratanov,代码行数:23,代码来源:Startup.Auth.cs

示例8: ConfigureAuth

        // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301883
        public void ConfigureAuth(IAppBuilder app)
        {
            // Enable the application to use a cookie to store information for the signed in user
            // and also store information about a user logging in with a third party login provider.
            // This is required if your application allows users to login
            app.UseSignInCookies();

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            app.UseFacebookAuthentication(
               appId: "196883313822996",
               appSecret: "c91262c81b907e99cf297ed8ce80ac58");

            //app.UseGoogleAuthentication();
        }
开发者ID:nnaidenov,项目名称:GoldstoneForum,代码行数:23,代码来源:Startup.Auth.cs


注:本文中的IAppBuilder.UseSignInCookies方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。