You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out if this is a bug, intentional behavior, or just user error on my part.
I have a Coldbox app that only needs to use cbauth (via cbsecurity) in a module. I have defined my cbsecurity settings in the module's ModuleConfig.cfc like this:
settings = {
cbsecurity = {
// Module Relocation when an invalid access is detected, instead of each rule declaring one.
"invalidAuthenticationEvent" : "admin:errors.onAuthenticationFailure",
// Default Auhtentication Action: override or redirect when a user has not logged in
"defaultAuthenticationAction" : "override",
// Module override event when an invalid access is detected, instead of each rule declaring one.
"invalidAuthorizationEvent" : "admin:errors.onAuthorizationFailure",
// Default Authorization Action: override or redirect when a user does not have enough permissions to access something
"defaultAuthorizationAction" : "override",
// cbauth
"userService" : "AuthenticationService@admin",
// You can define your security rules here
"rules" : [
{
"secureList" : "admin:*",
"whitelist" : "admin:login"
}
]
}
However, when I try to access the submodule I get the following error:
No [userServiceClass] provided. Please set in config/ColdBox.cfc under moduleSettings.cbauth.userServiceClass.
I can make the error go away if I put the following in my root app's Coldbox.cfc config file:
However, it smells funny to me to have to specify the cbauth settings in the app root if cbauth is only needed at the module level. Is this intentional behavior of cbauth? Or perhaps I am missing something?
The text was updated successfully, but these errors were encountered:
@elpete checking in on this issue to make sure you received it.
I believe the issue can be fixed by modifying AuthenticationService so that it gets the property userServiceClass from moduleSettings instead of Coldbox settings, right?
In other words, a module should be able to set up cbauth instead of relying on the root app to do it.
I'm trying to figure out if this is a bug, intentional behavior, or just user error on my part.
I have a Coldbox app that only needs to use cbauth (via cbsecurity) in a module. I have defined my cbsecurity settings in the module's ModuleConfig.cfc like this:
However, when I try to access the submodule I get the following error:
No [userServiceClass] provided. Please set in
config/ColdBox.cfc
undermoduleSettings.cbauth.userServiceClass
.I can make the error go away if I put the following in my root app's Coldbox.cfc config file:
However, it smells funny to me to have to specify the cbauth settings in the app root if cbauth is only needed at the module level. Is this intentional behavior of cbauth? Or perhaps I am missing something?
The text was updated successfully, but these errors were encountered: