package ru.yandex.atom.service

import spray.routing.RequestContext
import scala.concurrent.Future
import spray.routing.authentication.Authentication
import ru.yandex.atom.data.ReqID
import spray.http.RemoteAddress

/**
 * @author avhaliullin
 */
trait AuthenticatorComponent {
  def authenticator: Authenticator

  trait Authenticator {
    def auth(id: ReqID, ip: RemoteAddress, req: RequestContext): Future[Authentication[Long]]
  }

}
