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.
212 213 214 |
# File 'lib/ghostcrawl/client.rb', line 212 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.
223 224 225 |
# File 'lib/ghostcrawl/client.rb', line 223 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.
218 219 220 221 |
# File 'lib/ghostcrawl/client.rb', line 218 def (_uri, _additional_authentication_context = nil) token = @token Fiber.new { token } end |