mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-03-10 08:29:00 +00:00
refactor(remote_auth): remove unused requests.Session
The session was created with headers but never used. The class saves sessions locally via the cache rather than uploading to a remote server.
This commit is contained in:
@@ -16,7 +16,6 @@ import logging
|
|||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import requests
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from unshackle.core.api.session_serializer import serialize_session
|
from unshackle.core.api.session_serializer import serialize_session
|
||||||
@@ -53,8 +52,6 @@ class RemoteAuthenticator:
|
|||||||
"""
|
"""
|
||||||
self.remote_url = remote_url.rstrip("/")
|
self.remote_url = remote_url.rstrip("/")
|
||||||
self.api_key = api_key
|
self.api_key = api_key
|
||||||
self.session = requests.Session()
|
|
||||||
self.session.headers.update({"X-API-Key": self.api_key, "Content-Type": "application/json"})
|
|
||||||
|
|
||||||
def authenticate_service_locally(
|
def authenticate_service_locally(
|
||||||
self, service_tag: str, profile: Optional[str] = None, force_reauth: bool = False
|
self, service_tag: str, profile: Optional[str] = None, force_reauth: bool = False
|
||||||
|
|||||||
Reference in New Issue
Block a user