From f2d98d0d3f473c2a3ae51b11ce0386114bf87a0d Mon Sep 17 00:00:00 2001 From: vlad Date: Fri, 24 Mar 2017 22:27:32 -0700 Subject: PDW-238 Session validity verification support for `AuthProvider` --- src/test/scala/xyz/driver/core/AuthTest.scala | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/test/scala/xyz') diff --git a/src/test/scala/xyz/driver/core/AuthTest.scala b/src/test/scala/xyz/driver/core/AuthTest.scala index e6025fb..76c2933 100644 --- a/src/test/scala/xyz/driver/core/AuthTest.scala +++ b/src/test/scala/xyz/driver/core/AuthTest.scala @@ -31,13 +31,14 @@ class AuthTest extends FlatSpec with Matchers with MockitoSugar with ScalatestRo } val authStatusService = new AuthProvider[User](authorization, NoLogger) { - override def authenticatedUser(implicit ctx: ServiceRequestContext): OptionT[Future, User] = OptionT.optionT[Future] { - if (ctx.contextHeaders.keySet.contains(AuthProvider.AuthenticationTokenHeader)) { - Future.successful(Some(BasicUser(Id[User]("1"), Set(TestRole)))) - } else { - Future.successful(Option.empty[User]) + override def authenticatedUser(implicit ctx: ServiceRequestContext): OptionT[Future, User] = + OptionT.optionT[Future] { + if (ctx.contextHeaders.keySet.contains(AuthProvider.AuthenticationTokenHeader)) { + Future.successful(Some(BasicUser(Id[User]("1"), Set(TestRole)))) + } else { + Future.successful(Option.empty[User]) + } } - } } import authStatusService._ -- cgit v1.2.3