All Downloads are FREE. Search and download functionalities are using the official Maven repository.

im.actor.server.ImplicitAuthService.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package im.actor.server

import akka.actor.ActorSystem
import akka.stream.Materializer
import im.actor.server.api.rpc.service.auth.AuthServiceImpl
import im.actor.server.oauth.{ GoogleProvider, OAuth2GoogleConfig }
import im.actor.server.session.SessionRegion
import slick.driver.PostgresDriver.api._

trait ImplicitAuthService {
  protected implicit val system: ActorSystem
  protected implicit val materializer: Materializer
  protected implicit val db: Database
  protected implicit val sessionRegion: SessionRegion

  private val oauthGoogleConfig = OAuth2GoogleConfig.load(system.settings.config.getConfig("services.google.oauth"))
  private implicit lazy val oauth2Service = new GoogleProvider(oauthGoogleConfig)

  implicit lazy val authService = new AuthServiceImpl(new DummyCodeActivation)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy