Skip to content

Commit

Permalink
Do not re-authorize if already authorized
Browse files Browse the repository at this point in the history
  • Loading branch information
chapmankyle committed Apr 26, 2024
1 parent 13d60ae commit 3b2fa28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ups/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def label(label_builder = nil)
# @param [Boolean] mock If the request should be mocked
# @return [void]
def authorize(account_number, client_id, client_secret, mock = false)
if @token_data && !@token_data.empty?
return nil
end

if mock
self.account_number = account_number
self.client_id = client_id
Expand Down

0 comments on commit 3b2fa28

Please sign in to comment.