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 "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJuYW1lc3BhY2UtY29udHJvbGxlci10b2tlbi1tcXgxNiIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJuYW1lc3BhY2UtY29udHJvbGxlciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjAxODIzOTFlLWJhNjAtMTFlNy1hZTBlLTQyMDEwYThhMDFiMSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTpuYW1lc3BhY2UtY29udHJvbGxlciJ9.xLmVnwnt3gglt15gFS6hUOn3u471tHJjJxj7kHsDVKa-L-iEQAHWJLO2ZNicUMWR_JflEcv8jUB1y6g4vToMlcbQry1C_KLTA_K9fan4uiP60VhqFPM3w9B_0Yk8pI0rrF6adh4LQho6l6LGRTpLoEUOOkCIAxO1HE6DBTujIbjoh2AOSkL02A_rKOuF5X22IaHe9_wdocDnpJOm9q2aldbmHEGlCFVlimpA1vZts8rbVzkajfvGROo_Ug137EEmgYTQxPz2l9o3cr2j9HzuYqMiy_Z_ndOtzEcTohy_HwNv-qdeJliPsCZdSe7Oe3S2LMXoUDH8xaseW5dsLhBRWQ"