2020-06-03 03:24:53 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ActivityPub::ClaimsController < ActivityPub::BaseController
|
|
|
|
include SignatureVerification
|
|
|
|
include AccountOwnedConcern
|
|
|
|
|
|
|
|
skip_before_action :authenticate_user!
|
|
|
|
|
2022-09-22 06:45:57 +10:00
|
|
|
before_action :require_account_signature!
|
2020-06-03 03:24:53 +10:00
|
|
|
before_action :set_claim_result
|
|
|
|
|
|
|
|
def create
|
|
|
|
render json: @claim_result, serializer: ActivityPub::OneTimeKeySerializer
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_claim_result
|
|
|
|
@claim_result = ::Keys::ClaimService.new.call(@account.id, params[:id])
|
|
|
|
end
|
|
|
|
end
|