MCPcopy Index your code
hub / github.com/kubernetes-client/python / _apply_auth_params

Method _apply_auth_params

kubernetes/aio/client/api_client.py:575–591  ·  view source on GitHub ↗

Updates the request parameters based on a single auth_setting :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_setting: auth settings for the endpoint

(self, headers, queries, auth_setting)

Source from the content-addressed store, hash-verified

573 self._apply_auth_params(headers, queries, auth_setting)
574
575 def _apply_auth_params(self, headers, queries, auth_setting):
576 """Updates the request parameters based on a single auth_setting
577
578 :param headers: Header parameters dict to be updated.
579 :param queries: Query parameters tuple list to be updated.
580 :param auth_setting: auth settings for the endpoint
581 """
582 if auth_setting['in'] == 'cookie':
583 headers['Cookie'] = auth_setting['value']
584 elif auth_setting['in'] == 'header':
585 headers[auth_setting['key']] = auth_setting['value']
586 elif auth_setting['in'] == 'query':
587 queries.append((auth_setting['key'], auth_setting['value']))
588 else:
589 raise ApiValueError(
590 'Authentication token must be in `query` or `header`'
591 )
592
593 def __deserialize_file(self, response):
594 """Deserializes body to file

Callers 1

Calls 1

ApiValueErrorClass · 0.90

Tested by

no test coverage detected