|
|
|
|
@ -12,7 +12,7 @@ class ActivityPub::FetchRemoteKeyService < BaseService
|
|
|
|
|
@json = fetch_resource(uri, false) |
|
|
|
|
|
|
|
|
|
raise Error, "Unable to fetch key JSON at #{uri}" if @json.nil? |
|
|
|
|
raise Error, "Unsupported JSON-LD context for document #{uri}" unless supported_context?(@json) |
|
|
|
|
raise Error, "Unsupported JSON-LD context for document #{uri}" unless supported_context?(@json) || (supported_security_context?(@json) && @json['owner'].present? && !actor_type?) |
|
|
|
|
raise Error, "Unexpected object type for key #{uri}" unless expected_type? |
|
|
|
|
return find_actor(@json['id'], @json, suppress_errors) if actor_type? |
|
|
|
|
|
|
|
|
|
|