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

Method _apply_auth_params

kubernetes/client/api_client.py:569–585  ·  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

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

Callers 1

Calls 1

ApiValueErrorClass · 0.90

Tested by

no test coverage detected