Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a password validator #12

Merged
merged 3 commits into from
May 8, 2021
Merged

Add a password validator #12

merged 3 commits into from
May 8, 2021

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Apr 26, 2021

A validator that I have used in Sparta. I hope that it can be useful for more people. Was unsure if this should go in regular fyne or not, but decided on placing it here due to the new import.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty cool addition, but I found the single number parameter to be confusing. I read the docs and understand how it works - but I wondered if perhaps some constants could help to illustrate basic/high/extreme entropy levels for those who don’t want to read abs decide on a number for their code?

@Jacalz
Copy link
Member Author

Jacalz commented Apr 26, 2021

I had a similar idea initially as well but decided against doing so because I was afraid that it would cause more confusion. I feel like most people, being unsure, would take the lowest option (lower than what they should have maybe) and the max numbers would give a false sense of security. That was why I decided to just stick the link in there instead.

@stuartmscott
Copy link
Member

The devs who use this will need to read the docs to figure out the right number for their app, I don't think Fyne should create "security buckets" as the landscape continuously changes and they will soon be out-of-date/unsafe.

I can see this being useful to some devs, although I think Fyne-X might be a better place so that people who don't need this can avoid the extra dependency.

@Jacalz
Copy link
Member Author

Jacalz commented Apr 26, 2021

I can see this being useful to some devs, although I think Fyne-X might be a better place so that people who don't need this can avoid the extra dependency.

This PR is already in fyne-x ;)

@fpabl0
Copy link
Member

fpabl0 commented Apr 26, 2021

This is a great addition :). However I think folders should be independent modules (like I mentioned in #9), in that way users that only need extension widgets don't have to depend on dependencies used in data/validation for example.

@stuartmscott
Copy link
Member

This PR is already in fyne-x ;)

Oops, not enough coffee :)

@Jacalz
Copy link
Member Author

Jacalz commented Apr 28, 2021

This is a great addition :). However I think folders should be independent modules (like I mentioned in #9), in that way users that only need extension widgets don't have to depend on dependencies used in data/validation for example.

Have we gotten an agreement on that? I personally think it is a great idea, but would like to hear what other people think about it before take that route.

@fpabl0
Copy link
Member

fpabl0 commented Apr 28, 2021

Have we gotten an agreement on that?

Not yet. That is something that need to be discussed maybe in a new issue? 🤔

@Jacalz
Copy link
Member Author

Jacalz commented Apr 28, 2021

We could perhaps discuss it on the call later this week?

@fpabl0
Copy link
Member

fpabl0 commented Apr 28, 2021

We could perhaps discuss it on the call later this week?

Sounds like a good idea :)

@andydotxyz
Copy link
Member

We could perhaps discuss it on the call later this week?

Cool, if you would like it discussed please add to the agenda. Recently we've been spending around 2/3 of the time on non-agenda items so I want to get it tidied up.

@fpabl0
Copy link
Member

fpabl0 commented Apr 29, 2021

Cool, if you would like it discussed please add to the agenda.

Added.

@andydotxyz
Copy link
Member

Should now we structure fyne-x modules be holding up this contribution?


import (
"fyne.io/fyne/v2"
gpv "github.com/wagslane/go-password-validator"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is missing a newline between the import groups.
Maybe we have not got the full suite of checks running on this repo yet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is a few versions behind, but still fully functional. My editor formats stuff on save as well, it did not catch it and running goimports locally also does not correct it. I think it might be the explicit import name that makes it wonky. Either way, fixed now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not fixed now, sorry. As we are in an external project (fyne-x) the fyne.io imports come before github.com due to alphabetical ordering of external imports

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Thinking about this again, there probably should not be a newline between them, as we are not in the same repository.

@Jacalz
Copy link
Member Author

Jacalz commented May 1, 2021

I don't think so. Isn't it smoother to re-shuffle everything at the same time?

@Jacalz Jacalz merged commit b7e1bc5 into fyne-io:master May 8, 2021
@Jacalz Jacalz deleted the passw-validator branch May 8, 2021 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants