Skip to content

Support a way to only generate access tokens from installation #48

Open
@patricioperezv

Description

@patricioperezv

Hi, i'm playing with a use case in which i need to get an access token from a github application (appid and installation id), this access token is used to clone a repo, so i don't really need any more actions to be done on the github api (Besides getting the access token), i would really like to use this library for that purpose, is it possible?
I tried the following:

GitHubClient hubClient = GitHubClient.create(
    URI.create(GITHUB_ENDPOINT),
    new File(pemLocation),
    applicationId,
    installationId
);

SearchClient searchClient = hubClient.createSearchClient();
searchClient.users(ImmutableSearchParameters.builder().q("dumbdumb").build());

Optional<String> accessToken = hubClient.getAccessToken();

But the access token doesn't get populated

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