Skip to content

add method to query all user auth tokens - #24686

Merged
PVince81 merged 1 commit into
masterfrom
query-user-authtokens
May 19, 2016
Merged

PVince81 merged 1 commit into
masterfrom
query-user-authtokens

Conversation

@ChristophWurst

Copy link
Copy Markdown
Contributor

required for #24675 and the personal settings page PR I'm working on

@MorrisJobke @PVince81 @nickvergessen @rullzer

@ChristophWurst ChristophWurst added this to the 9.1-current milestone May 18, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please dont chain everything.
execute() returns a different object, so please use a new variable.
also you should closeCursor() on that new object.

@nickvergessen

Copy link
Copy Markdown
Contributor

What happens if a user has thousands of devices? does it make sense to limit the return?
So we don't run into the same problem like we have with background jobs, where you
have 20k and your system runs out of memory.
Since we are introducing a new API here, we can easily say that it will only return the first ~1k entries

@ChristophWurst

Copy link
Copy Markdown
Contributor Author

What happens if a user has thousands of devices? does it make sense to limit the return?

Are you talking about simply not showing more than X entries or pagination? As discussed with @PVince81 yesterday, we think pagination won´t be needed here assuming users won't have 20k connected clients.

@ChristophWurst
ChristophWurst force-pushed the query-user-authtokens branch from 96c5094 to e88ad56 Compare May 18, 2016 10:10
@nickvergessen

Copy link
Copy Markdown
Contributor

Hard limit, this is only about an abuse case, but we want to make sure, that an abuser can still be listed and dealt with.

@ChristophWurst

Copy link
Copy Markdown
Contributor Author

@nickvergessen what kind of abuse are you talking about? Someone creating a large number of tokens?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not match interface

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which interface?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its missing the warning

 * The provider may limit the number of result rows in case of an abuse
 * where a high number of (session) tokens is generated

If you don't want to repeat yourself, use

/**
 * {@inheritdoc}
 */

https://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.inlineinheritdoc.pkg.html

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check again, there is no interface the mapper implements. DefaultTokenProvider implements IProvider and has the right doc block 😉

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I ment lib/private/Authentication/Token/DefaultTokenProvider.php well then copy the doc lines from there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added…

@ChristophWurst
ChristophWurst force-pushed the query-user-authtokens branch 3 times, most recently from ec0dd9c to 2572192 Compare May 18, 2016 12:21
@nickvergessen

Copy link
Copy Markdown
Contributor

Looks good now 👍

@ChristophWurst ChristophWurst mentioned this pull request May 18, 2016
6 tasks done
@MorrisJobke

Copy link
Copy Markdown
Contributor

Looks really good 👍

@PVince81

Copy link
Copy Markdown
Contributor

Come on, Jenkins. 4 hours and still no results ?

@ChristophWurst mind rebasing and repushing to kick his butt ?

@ChristophWurst
ChristophWurst force-pushed the query-user-authtokens branch from 946d330 to 0626578 Compare May 18, 2016 16:24
@ChristophWurst

Copy link
Copy Markdown
Contributor Author

kick his butt

kicked

@PVince81
PVince81 merged commit e1a9a26 into master May 19, 2016
@PVince81
PVince81 deleted the query-user-authtokens branch May 19, 2016 08:28
@lock

lock Bot commented Aug 5, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants