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

Question: How to clean issued token list? #2667

Open
parkjaeil0x01 opened this issue Dec 30, 2024 · 1 comment
Open

Question: How to clean issued token list? #2667

parkjaeil0x01 opened this issue Dec 30, 2024 · 1 comment
Assignees

Comments

@parkjaeil0x01
Copy link

Question

I'd like to query or execute the status of tasks through the semaphore API in an external application that I developed myself.

In this process, I issue a token through /user/tokens, use it, and then expire the token through DELETE /user/tokens.

As I configure it this way, information about the issued tokens seems to accumulate indefinitely:

{
  "tokens": [
    {
      "id": "2ae_h-jewyvxtfub4rb1efd-t3jirz9dciuzaitalh0=",
      "created": "2024-12-30T02:34:55Z",
      "expired": true,
      "user_id": 9
    },
    {
      "id": "4egniziz88ivdc7skoifzycyge6s5jvi01tk5poql9a=",
      "created": "2024-12-27T08:33:58Z",
      "expired": true,
      "user_id": 9
    },
    {
      "id": "51hfikqwsjs5wt0j2yvkf-ribftxevptvvh_lebgn_4=",
      "created": "2024-12-30T02:34:56Z",
      "expired": true,
      "user_id": 9
    },
    {
      "id": "529d1_jergoyxmosz-rxuxf_zzob89bhxphuonswbv0=",
      "created": "2024-12-30T02:34:56Z",
      "expired": true,
      "user_id": 9
    },
    {
      "id": "5urnf1g-xkwdnavudrzkmvfihapp7gourczgenoyzj4=",
      "created": "2024-12-30T02:34:54Z",
      "expired": true,
      "user_id": 9
    },
    {
      "id": "7bwjtqcl5l5ysjhucx7suxm7mqjmhgwufi7l4dluklw=",
      "created": "2024-12-30T02:34:53Z",
      "expired": true,
      "user_id": 9
    },
    {
      "id": "85mihbjpmlrtyes6bpavdyk1d8z-jxglfwfd9dwzsn4=",
      "created": "2024-12-30T02:34:58Z",
      "expired": true,
      "user_id": 9
    },

    (...)
  ]
}

To solve this, I want to know if there is a date standard that manually deletes the list of issued tokens or shows the issued tokens internally.

Related to

Web-Backend (APIs)

@fiftin
Copy link
Collaborator

fiftin commented Dec 30, 2024

Hi @parkjaeil0x01 thank you. Agree, old token must be deleted. There is no reason to store them.

@fiftin fiftin added the feature label Dec 30, 2024
@fiftin fiftin self-assigned this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@fiftin @parkjaeil0x01 and others