AppFoundation Roles


i am new to Role based authentication, read through what I found at
. Not much wiser than before. They write:

Role visitors = getVisitorRole();
Role regUsers = getRegisteredUsersRole();

can someone give an example implementation, or classes for these methods?

Thanks, Niklas

It’s totally up to you how you implement the interface. There are just a handful of methods you need to implement, getIdentifier which should return a unique String id for each role and then add/remove/get/setRoles for managing child roles. Your role can be an entity or, for example, an enumeration - it totally depends on your needs and use cases. Anyway, the only actual implementation of the Role interface that I currently have to show you is in the tests package of appfoundation, see
for details.