From b97bc7242d1686a303f6366755652b6bf93e3851 Mon Sep 17 00:00:00 2001 From: vlad Date: Fri, 24 Mar 2017 22:14:47 -0700 Subject: PDW-238 Session validity verification support for `AuthProvider` --- src/main/scala/xyz/driver/core/rest.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/scala/xyz') diff --git a/src/main/scala/xyz/driver/core/rest.scala b/src/main/scala/xyz/driver/core/rest.scala index dd43989..42ffac4 100644 --- a/src/main/scala/xyz/driver/core/rest.scala +++ b/src/main/scala/xyz/driver/core/rest.scala @@ -132,16 +132,16 @@ package rest { * Specific implementation on how to extract user from request context, * can either need to do a network call to auth server or extract everything from self-contained token * - * @param context set of request values which can be relevant to authenticate user + * @param ctx set of request values which can be relevant to authenticate user * @return authenticated user */ - def authenticatedUser(context: ServiceRequestContext): OptionT[Future, U] + def authenticatedUser(implicit ctx: ServiceRequestContext): OptionT[Future, U] /** * Specific implementation can verify session expiration and single sign out * to verify if session is still valid */ - def isSessionValid(user: U)(context: ServiceRequestContext): Future[Boolean] = Future.successful(true) + def isSessionValid(user: U)(implicit ctx: ServiceRequestContext): Future[Boolean] = Future.successful(true) /** * Verifies if request is authenticated and authorized to have `permissions` -- cgit v1.2.3