@tylers It was inspired by that, but the code is my own :). And I haven't got the 'I forgot my password' feature. While I haven't added it, you'll have to ask me for your password, since only I have access to it :). Others of course need your greenfoot account password to access your account on this app, so I think it is quite safe.
A new version of this scenario was uploaded on Sat Jun 30 14:19:53 UTC 2012
Smaller text in the text fields; it was a little to big.
A new version of this scenario was uploaded on Sat Jun 30 14:44:33 UTC 2012
Added cancel buttons
1. Using the UserInfo class, you can get access to data of the user (if he's logged in), including it's picture
2. thanks.
3. Look at Spilli's account, he's got a scenario Matrix Effect.
A new version of this scenario was uploaded on Mon Jul 02 09:16:12 UTC 2012
-Added banning: after entering a wrong password 3 times, you have to wait 1 hour.
-Added hatching of the passwords: way more safe, but it's impossible to unhash the passwords. REMEBER YOUR PASSWORD!
-Added the placeholder in the text fields
-Fixed little bugs in the UI
A new version of this scenario was uploaded on Mon Jul 02 09:49:21 UTC 2012
Bug fixes with the banning showing the wrong minutes left.
I think this is really neat stuff. i am making a library app, like where you log in, and see which book you've loged out, see the catalog etc. I am a total beginner in java, so i was wondering how you made it so that the program connected with the greenfoot server and into the user's account. because in my thing, everyone who uses it has an account
ould you reply on my library page>
Thanx!
@Yoman that's true, but you forgot to tell that the methods take some time to do: it looks like your program stops for a while.
@Yoman take a look at those courses:
http://www.greenfoot.org/collections/321
There is a course about the UserInfo class.
this is the error:
java.lang.NullPointerException
at BeginWorld.textFieldIsDoneWithText(BeginWorld.java:128)
at TextField.addInput(TextField.java:102)
at TextField.act(TextField.java:93)
at greenfoot.core.Simulation.actActor(Simulation.java:565)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
at greenfoot.core.Simulation.runContent(Simulation.java:213)
at greenfoot.core.Simulation.run(Simulation.java:203)
It may be that UserInfo is not available (which may occur even when a user is logged in). Try either saving the user name when you initially check for user login, or use 'isStorageAvailable' before using 'getUserName'.
Notice this little snippet of code:
if (this.name.equals("SPower")) {
Button butt = new Button(ADMIN_BUTTON);
butt.setResponder(this);
addObject(butt, getWidth() /2, getHeight() /2 +100);
}
that gives you the 'Admin Button' if your username is SPower.
And this:
public void banUser()
{
if (this.info != null) {
this.info.setString(BANNING_INDEX, "" + System.currentTimeMillis());
this.info.store();
}
}
Really, I don't think that's bad. Your password is hashed, so I can't access it (you can't un-hash something). And also, banning a user only happens when you enter the wrong password too many times. Ok with all that? And if I wanted to use it to my own advantage, why would I post the source?
I don't quite understand what you mean when you say it's hashed, unless Greenfoot does that automatically when you store data, because it seems like it's just storing the password as a regular string. Regardless, it's not like anyone is storing important data on this scenario (unless they were stupid enough to use their greenfoot account password for this password) and I was just pointing out that it seems you have total control.
I didn't mean to offend you in any way.
Also, are people allowed to use your 'Saver' and 'Scoreboard' classes if they cite credit? Greenfoot seems pretty open with people sharing code for reuse in different context, although you can get a project removed for plagiarism.
Well, hashing is essentially turning a lot of data into a small form, which is almost impossible to crack, because a small change results in a completely different hash (The code for to hash the passwords is in the Coder class). This means that you can only compare the hash of the entered password to the stored one, and check if they are the same: the same data always has the same hash.
And I wasn't really offended :)
And yes, of course you may use the classes! That's why I posted the source! And ScoreBoard is from the greenfoot team, not me.
And if you want to know more about hashing, I saw a good video about it: https://www.youtube.com/watch?v=b4b8ktEV4Bg
Only the owner of the scenario has access to other users UserInfo data. This does not mean that the scenario cannot be programmed to share some or all information of one user with another. My 'Private Messaging' scenario will display the names and profile pics of any user that has used the app; however restricts the sharing of the data stored (the 'score' field, the ten 'int' fields, and the five 'String' fields) to just one String field; and then, only if certain conditions exist (that communication is intended between the two users). I am the only one who can access all communications between the users because I wrote and uploaded the scenario onto the site.
All in all, as far as total control, I would say that, yes, the author (or uploader) of a scenario has total access to all UserInfo data and controls what information is shared between users. The only thing the author cannot do (well, not very easily), is change what information is stored in the UserInfo data of other users. An author can program the scenario to alter the data for a user when they run the scenario while logged onto the site. Even if data is encoded, I cannot see how the key would not be accessible to the author (it would either have to be a programmed constant or it would have to be stored somewhere within the UserInfo data).
2012/6/30
2012/6/30
2012/6/30
2012/6/30
2012/6/30
2012/6/30
2012/6/30
2012/6/30
2012/7/2
2012/7/2
2012/7/2
2012/7/2
2012/7/3
2012/7/4
2012/7/4
2012/7/5
2012/7/5
2012/7/5
2012/7/5
2012/7/6
2012/7/6
2012/7/6
2012/7/7
2012/7/7
2012/7/7
2012/8/7
2012/10/3
2012/10/3
2012/12/22
2012/12/22
2012/12/22
2012/12/22
2012/12/22
2012/12/22
2013/11/11
2013/11/11
2013/11/11
2013/11/11
2013/11/11
2013/11/11
2016/11/25