Scala port of OpenAM