Is it advisable to make changes in the methods of the Secure class of play framework?
Or is there a way around it?
Is it advisable to make changes in the methods of the Secure class of
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Secure.classno.Security.classyes.To make changes to the Secure.class. No, normally, it should be ok in most cases. But, you will have to extend
Securityclass. There are several methods in this class that have to be overridden to fit your application.EDIT :
After reading all the comments and understanding Joe’s real need, here is part of the solution.
dependencies.ymlfile. (Also runplay dependencies)Securityfor overriding of authenticate method.onAuthenticatemethod to redirect toward the page of yuor choice usingredirect()loginbox.htmlintagsfolder. Code is pasted below.#{loginbox /}That means :
loginbox.html