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

List tokens does not support/observe paging from the server #31

Open
jimbrowne opened this issue Jan 23, 2018 · 2 comments
Open

List tokens does not support/observe paging from the server #31

jimbrowne opened this issue Jan 23, 2018 · 2 comments

Comments

@jimbrowne
Copy link

Per the API docs the /token API call is paged. It appears that the default page size might be 10, so for any system with more tokens than 10 a /usr/bin/privacyidea --url URL -a administrator token list will only list 10 tokens.

I don't see any support in the client lib for paging and I have not reviewed the API docs to see if other calls are paged, so I don't know if the best route is generic support for paging.

If there is no internal momentum on this project I might be able to provide code to solve this issue.

@cornelinux
Copy link
Member

You are right. The admin client currently will only list the first 10 tokens.
But: you can always filter the tokens and thus get "other ten tokens".

privacyidea -U https://localhost/pi --nosslcheck --admin=super token list --serial='OATH001*'

or

privacyidea -U https://localhost/pi --nosslcheck --admin=super token list --user=cornelius

You are welcome to suggest some adaptions or do a pull request.

@cornelinux
Copy link
Member

Take a look at this blog post https://www.privacyidea.org/create-user-portal/
to get an idea how to use httpie to also grab your tokens via the API.

Cool tool. Also comes with colors ;-)

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