diff --git a/lib/warden/oauth2/strategies/client.rb b/lib/warden/oauth2/strategies/client.rb index 3f3514f..d9c9e0a 100644 --- a/lib/warden/oauth2/strategies/client.rb +++ b/lib/warden/oauth2/strategies/client.rb @@ -11,7 +11,7 @@ def authenticate! @client = client_from_http_basic || client_from_request_params if self.client - fail 'invalid_scope' and return if scope && client.respond_to?(:scope) && !client.scope?(scope) + fail 'invalid_scope' and return if scope && client.respond_to?('scope?') && !client.scope?(scope) client_authenticated else fail 'invalid_client'