Different kinds of authentication

Authentication can be implemented in various ways, such as passwords, SMS verification codes, and biometrics. Should these be modeled as separate concepts, or as different implementations of a single, unified Authentication concept(like conceptbox/design/concepts/UserAuthentication/UserAuthentication.md at main · 61040-fa25/conceptbox · GitHub and deja-vu/packages/catalog/authentication at master · deja-vu-platform/deja-vu · GitHub )?
Similarly, product discount strategies can involve many different calculation methods. In such cases, would it make sense to think in terms of “concept clusters” or “concept polymorphism”?

1 Like

They should be separate concepts, because even though they share a purpose to some extent, they have different operational principles and different strengths and weaknesses. Nowadays we’d probably call that concept PasswordAuthenticating to make it clear that it’s password based.

But at the same time, I think your intuition is good that these related concepts should be grouped in a concept catalog under the same or similar purposes.

Note that sometimes the purpose might seem be the same but is actually very different. Access tokens sometimes look like passwords (see Github eg), but their associated concepts are very different. Passwords are for simple auth and to prevent one user from masquerading as another. Access tokens are for delegating – precisely to allow one user to act as another!

2 Likes

That distinction also helps with the discount analogy: model each calculation rule as its own concept if it has distinct state and actions, then group them by purpose in the catalog. “Concept polymorphism” is better treated as selection at composition/synchronization time—choosing which concept handles a request—rather than as a polymorphic supertype. A single Authentication concept with variants would tend to hide different state, failure modes and delegation semantics, even when the outward purpose looks shared.

1 Like