Commit 1607e56c authored by Price, Zach's avatar Price, Zach
Browse files

Fix urls

parent a54ed61f
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ class JWTBearer(HTTPBearer):
                raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Invalid authentication scheme.")

            try:
                openid_config = requests.get(f'{str(config.oidc_url)}/.well-known/openid-configuration').json()
                openid_config = requests.get(f'{str(config.oidc_url)}.well-known/openid-configuration').json()
                jwks_client = PyJWKClient(openid_config['jwks_uri'])
                signing_key = jwks_client.get_signing_key_from_jwt(credentials.credentials)
                auth_data = jwt.decode(
+1 −1
Original line number Diff line number Diff line
@@ -78,4 +78,4 @@ class ARMFiles(Model):

    @property_field
    def url(self) -> AnyHttpUrl:
        return f'{config.host_url}/fs/stream/{self.name}'
        return f'{config.host_url}/v1_0/fs/stream/{self.name}'
+2 −2
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ class Archive(object):
        env_token = os.environ.get('ADL_TOKEN')
        if username and password:
            self.auth_data = requests.post(
                f'{str(config.endpoint)}get_token/',
                f'{str(config.endpoint)}/get_token',
                auth=(username, password)
            ).json()
        elif env_token:
@@ -97,7 +97,7 @@ class Archive(object):
            'start_time': self.start_time,
            'end_time': self.end_time
        }
        return requests.get(f'{str(config.endpoint)}/file_list/', params=payload).json()
        return requests.get(f'{str(config.endpoint)}/fs/file_list/', params=payload).json()

    def download(self, destination):
        with ThreadPoolExecutor(config.download_threads) as pool:
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ from pydantic import AnyHttpUrl, BaseSettings

class Settings(BaseSettings):
    debug: bool = True
    endpoint: AnyHttpUrl = 'http://localhost:8000/v1_0/fs'
    endpoint: AnyHttpUrl = 'http://localhost:8000/v1_0'
    download_chunk_size: int = 8192
    download_threads: int = None