joscha / play-authenticate

An authentication plugin for Play Framework 2.x (Java)
http://joscha.github.com/play-authenticate/
Other
807 stars 366 forks source link

Changes: upgrade to bootstrap3, fix of some runtime errors #200

Closed joslash closed 10 years ago

joslash commented 10 years ago

Hi there! It is a great job what you have done in 'play-authenticate'!

I'm a newbie in Play, and of course in 'Play-Authenticate'. Right now, I'm developing a new system, and I decided to do it with Play secured with play-authenticate.

This module breaks in some places at soon as I tested. So, I decided to fix those bugs, and send them to you. Also, I decided to upgrade it to bootstrap3.

About the last point, (bootstrap3), I replace all @main for @main3, and it seems to invalidate css styles that blocks bootstrap3. This sends a message to log, but it does not break the system.

I hope, all these code may be useful to you for enrich Play-Authenticate!

Regards!

joscha commented 10 years ago

Thank you. Could you explain a little more why you needed to change the findByToken method and the User.java? Also, the main3 is part of 2.3.0 now and supercedes main? I am not sure I understand this change completely, could you give me a hint? And lastly: could you have a look at the Travis build? It seems as if some of the changes introduced a template error...

joslash commented 10 years ago

Hi there!

Could you explain a little more why you needed to change the findByToken method and the User.java? For some reason, when I tried to run your app, User class sends an error about it's eBean interaction with. I do not remember the exact error, but it seems to something I read some days ago about the getters/setters in Play and eBean. So, I added those methods and everything works just fine.

the main3 is part of 2.3.0 now and supercedes main? The main3 was just a test I did. I made a copy of main.scala.html and rename it to main3.scala.html. After that, I replaced every word @main in the code to @main3. I did it to understand better how Play works. As I told you, I'm a newbie in Play. (Perhaps I forgot to push main3.scala.html?)

When I did this change, the navbar of Bootstrap3 took its position at the top of the page, as it should be. Suddenly, I realized that Play uses some styles that move the navbar off its right position. I did not found how to fix this issue, so I decided left the @main3 replacement.

As I keep working with play-authenticate module, I realized that it should be a main.css or something like that, because the log showed a message about main3.css not found. But, I did not found such file.

So decide to push the proyect like that.

Why I did all this stuff? Well, I decided to give it a chance to Play! It seems really a pretty good framework to develop! So, I'm building the initial milestone with bootstrap3 and security. I almos done! After that, will come days of excitement Java programming... and little scala (in views!)

could you have a look at the Travis build? I'm on that!

Regards!

On Sun, Jul 27, 2014 at 5:18 AM, Joscha Feth notifications@github.com wrote:

Thank you. Could you explain a little more why you needed to change the findByToken method and the User.java? Also, the main3 is part of 2.3.0 now and supercedes main? I am not sure I understand this change completely, could you give me a hint? And lastly: could you have a look at the Travis build? It seems as if some of the changes introduced a template error...

— Reply to this email directly or view it on GitHub https://github.com/joscha/play-authenticate/pull/200#issuecomment-50260828 .

Saludos y Bendiciones!

Omar Otoniel Líder de Proyectos https://twitter.com/financieroUM

joslash commented 10 years ago

Hi! I fixed all what was not working! Travis says it' ok! =)

joscha commented 10 years ago

@joslash awesome, looks good!! Do you think you can just overwrite the main file with your main3? I think for the sample it would be okay if we migrate to bootstrap 3 completely - I'd love to merge your change after that!

Enalmada commented 10 years ago

"main" is the community convention so keeping it "main" but updating everything to current bootstrap would be the way to go for sure.

I am running play-authenticate on play 2.3 java with ebean without the need to change User.java or TokenAction.java. My code appears same as sample so it would be a good idea to try rolling those back and post your error.

joscha commented 10 years ago

@Enalmada Agreed with the changes on TokenAction.java and User.java - let's wait with those changes until someone else reports this or we can pinpoint the problem - @joslash would you mind reverting 05b901b and fdc1c6e for now, then renaming main3 to main and then squashing your changes before we merge them?

joscha commented 10 years ago

@Enalmada I reopened, because I think we can fix this in here and I don't want to lose @joslash on the way :)

joslash commented 10 years ago

Done!!

joscha commented 10 years ago

@joslash I just checked this locally and it does not seem to work. Not only are there leftovers from the "old" bootstrap still in the main file and public directory, but also there are still references to main3.css which does not exist (any more?).

joscha commented 10 years ago

I continued the update here: #204 - currently only the forms are missing, then we would be bootstrap 3 complete...closing this for now, if you make more changes for this, please branch from joslash-master and open your pull request agains that branch...