Skip to content

Support service account tokens #17

@vijaybandari

Description

@vijaybandari

Current sdk sets the token header as Apikey.

with httpx.Client(
    headers={
        "Authorization": f"ApiKey {self.access_token}",
        "Accept": "application/json",
    },
    timeout=self.timeout
) 

But the lightdash api expects the service account tokens to be prefixed with Bearer

// If it is not a specific Bearer token, we do next, without throwing an error
// This could be an ApiKey token, or already authenticated user
if (tokenParts.length !== 2 || tokenParts[0] !== 'Bearer') {
    // We will execute the next middleware
    next();
    return;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions