Add HTTP signatures to all outgoing ActivityPub GET requests (#11284)
This commit is contained in:
parent
a6dc6a242f
commit
4e8dcc5dbb
6 changed files with 45 additions and 42 deletions
|
@ -40,8 +40,8 @@ class Request
|
|||
set_digest! if options.key?(:body)
|
||||
end
|
||||
|
||||
def on_behalf_of(account, key_id_format = :acct, sign_with: nil)
|
||||
raise ArgumentError, 'account must be local' unless account&.local?
|
||||
def on_behalf_of(account, key_id_format = :uri, sign_with: nil)
|
||||
raise ArgumentError, 'account must not be nil' if account.nil?
|
||||
|
||||
@account = account
|
||||
@keypair = sign_with.present? ? OpenSSL::PKey::RSA.new(sign_with) : @account.keypair
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue