-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yii\filters\RateLimiter #7683
Comments
I have the same problem, Maybe by default disable RateLimit for rest controller? |
@RSalo what's the problem with implementing RateLimitInterface? |
Thanks for posting in our issue tracker.
Thanks! This is an automated comment, triggered by adding the label |
@samdark i have config in module
And get error in authenticator and rateLimiter:
But if i do:
It works well. Why rate limit and authenticator doesn't take "user" from the module config by default? |
So do I understand correctly that you have two user components. In the application it's without rate limiter, in module it is with rate limiter? |
Seems currently you have to explicitly set
user w/o checking module:
|
I think we can fall back to currently active module first in this case. |
It doesn't work as minimum for RateLimit yii2/framework/filters/RateLimiter.php Line 70 in 4aa935e
for AuthMethod
and its all subclasses yii\filters\auth\CompositeAuth, yii\filters\auth\HttpBasicAuth, yii\filters\auth\HttpBearerAuth, yii\filters\auth\QueryParamAuth |
RateLimiter default need a user implement RateLimitInterface,this filter is default configed by yii\rest\Controller
if restfull api neednt a user this will throw a exception like
Invalid Configuration User::identityClass must be set.0
yii\base\InvalidConfigException /var/www/test/vendor/yiisoft/yii2/web/User.phpThe text was updated successfully, but these errors were encountered: