Skip to content

Conversation

kaplanelad
Copy link

@kaplanelad kaplanelad commented May 30, 2022

Hey,
We often want to know which access the token client has before executing the API request.
I have added a small package called github-scopes-rs, which allows us to get the scope of the token.
This package returns a boolean fields struct (mapped to the GitHub checkboxes permission via the UI).

GitHub Scope Documentation

I have created an example file:

cargo run --example get_token_scopes

@kaplanelad kaplanelad closed this Jun 2, 2022
@kaplanelad kaplanelad reopened this Jun 2, 2022
@kaplanelad
Copy link
Author

kaplanelad commented Jun 8, 2022

He @jessfraz,
what do you think about my PR?

@kaplanelad
Copy link
Author

@jessfraz ?

@augustuswm
Copy link
Contributor

Hi @kaplanelad, we are not likely to merge this currently. The clients in this repo are specifically generated based on OpenAPI specs (as defined by a given service). I can look in to seeing if there is something in the spec that we could generate this data from. I think for now it makes sense to keep it as a standalone crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants