Skip to content
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

Enable only for certain users #636

Open
vatsake opened this issue Jun 5, 2023 · 3 comments
Open

Enable only for certain users #636

vatsake opened this issue Jun 5, 2023 · 3 comments
Milestone

Comments

@vatsake
Copy link

vatsake commented Jun 5, 2023

How to enable in middleware (even if app_debug is false)?

@itsgoingd
Copy link
Owner

Hey, you can enable Clockwork explicitly by setting CLOCKWORK_ENABLE to true, but there's currently no good way to enable or disable Clockwork on runtime.

@itsgoingd itsgoingd added this to the Clockwork 6 milestone Oct 28, 2024
@syamsoul
Copy link

syamsoul commented Dec 24, 2024

Hey, you can enable Clockwork explicitly by setting CLOCKWORK_ENABLE to true, but there's currently no good way to enable or disable Clockwork on runtime.

if we take example of Laravel Horizon, for non-local environment, we can set to only allow specific users only to access Horizon dashbaord.. some developer use this Authorization Gate to allow users from specific IP address only...

i think this would be good to implemented in Clockwork.. because sometimes we need to use clockwork in production, but for security purpose, it would be good to only allow developers to access from specific IP address (office, VPN, etc).....

below is example of implementation of Authorization Gate in Laravel Horizon..

image

@itsgoingd
Copy link
Owner

Hey, Clockwork includes support for a simple password-based authentication, to use it, set CLOCKWORK_AUTHENTICATION to true and CLOCKWORK_AUTHENTICATION_PASSWORD to your desired password.

You can also implement your own authenticator, for more advanced use-cases, see https://underground.works/clockwork/#docs-extending-authentication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants