Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
So let's say there is a software where user can create username/password and login with that.
Now, I want to let the user change the password only if they can enter the system password. I got this idea from google chrome, where you have to enter the system password to view the saved password.
Is there any way to achieve this?
As everyone has pointed out, this is a bad idea. However, if you understand the risks and you are sure you really want to do this:
Imports System.DirectoryServices.AccountManagement
Dim valid As Boolean = False
Using context As New PrincipalContext(ContextType.Domain)
valid = context.ValidateCredentials(Environment.Username, password)
End Using
This assumes the machine is on a domain. If it is not and you want to validate against the local machine, then change ContextType.Domain to ContextType.Machine.
Also, you will need to add a reference to System.DirectoryServices.AccountManagement.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I tried to implement user authentication part on Webflow project. But if I submit the username and password, the Webflow says, password field cannot be submitted. Any suggestions?
This kind of work well. But how can I submit the login form? Or do I have to use external link for the login form, like app.mywebsite.com ?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm doing my first VB.NET console application. I have some experience making VB.NET "non-console" applications.
My guestion is, how can i make my own commands to my console application. For example if user types to console "Hello World" and then the application would answer back to the user. I dont want it to be like "Press any key to continue..." nothing like that. I just want to make my own commands.
I've already tried to find some help from YouTube or Google but i couldn't find anything that would help even little. So i'm asking from you guys.
I also would like an answer soon as possible.
Console.ReadLine will block execution until the user has pressed the enter key. It then returns the full string of whatever the user typed on that line. You can then write conditional code which acts on whatever that returns. So, for instance:
Dim input As String = Console.ReadLine()
If input = "Hello World" Then
Console.WriteLine("Hello to you too")
End If
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
The image describes itself the objetive:
If someone doesn't understand, I want to create a register box which registers the g+ email into a database with the respective user's data.
It's called OAuth. Usually we use an external provider (such as Google, Facebook, Github, etc.) to identify the user, so you don't have to. The user don't have to give you his password, because you use access tokens to request the user's data from the provider's server:
You can read more and find implementations here.
On the image, you probably see the Google's OAuth2 service.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
In our company was decided to send password in email, on registration and on forgot password. I am asking if there could be some security issues with this?
Short answer is NO. It is not safe.
Furthermore, the server should NOT store the passwords in the DB in plain-text, and the server should not keep then encoded/encrypted in a way that the password can be decoded/decrypted.
The server should handle differently "forgot password" flow. You can read more here (Java project that implements all flows...):
https://github.com/OhadR/authentication-flows/tree/master/authentication-flows#forgot-password-flow
Storing passwords in a human readable format anywhere cannot be considered as safe. But most of the service providers send passwords via email so it is the choice the system administrator needs to make.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I have a question
When an user type a wrong username and/or password and joomla display a message about this error and I would like to clean both fields, how can I do that ?
thank you for you help
Go to your Joomla root folder, from there:
go to: /templates/[your template]/html/mod_login
Backup default.php: cp default.php default.php.org
Edit default.php: vi default.php
And here's the tricky part, the thing you have to changes is different for each template, for example, in atomic template you should look for the line:
So the id of this field in this case is: "modlgn_username". Now you can use jQuery / Javascript and "clean" the value.