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

feat (jans-tui): Show tokens in Client View #9413

Closed
11 tasks
nynymike opened this issue Sep 7, 2024 · 9 comments · Fixed by #9554 · May be fixed by #9602
Closed
11 tasks

feat (jans-tui): Show tokens in Client View #9413

nynymike opened this issue Sep 7, 2024 · 9 comments · Fixed by #9554 · May be fixed by #9602
Assignees
Labels
kind-feature Issue or PR is a new feature request
Milestone

Comments

@nynymike
Copy link
Contributor

nynymike commented Sep 7, 2024

Description

image

There could be a lot of tokens for a given client, especially for a shared client_id (for example, a mobile application that uses the same client_id). So search is needed and paged results. If a token is deleted, the TUI should invoke the OAuth Global Token Validation endpoint.


Prepare

  • Read contribution guidelines
  • Read license information

Identified code changes

  • task 1
  • task 2
  • task 3

Test cases and code coverage

  • Write unit test to cover added/changed code
  • Update integration tests to cover added/changed code

Document the changes

  • task for updating user guides if needed
  • task for updating installation and configuration guides if needed
  • task for updating developer documentation if needed
  • task for updating technical documentation if needed
@mo-auto mo-auto added the kind-feature Issue or PR is a new feature request label Sep 7, 2024
@yuriyz
Copy link
Contributor

yuriyz commented Sep 9, 2024

This requires API on config-api side to list tokens for given client.

@devrimyatar
Copy link
Contributor

This requires API on config-api side to list tokens for given client.

CC @pujavs

@pujavs
Copy link
Contributor

pujavs commented Sep 20, 2024

Fixed via PR 9554

Endpoint details:

  1. Fetch client token:- GET /jans-config-api/api/v1/token/client/<client-inum>
  2. Delete client token: DELETE - /jans-config-api/api/v1/token/revoke/<tknCde>

Testing Screenshots:

  1. Fetch client token:- GET /jans-config-api/api/v1/token/client/<client-inum>
    image

  2. Delete client token: DELETE - /jans-config-api/api/v1/token/revoke/<tknCde>
    image

@devrimyatar
Copy link
Contributor

Currently search is not possible. This is expressed in issue body:

So search is needed and paged results.

@devrimyatar devrimyatar reopened this Sep 23, 2024
@pujavs
Copy link
Contributor

pujavs commented Sep 23, 2024

@devrimyatar, the issue description stated that one should be able to search based on client_id and hence the GET endpoints takes client-inum as parameter -> /jans-config-api/api/v1/token/client/<client-inum>

What other option is needed to search please specify.

The response to GET is paginated result as seen in the screenshot in #9413 (comment)

@devrimyatar
Copy link
Contributor

devrimyatar commented Sep 24, 2024

@nynymike Will we be able to search tokens by jansUsrId, grtTyp, scp, exp? Or just list associated tokens as a list?

@devrimyatar
Copy link
Contributor

@pujavs Another thing is that, this enpoint does not support pagination. As in the body, the response should be paged.

@pujavs
Copy link
Contributor

pujavs commented Sep 24, 2024

@devrimyatar, If you want generic search i will implement that

@pujavs
Copy link
Contributor

pujavs commented Sep 25, 2024

@devrimyatar, i have implemented search to take in dynamic search,
Note: fieldVauePair is query param that takes comma separated field=value pairs example -> field1=value1,field2=value2
Try /jans-config-api/api/v1/config/scripts?fieldValuePair=level=10

Example:

  1. Searching all token
    image

  2. Searching based on clnId
    image

  3. Searching based on referenceId
    image

  4. Search based on scope
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind-feature Issue or PR is a new feature request
Projects
None yet
6 participants