Skip to content

Add Feed Tokens to Token information API

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.

What does this MR do and why?

Due to the refactoring of the token identification, the Token information API can now handle feed tokens.

This commit adds a spec and updates the documentation.

🛠 with at Siemens

References

MR acceptance checklist

MR Checklist ( @nwittstruck)

How to set up and validate locally

  1. Enable feature flag via rails c:
Feature.enable(:admin_agnostic_token_finder)
  1. You'll need to create a personal access token and retrieve your feed token:

    1. Create a personal access token with admin capabilities.
    2. Create a feed token to query.
  2. Now you can retrieve information about this token:

curl --request POST \
--url 'https://gdk.test:3443/api/v4/admin/token' \       
--header 'Authorization: Bearer <Admin Token from Step 1.>' \
--header 'Content-Type: application/json' \
--data '{"token": "glft-<example-token>"}'
{
	"id": 1,
	"username": "root",
	"name": "Administrator",
	"state": "active",
	...
}

Related to #443597 (closed)

Edited by Nicholas Wittstruck

Merge request reports

Loading