Since it isn't possible to subclass a case class, and implementors may have a different structure for users than the BasicProfile, and in general, it is best to stick to the Robustness Principle (and I'm guessing this is why the GenericProfile trait exists in the first place?)
In my case, I needed this because I am migrating from an old version of SecureSocial, where the IdentityId was a thing. I didn't want to migrate all of my user records in mongo, or tack on a transformation step in my DB layer. I imagine others may have other reasons for wanting to have the freedom to implement GenericProfile differently.
Of course, implementors are still free to just use BasicProfile.
Since it isn't possible to subclass a case class, and implementors may have a different structure for users than the
BasicProfile
, and in general, it is best to stick to the Robustness Principle (and I'm guessing this is why theGenericProfile
trait exists in the first place?)In my case, I needed this because I am migrating from an old version of SecureSocial, where the
IdentityId
was a thing. I didn't want to migrate all of my user records in mongo, or tack on a transformation step in my DB layer. I imagine others may have other reasons for wanting to have the freedom to implementGenericProfile
differently.Of course, implementors are still free to just use
BasicProfile
.