Refactor fetching of remote resources (#11251)

This commit is contained in:
Eugen Rochko
2019-07-10 18:59:28 +02:00
committed by GitHub
parent d04c584159
commit 5d3feed191
13 changed files with 142 additions and 216 deletions

View File

@ -41,7 +41,7 @@ class Request
end
def on_behalf_of(account, key_id_format = :acct, sign_with: nil)
raise ArgumentError unless account.local?
raise ArgumentError, 'account must be local' unless account&.local?
@account = account
@keypair = sign_with.present? ? OpenSSL::PKey::RSA.new(sign_with) : @account.keypair