form-authentication

ASP.NET how to access User.Identity.IsAuthenticated in Aplication Request module?

风流意气都作罢 提交于 2019-12-11 01:51:31
问题 I am using Form Authentication Method in ASP.Net and the problem is it only protect " .aspx" files. I am trying to protect " .php" files in "kcfinder" folder from unauthenticated users. I implemeted this class in "App_Code" folder. public class KCChecker { public static void Process(HttpApplication Application) { HttpRequest Request = Application.Context.Request; HttpResponse Response = Application.Context.Response; string url = Request.Path.ToLower(); if (url.IndexOf("/kcfinder/") == 0 &&

Form authentication slidingExpiration does not work

为君一笑 提交于 2019-12-10 15:32:01
问题 I have below code int intTimeout = (FormsAuthentication.Timeout.Hours * 60) + FormsAuthentication.Timeout.Minutes; var authTicket = new FormsAuthenticationTicket(1, Utility.userCookie, DateTime.Now, DateTime.Now.AddMinutes(intTimeout), true, cookieValue); string strEncryptedTicket = HttpUtility.UrlEncode(FormsAuthentication.Encrypt(authTicket)); var authCookie = new HttpCookie(Utility.userCookie, strEncryptedTicket); authCookie.Expires = authTicket.Expiration; //FormsAuthentication

Window 8 consuming SharePoint REST Interface through FormsAuthentication?

谁说我不能喝 提交于 2019-12-10 11:01:32
问题 I have created a sample Windows 8 Application getting SharePoint 2010 list data using REST Apis like _vti_bin/ListData.svc I am using NetworkCredential to access the list its working fine. How can I achieve the same results using FormsAuthentication? Code for NetworkCredential: context = new CentralAdministrationDataContext(new Uri("http://<SharePoint_URL>/_vti_bin/ListData.svc")); NetworkCredential credentials = new NetworkCredential(); context.UseDefaultCredentials = false; context

Accessing user details after logging in with Java EE Form authentication

孤街浪徒 提交于 2019-12-10 10:12:40
问题 I have implemented a Java EE security realm that redirects users to login.jsp if they try and access a protected resource. Say a user wants to go to a protected url - http://mywebapp/shopping_cart which is mapped to ShoppingCartServlet As they are not logged in Glassfish directs them to login.jsp They then enter their username and password and click Login and the information gets POSTed to http://mywebapp/j_security_check If they have entered the correct details they are then redirected to

Window 8 consuming SharePoint REST Interface through FormsAuthentication?

两盒软妹~` 提交于 2019-12-06 11:19:43
I have created a sample Windows 8 Application getting SharePoint 2010 list data using REST Apis like _vti_bin/ListData.svc I am using NetworkCredential to access the list its working fine. How can I achieve the same results using FormsAuthentication? Code for NetworkCredential: context = new CentralAdministrationDataContext(new Uri("http://<SharePoint_URL>/_vti_bin/ListData.svc")); NetworkCredential credentials = new NetworkCredential(); context.UseDefaultCredentials = false; context.Credentials = new NetworkCredential("UserName", "Password"); 来源: https://stackoverflow.com/questions/14645268

ASP.NET 4.0 Single sign on betwen parent website and child web-application fails

柔情痞子 提交于 2019-12-06 10:17:29
问题 I've got the following structure www.website.com --> ASP.NET 4.0 Web-site www.website.com/blog --> NET 4.0, Web-Application Both do form-authentication against the same SQL database and use the framework ASP.NET memberships and roles. I can log into each portion just fine (same user/password) but the authentication doesn't carry over i.e. if I log into / and then click a link to /blog/ , /blog/ thinks I'm Anonymous and prompts for login again. I've done the basics i.e. Identical

Authentication approach to be use in asp.net Web api and angular js

痞子三分冷 提交于 2019-12-06 04:11:51
问题 I am creating 1 website using Web api and angular js and i am so much confused about Authentication to be used in my web site. I have created one login.js in which there would be my Login method which will post my Username/Emailid and password to my Web Api and the method in web api will authenticate that user. Code: $scope.Login() { $.post("api/Authentication/Login",Username,Password) { } } Web api code: [Route] Public Task<object> Login([FromBody] username,password) { //method to

Accessing user details after logging in with Java EE Form authentication

ぐ巨炮叔叔 提交于 2019-12-05 18:48:55
I have implemented a Java EE security realm that redirects users to login.jsp if they try and access a protected resource. Say a user wants to go to a protected url - http://mywebapp/shopping_cart which is mapped to ShoppingCartServlet As they are not logged in Glassfish directs them to login.jsp They then enter their username and password and click Login and the information gets POSTed to http://mywebapp/j_security_check If they have entered the correct details they are then redirected to the servlet that handles the url http://mywebapp/shopping_cart Now I want to pull the user's details from

Spring security, either http basic or form login authentication

喜你入骨 提交于 2019-12-05 02:31:00
问题 I have a web app developed using spring mvc and spring security 3.2. I want my app using http basic authentication for restful service and form login authentication for other part. Below is my security configuration: <http pattern="/services/**" create-session="stateless" use-expressions="true"> <intercept-url pattern="/**" access="hasRole('ROLE_REMOTE,ROLE_USER')"/> <http-basic /> </http> <http auto-config="true" use-expressions="true"> <intercept-url pattern="/static/**" access="permitAll"

ASP.NET 4.0 Single sign on betwen parent website and child web-application fails

Deadly 提交于 2019-12-04 15:08:01
I've got the following structure www.website.com --> ASP.NET 4.0 Web-site www.website.com/blog --> NET 4.0, Web-Application Both do form-authentication against the same SQL database and use the framework ASP.NET memberships and roles. I can log into each portion just fine (same user/password) but the authentication doesn't carry over i.e. if I log into / and then click a link to /blog/ , /blog/ thinks I'm Anonymous and prompts for login again. I've done the basics i.e. Identical <authentication mode="Forms"> in both the site as well as app web.configs Identical <machineKey> section (yes,