lib/rodauth/features/oauth_jwt.rb in rodauth-oauth-0.10.2 vs lib/rodauth/features/oauth_jwt.rb in rodauth-oauth-0.10.3

- old
+ new

@@ -1,6 +1,6 @@ -# frozen-string-literal: true +# frozen_string_literal: true require "rodauth/oauth/version" require "rodauth/oauth/ttl_store" module Rodauth @@ -88,17 +88,14 @@ token_scopes = authorization_token["scope"].split(" ") authorization_required unless scopes.any? { |scope| token_scopes.include?(scope) } end - # Overrides session_value, so that a valid authorization token also authenticates a request - def session_value - super || begin - return unless authorization_token + def oauth_token_subject + return unless authorization_token - authorization_token["sub"] - end + authorization_token["sub"] end private def issuer @@ -125,10 +122,10 @@ end end # /authorize - def validate_oauth_grant_params + def validate_authorize_params # TODO: add support for requst_uri redirect_response_error("request_uri_not_supported") if param_or_nil("request_uri") request_object = param_or_nil("request")