cbauthcan be installed with
userServiceClasswhich has to be specified in the module settings. It should be a WireBox mapping that resolves to a component that implements the
IUserServiceinterface (though this implementation can be implicit.)
sessionStorage(e.g distributed cache) as long as your new storages follow the Interface definitions as defined:
UserServiceand configured the
moduleSettingsyou are ready to use the
AuthenticationService. You can inject the authentication service using WireBox:
auth()helper method (which is actually just a shortcut to a wirebox injection). The
auth()helper is very useful in views. And since Wirebox handles singleton management, you don't have to worry about calling
auth()too many times.
auth()helper is available in handlers, layouts, and views. You will need to use the injection if you need cbauth in other models.