async def _load_authentication(self):
        """Read authentication from kube-config user section if exists.

        This function goes through various authentication methods in user
        section of kube-config and stops if it finds a valid authentication
        method. The order of authentication methods is:

            1. GCP auth-provider
            2. token field (point to a token file)
            3. oidc auth-provider
            4. exec provided plugin
            5. username/password
        """

        if not self._user:
            logging.debug('No user section in current context.')
            return

        if self.provider == 'gcp':
            await self.load_gcp_token()
            return

        if self.provider == PROVIDER_TYPE_OIDC:
            await self._load_oid_token()
            return

        if 'exec' in self._user:
            logging.debug('Try to use exec provider')
            res_exec_plugin = await self._load_from_exec_plugin()
            if res_exec_plugin:
                return

        logging.debug('Try to load user token')
        if self._load_user_token():
            return

        logging.debug('Try to use username and password')
        self._load_user_pass_token()
async def _load_authentication ( self ) : if not self . _user : logging . debug ( 'No user section in current context.' ) return if self . provider == 'gcp' : await self . load_gcp_token ( ) return if self . provider == PROVIDER_TYPE_OIDC : await self . _load_oid_token ( ) return if 'exec' in self . _user : logging . debug ( 'Try to use exec provider' ) res_exec_plugin = await self . _load_from_exec_plugin ( ) if res_exec_plugin : return logging . debug ( 'Try to load user token' ) if self . _load_user_token ( ) : return logging . debug ( 'Try to use username and password' ) self . _load_user_pass_token ( )
Read authentication from kube-config user section if exists.

        This function goes through various authentication methods in user
        section of kube-config and stops if it finds a valid authentication
        method. The order of authentication methods is:

            1. GCP auth-provider
            2. token field (point to a token file)
            3. oidc auth-provider
            4. exec provided plugin
            5. username/password