Class: ThreeScale::Backend::Validators::OauthKey
- Defined in:
- lib/3scale/backend/validators/oauth_key.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#application, apply, #fail!, #initialize, #service, #succeed!
Constructor Details
This class inherits a constructor from ThreeScale::Backend::Validators::Base
Instance Method Details
#apply ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/3scale/backend/validators/oauth_key.rb', line 5 def apply if params[:app_key].nil? || (!params[:app_key].empty? && application.has_key?(params[:app_key])) succeed! else fail!(ApplicationKeyInvalid.new(params[:app_key])) end end |