Just started to replace our auth with cbsecurity 3...
# box-products
g
Just started to replace our auth with cbsecurity 3.x There is an issue with cbauth, so do I understand correctly, that cbauth just stores user ID in session and all other user properties in the request? So it gets reloaded from db with each request? Now if I want to keep settings in session I have to set
moduleSettings['cbauth']['requestStorage']      = 'sessionstorage@cbstorages';
Or store my user setting separate?
l
Hi Gunnar!
cbauth stores in session ONLY the id of the user and the full user in the request
next request, it will rebuild the user from the db
and place in request
If you want to store the full object in session, you can definitely do that
change the
requestStorage
to point to
session
and be done with it
or you can create your own
AuthenticationService
that implements the CBSecurity methods
g
Hi Luis, thanks for the clarification! Is it mentioned in the docs?
l
So,
cbSecurity
works with ANY authentication service
via the link I sent you above
we ship
cbauth
as a simple authentication mechanism
if people want to use it
but it's simplistic and very opinionated
which is ok
serves it's purpose
Once you want to do more custom things, it's best to just roll your own security service
g
got it, I just took the sample, added some properties to the auth user and was surprised that they disappeared. I will send a pull request for the docs
l
gracias Señor
will I see you at CFCamp?
g
I would love to, but I have some family troubles which make it impossible to attend, hopefully next time
l
ohh man, yes, next time!