Tag Archives: authentication

How to connect Azure database through Java and with “AD- Universal with MFA support” authentication

Questions: I have to connect to Azure DB with Authentication “AD- Universal with MFA support” using JDBC. I got my connection string from azure portal but getting below error:com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ‘*******’ Java code found is for “AD- Integrated” and “AD- Password” authentication only. Did a lot of research but no technical Java… Read More »

Unable to handle proxy authentication in headless chrome

Questions: I have been trying to handle the proxy authentication in chrome. After 2-3 days I found a solution enter link description here which is the best till now using an extension, but it doesn’t work well for headless chrome and throws the Error —-> Exception in thread “Thread-0” org.openqa.selenium.WebDriverException: unknown error: failed to wait… Read More »

Custom Authentication & Update Claims in ASP.NET CORE

Questions: I am developing web site with ASP.NET CORE that uses Claims for User Authentication and User Id and other infos keeps in Claims, is it security ? ClaimsIdentity identity = new ClaimsIdentity( new[] { new Claim(ClaimTypes.Name, userInfo.Name), new Claim(ClaimTypes.Surname, userInfo.Surname), new Claim(“Image”, userInfo.Image), new Claim(ClaimTypes.NameIdentifier,result.Id.ToString()), new Claim(ClaimTypes.IsPersistent, loginViewModel.RememberMe.ToString()) }, CookieName.User); HttpContext.SignOutAsync(CookieName.User).Wait(); HttpContext.SignInAsync(CookieName.User, new ClaimsPrincipal(identity),… Read More »

Difference between time passed to HttpContext.SignInAsync and CookieAuthenticationOptions.ExpireTimeSpan

Questions: What is the difference between date passed to Microsoft.AspNetCore.Authentication.AuthenticationProperties.ExpiresUtc in HttpContext.SignInAsync and Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions.ExpireTimeSpan? Docs for both says that it controls time at which the authentication ticket expires. So which one I should use to discard login after some time? Answers:

Gmail Error :The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required

Questions: I am using following code to send email. The Code works correctly in my local Machine. But on Production server i am getting the error message var fromAddress = new MailAddress(“mymailid@gmail.com”); var fromPassword = “xxxxxx”; var toAddress = new MailAddress(“yourmailid@yourdoamain.com”); string subject = “subject”; string body = “body”; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient {… Read More »