Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access token api #1174

Closed
ramarro123 opened this issue Oct 1, 2024 · 3 comments
Closed

access token api #1174

ramarro123 opened this issue Oct 1, 2024 · 3 comments

Comments

@ramarro123
Copy link

hi,

i need to rotate a token, for security purpose (and because from gitlab 16.x the max duration is 1y)

i found some intresting api like
https://docs.gitlab.com/ee/api/user_tokens.html#create-a-personal-access-token

and

https://docs.gitlab.com/ee/api/personal_access_tokens.html#create-a-personal-access-token-administrator-only

they aren't mapped? or if they are i can't find where :(

can someone point me to the right direction? thanks!

@jmini
Copy link
Collaborator

jmini commented Oct 13, 2024

With PR #1150 a new class was added PersonalAccessTokenApi for https://docs.gitlab.com/ee/api/personal_access_tokens.html but only the rotate method is implemented for now.

This can be extended if needed.

@jmini
Copy link
Collaborator

jmini commented Oct 13, 2024

And for group access token there is org.gitlab4j.api.GroupApi.rotateGroupAccessToken(Object, Long, Date)

@jmini
Copy link
Collaborator

jmini commented Oct 16, 2024

@ramarro123 I am closing this, feel free to re-open if needed

@jmini jmini closed this as completed Oct 16, 2024
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

No branches or pull requests

2 participants