Skip to content

Commit

Permalink
Proper naming of token's methods
Browse files Browse the repository at this point in the history
  • Loading branch information
gridanjbf committed Apr 17, 2024
1 parent fbe8fb1 commit 371eb85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/sharepoint/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(config)
@config = config
end

def ensure
def get_or_fetch
return access_token unless access_token.nil? || expired?
fetch
end
Expand Down Expand Up @@ -70,12 +70,12 @@ def expired?
end # endof Token

def authenticating(&block)
ensure_token
get_token
yield
end

def ensure_token
token.ensure
def get_token
token.get_or_fetch
end

def bearer_auth
Expand Down

0 comments on commit 371eb85

Please sign in to comment.