lib/purecloudplatformclientv2/configuration.rb in purecloudplatformclientv2-47.0.0 vs lib/purecloudplatformclientv2/configuration.rb in purecloudplatformclientv2-48.0.0
- old
+ new
@@ -133,11 +133,11 @@
@base_path = "/#{base_path}".gsub(/\/+/, '/')
@base_path = "" if @base_path == "/"
end
def base_url
- url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
+ url = "https://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
URI.encode(url)
end
# Gets API key (with prefix if set).
# @param [String] param_name the parameter name of API key auth
@@ -155,12 +155,19 @@
end
# Returns Auth Settings hash for api client.
def auth_settings
{
- 'PureCloud Auth' =>
+ 'PureCloud OAuth' =>
{
type: 'oauth2',
+ in: 'header',
+ key: 'Authorization',
+ value: "Bearer #{access_token}"
+ },
+ 'Guest Chat JWT' =>
+ {
+ type: 'api_key',
in: 'header',
key: 'Authorization',
value: "Bearer #{access_token}"
},
}