Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6121979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:50:45+00:00 2026-05-23T15:50:45+00:00

Is it advisable to make changes in the methods of the Secure class of

  • 0

Is it advisable to make changes in the methods of the Secure class of play framework?
Or is there a way around it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:50:45+00:00Added an answer on May 23, 2026 at 3:50 pm

    Secure.class no. Security.class yes.

    To make changes to the Secure.class. No, normally, it should be ok in most cases. But, you will have to extend Security class. There are several methods in this class that have to be overridden to fit your application.

    static boolean authenticate(String username, String password);
    static boolean check(String profile);
    static String connected();
    static void onAuthenticated();
    static void onDisconnect();
    static void onDisconnected();
    

    EDIT :
    After reading all the comments and understanding Joe’s real need, here is part of the solution.

    1. Create a normal login page. You can do this by adding the secure dependency in your dependencies.yml file. (Also run play dependencies)
    2. Extends Security for overriding of authenticate method.
    3. Also override onAuthenticate method to redirect toward the page of yuor choice using redirect()
    4. Create a new tag loginbox.html in tags folder. Code is pasted below.
    5. Use loginbox tag in your homepage : #{loginbox /}

    That means :

    • You will have a login box on homepage.
    • When users login authenticate, they will be redirected to the page of your choice.
    • When users login fails, they will be redirected toward the login page and will see errors there.

    loginbox.html

    #{form @authenticate()}
        <label>Login</label>
        <input type="text" name="username" maxlength="80"/>
    
        <label>Password</label>
        <input type="password" name="password" maxlength="80"/>
    
        <input type="submit" class="rounded" value="Se connecter" />
    #{/form}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it advisable to play with the controls to make my form look like
I have a BSjax class that I wrote that lets me make async calls
I've read that making a class sealed in C# is advisable in high-performance scenarios
Since there's no way to reliably check if a file is in use before
It is advisable to use tables in HTML pages (now that we have CSS)?
Is it advisable to use arrays in Javascript using tens of thousands of indexes?
Why is it not advisable to use JavaScript in JSP? One rationale that I
Using local variables seems advisable in a partial that could be used application-wide to
Is it advisable to implement url routing for an asp.net(webforms) website which is one
Is it possible (or even advisable) to cast the element retrieved from a for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.