Skip to content

Allow specify bearer token on Registry #672

@jonesbusy

Description

@jonesbusy

In some scenario the Bearer Auth token is requested by an other system (for example token exchange).

Right now passing a known auth token is not user friendly. Typically

BearerTokenProvider provider = new BearerTokenProvider();
provider.setToken(new HttpClient.TokenResponse("...", null, null, null, null));
Registry registry = Registry.builder()
        .defaults("registry")
        .withAuthProvider(provider)
        .build();

Either improve signature of BearerTokenProvider or implement withBearerToken

Caller would be responsible to refresh token when expired (this would invalidate the Registry and require a copy with new access token)

My use case is an Artifactory MCP were tokens are exchanged using /access/api/v1/oidc/token endpoint then used as authentication

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