A simple Play Framework filter that provides basic authentication
resolvers += resolvers += "Rhinofly Internal Repository" at "http://maven-repository.rhinofly.net:8081/artifactory/libs-release-local"
libraryDependencies += "nl.rhinofly" %% "play-basic-authentication-filter" % "0.1"Global.scala
import nl.rhinofly.basicAuthentication.BasicAuthenticationFilter
object Global extends WithFilters(BasicAuthenticationFilter()) with GlobalSettings
The filter can be configured in different ways.
enabled
If set to false, the filter does not do anything.
// default: true
basicAuthentication.enabled=falserealm
This is the realm to which the security applies. Most browsers display it in the dialog.
// default: Application
basicAuthentication.realm="My Special Realm"username and password
These are the credentials that are checked. If you do not specify them, the realm
is set to a value indicating that and it defaults to a random universal unique
identifier for both username and password.
// default: random uuid
basicAuthentication.username=username
basicAuthentication.password=passwordMake sure you have the correct credentials present (in ~/.sbt/0.13/credentials.sbt)
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials") Then in the sbt console type release