from sidecar.const import Const


class KubTokenProvider:
    def get_token(self):
        with open(Const.get_kubernetes_token_file_path(), 'r') as pod_token_file:
            return pod_token_file.read().replace('\n', '')


class FakeKubTokenProvider(KubTokenProvider):
    def get_token(self):
        return "eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJmMzd2cW56OGFuMDB1MSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkZWZhdWx0LXRva2VuLTZwdGJtIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImRlZmF1bHQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiIyZTAwNjNmNy1jZjc4LTExZTgtYmQ0YS1hZTRkNTYwOGE2ZDIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZjM3dnFuejhhbjAwdTE6ZGVmYXVsdCJ9.gnl_NHQb5QWJmOaijIa_d9QKFppm4aGsb5M_Ms2lMAbat95LtWz9mO3sxKuzg5KqF_F2iLrCT8KSTD8bQtReeyMAj6jq88XP0VYjpPQGIrVGGONoEE0esv3TbhcwSz6UQVVRY4e4f77bRdevbnu2isEd0MD2tB9bLvGdJe4xwRsydK5Gw4J_EK1U_j3a6pSZ9AMAe0tOdNkJLMivoJUr4VVxVrVhIZbuG7r_AHDPV_nD2EazBx2JcvwoLAs_dvz17ZAIh8Uf0xuxyNT28jSRAclzWV1YhNRGLsUa_9Z6E3U47ub1pHAuochdgypJL_SGzvZo90V3Izft3yDgwDThkio3Nv1EOMy3ET5iBYsiMNZsNtN_pv_Ed6XVvxHPdwgZtrc-djygvF6X-NQ2ryPcxX21RxF-nFjblFZ3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