lib/rodauth/features/oauth_implicit_grant.rb in rodauth-oauth-0.10.2 vs lib/rodauth/features/oauth_implicit_grant.rb in rodauth-oauth-0.10.3
- old
+ new
@@ -1,13 +1,19 @@
# frozen_string_literal: true
module Rodauth
Feature.define(:oauth_implicit_grant, :OauthImplicitGrant) do
- depends :oauth_base
+ depends :oauth_authorize_base
auth_value_method :use_oauth_implicit_grant_type?, false
private
+
+ def check_valid_response_type?
+ response_type = param_or_nil("response_type")
+
+ response_type.nil? || response_type == "token" || super
+ end
def do_authorize(response_params = {}, response_mode = param_or_nil("response_mode"))
return super unless param("response_type") == "token" && use_oauth_implicit_grant_type?
response_mode ||= "fragment"