Class: GhostCrawl::StaticTokenProvider Private
- Inherits:
-
Object
- Object
- GhostCrawl::StaticTokenProvider
- Includes:
- MicrosoftKiotaAbstractions::AccessTokenProvider
- Defined in:
- lib/ghostcrawl/client.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #get_allowed_hosts_validator ⇒ Object private
-
#get_authorization_token(_uri, _additional_authentication_context = nil) ⇒ Object
private
The Kiota Faraday adapter calls .resume on the return value of this method, expecting a Fiber.
-
#initialize(token) ⇒ StaticTokenProvider
constructor
private
A new instance of StaticTokenProvider.
Constructor Details
#initialize(token) ⇒ StaticTokenProvider
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of StaticTokenProvider.
226 227 228 |
# File 'lib/ghostcrawl/client.rb', line 226 def initialize(token) @token = token end |
Instance Method Details
#get_allowed_hosts_validator ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
237 238 239 |
# File 'lib/ghostcrawl/client.rb', line 237 def get_allowed_hosts_validator MicrosoftKiotaAbstractions::AllowedHostsValidator.new([]) end |
#get_authorization_token(_uri, _additional_authentication_context = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The Kiota Faraday adapter calls .resume on the return value of this method, expecting a Fiber. Wrap the token in a Fiber to satisfy the contract.
232 233 234 235 |
# File 'lib/ghostcrawl/client.rb', line 232 def (_uri, _additional_authentication_context = nil) token = @token Fiber.new { token } end |