[4.0.0] Impossible to instanciate OpenIDProvider


I try to instancite a custom OpenIDProvider but when i try it i get this error message :


Someone can explain me ?


could you please provide a bit more code?

Best regards,


class AsfaliaProvider(val settings: OpenIDSettings, openIDService: OpenIDService) extends OpenIDProvider/* with OpenIDComponents*/ {
	val PROVIDER_ID = "Asfalia"

	override protected val service: OpenIDService = openIDService
		//new PlayOpenIDService(new WsOpenIdClient(WS.client, new WsDiscovery(WS.client)), settings)

	override type Self = AsfaliaProvider
	override protected val httpLayer: HTTPLayer = new PlayHTTPLayer(WS.client)(defaultContext)

	override def id: String = PROVIDER_ID

	//override def wsClient: WSClient = WS.client

	override protected def urls: Map[String, String] = Map()

	override type Content = Unit
	override type Profile = AsfaliaProfile

	override protected def buildProfile(authInfo: OpenIDInfo): Future[AsfaliaProfile] = {
		profileParser.parse((), authInfo)

	override protected def profileParser: SocialProfileParser[Unit, AsfaliaProfile, OpenIDInfo] = new SocialProfileParser[Unit, AsfaliaProfile, OpenIDInfo] {
		override def parse(content: Unit, authInfo: OpenIDInfo): Future[AsfaliaProfile] = {
			Future.successful(AsfaliaProfile(LoginInfo(id, authInfo.id)))

	override def withSettings(f: OpenIDSettings => OpenIDSettings): AsfaliaProvider = this

case class AsfaliaProfile(loginInfo: LoginInfo) extends SocialProfile

and doing this cause null pointer exception :

val settings = OpenIDSettings(

			new AsfaliaProvider(
				new PlayOpenIDService(new WsOpenIdClient(WS.client, new WsDiscovery(WS.client)), settings)

Do you reproduce my issue ?
When i try to instanciate another provider extening OpenIDProvider (e.g YahooProvider) that works.

Ok I find it.
It is because we must declare httpLayer as val in the constructor of the class and not override it in the body class.