Refactor fetching of remote resources (#11251)
This commit is contained in:
parent
d04c584159
commit
5d3feed191
13 changed files with 142 additions and 216 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue