Search code examples
scalaauthenticationplayframeworkplayframework-2.4

HTTP Basic Authentication for Play framework 2.4


I am looking some way to make some authentication for my play framework app: I want allow/disallow the whole access to non authenticated users

Is there exists some working module/solution for it? I don't need any forms for auth, just 401 HTTP response for non authenticated users (like Apache .htacccess "AuthType Basic" mode).


Solution

  • You can try this filter:

    https://github.com/Kaliber/play-basic-authentication-filter

    It looks pretty simple to use and configure.