Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update to Scala 2.9.2 and upgrade other dependent libraries.

  • Loading branch information...
commit 71adf1b696dafee53dc9c0669024b6538b33b749 1 parent 48e4c5e
@sroebuck authored
View
16 build.sbt
@@ -4,13 +4,19 @@ name := "scalatra-userauth"
version := "0.1.3-SNAPSHOT"
+// set the Scala version used for the project
+scalaVersion := "2.9.2"
+
scalacOptions ++= Seq("-deprecation", "-unchecked", "-Xcheckinit", "-Xmigration", "-encoding", "UTF-8")
-libraryDependencies ++= Seq(
- "javax.servlet" % "javax.servlet-api" % "3.0.1" % "provided",
- "com.weiglewilczek.slf4s" %% "slf4s" % "1.0.7",
- "org.scalatra" %% "scalatra" % "2.0.3"
-)
+libraryDependencies ++= {
+ val sv = "2.9.1"
+ Seq(
+ "javax.servlet" % "javax.servlet-api" % "3.0.1" % "provided",
+ "com.weiglewilczek.slf4s" % ("slf4s" + "_" + sv) % "1.0.7",
+ "org.scalatra" % ("scalatra" + "_" + sv) % "2.0.4"
+ )
+}
// ls-sbt configuration
View
4 src/main/scala/com/proinnovate/scalatra/userauth/RememberMeStrategy.scala
@@ -23,7 +23,7 @@ import java.security.SecureRandom
class RememberMeStrategy[U] extends UserAuthStrategy[U] with Logging {
- logger.info("Scalatra-UserAuth RememberMe Strategy Initialised")
+ logger.debug("Scalatra-UserAuth RememberMe Strategy Initialised")
/**
* The cookie token name used to store the users remember me token as a cookie.
@@ -102,7 +102,7 @@ class RememberMeStrategy[U] extends UserAuthStrategy[U] with Logging {
val token = generateToken("x")
val cookie = Cookie(COOKIE_KEY, token)(CookieOptions(secure = cookieIsSecure, maxAge = cookieLifeInSeconds, httpOnly = true))
val cookieString = cookie.toCookieString
- logger.info("cookieString = " + cookieString)
+ logger.debug("cookieString = " + cookieString)
app.response.addHeader("Set-Cookie", cookieString)
app match {
case r: RememberMeSupport[U] with UserAuthSupport[U] =>
View
1  src/main/scala/com/proinnovate/scalatra/userauth/UserAuthSupport.scala
@@ -50,6 +50,7 @@ trait UserAuthSupport[U] extends ScalatraKernel with Initializable with Logging
def userOption: Option[U] = if (request != null && session != null) userOptionFromSession(session) else None
+
def userLogin(username: String, password: String): Either[String, U]
/**
Please sign in to comment.
Something went wrong with that request. Please try again.