We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey guys, in Device we have this method:
# config/routes.rb authenticate :user do mount Sidekiq::Web => '/sidekiq' end
https://github.com/mperham/sidekiq/wiki/Monitoring#authentication
Do we have similar method in Sorcery?
The text was updated successfully, but these errors were encountered:
create lib/auth_constraint.rb
lib/auth_constraint.rb
class AdminConstraint def matches?(request) return false unless request.session[:user_id] user = User.find request.session[:user_id] user && user.root? end end
Then in your routes:
mount Sidekiq::Web => "/sidekiq", constraints: AdminConstraint.new
or something like this. Check the wiki https://github.com/NoamB/sorcery/wiki/Routes-Constraints
Sorry, something went wrong.
@Ch4s3 thx
Is there a way to do this without a constraint? Or is this best practice? :)
No branches or pull requests
Hey guys, in Device we have this method:
https://github.com/mperham/sidekiq/wiki/Monitoring#authentication
Do we have similar method in Sorcery?
The text was updated successfully, but these errors were encountered: