aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/scala/xyz/driver/core/rest.scala2
-rw-r--r--src/test/scala/xyz/driver/core/AuthTest.scala4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/scala/xyz/driver/core/rest.scala b/src/main/scala/xyz/driver/core/rest.scala
index 42ffac4..d3a06d2 100644
--- a/src/main/scala/xyz/driver/core/rest.scala
+++ b/src/main/scala/xyz/driver/core/rest.scala
@@ -141,7 +141,7 @@ package rest {
* Specific implementation can verify session expiration and single sign out
* to verify if session is still valid
*/
- def isSessionValid(user: U)(implicit ctx: ServiceRequestContext): Future[Boolean] = Future.successful(true)
+ def isSessionValid(user: U)(implicit ctx: ServiceRequestContext): Future[Boolean]
/**
* Verifies if request is authenticated and authorized to have `permissions`
diff --git a/src/test/scala/xyz/driver/core/AuthTest.scala b/src/test/scala/xyz/driver/core/AuthTest.scala
index 76c2933..d1a37a2 100644
--- a/src/test/scala/xyz/driver/core/AuthTest.scala
+++ b/src/test/scala/xyz/driver/core/AuthTest.scala
@@ -31,6 +31,10 @@ class AuthTest extends FlatSpec with Matchers with MockitoSugar with ScalatestRo
}
val authStatusService = new AuthProvider[User](authorization, NoLogger) {
+
+ override def isSessionValid(user: User)(implicit ctx: ServiceRequestContext): Future[Boolean] =
+ Future.successful(true)
+
override def authenticatedUser(implicit ctx: ServiceRequestContext): OptionT[Future, User] =
OptionT.optionT[Future] {
if (ctx.contextHeaders.keySet.contains(AuthProvider.AuthenticationTokenHeader)) {