Class: SidekiqWebGoogleAuth::Builder
- Inherits:
-
OmniAuth::Builder
- Object
- OmniAuth::Builder
- SidekiqWebGoogleAuth::Builder
- Defined in:
- lib/sidekiq_web_google_auth/builder.rb
Defined Under Namespace
Classes: ArgumentError
Constant Summary collapse
- ARGUMENT_ERROR =
"You must provide authorized_emails or authorized_emails_domains (or both)"
Instance Method Summary collapse
Instance Method Details
#provider(*args, authorized_emails: [], authorized_emails_domains: [], **options, &block) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/sidekiq_web_google_auth/builder.rb', line 11 def provider(*args, authorized_emails: [], authorized_emails_domains: [], **, &block) invalid_arguments! if .empty? && .empty? super("google_oauth2", *args, .merge(name: "oauth"), &block) SidekiqWebGoogleAuth::Extension. = SidekiqWebGoogleAuth::Extension. = Sidekiq::Web.register(SidekiqWebGoogleAuth::Extension) end |