Yup, should roll :)
How about sharing in a blog or docs about how to go about building such?

I think that'd be very interesting to people who're faced similar questions
as you were just a few days ago :)

-- 
Konrad `ktoso` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 2 January 2017 at 22:10:00, Alan Burlison (alan.burli...@gmail.com)
wrote:

On 02/01/17 12:50, 'Johannes Rudolph' via Akka User List wrote:

> Yes, right, I forgot that `flatMap` is only defined for Directive1. So,
it
> needs to be
>
> headerValueByName("X-Auth-Key").tflatMap { case (user, pass) =>
>
> instead.

def xAuth: Directive1[Session] =
(headerValueByName("X-Auth-User") &
headerValueByName("X-Auth-Key")).tflatMap { up =>
onComplete(authenticateUserPass(up._1, up._2)).flatMap {
case Success(s) => provide(s)
case Failure(ex) => reject()
}
}

seems to be what is required.

-- 
Alan Burlison
-- 

-- 
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to