Skip to content

Move IToken and IProvider::getToken to OCP #41017

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

Merged
merged 9 commits into from
Oct 23, 2023

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Oct 20, 2023

Summary

Move IToken to OCP and add getToken method in the IProvider already in OCP, so that applications can rely upon it.
I made it so that applications using the interfaces from OC do not have to change their code until they want to.

More method could/should be added to OCP\Authentication\Token\IProvider once the idea is approved. If you know which methods applications are using you can list them in the comments.

Checklist

@come-nc come-nc added this to the Nextcloud 28 milestone Oct 20, 2023
@come-nc come-nc self-assigned this Oct 20, 2023
@come-nc come-nc force-pushed the fix/move-token-iprovider-to-ocp branch from ce7bd52 to b82e25e Compare October 23, 2023 08:26
@come-nc come-nc force-pushed the fix/move-token-iprovider-to-ocp branch from 0202073 to 1bdf952 Compare October 23, 2023 09:15
Signed-off-by: Côme Chilliet <[email protected]>
@come-nc come-nc marked this pull request as ready for review October 23, 2023 11:20
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 23, 2023
@ChristophWurst ChristophWurst added the pending documentation This pull request needs an associated documentation update label Oct 23, 2023
@come-nc come-nc requested a review from nickvergessen October 23, 2023 13:52
* Set the timestamp of the last password check
* @since 28.0.0
*/
public function setLastCheck(int $time): void;
Copy link
Member

Choose a reason for hiding this comment

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

nit: do we need to expose setters as well our would read access be sufficient for the public API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it’s better to be able to deprecate the OC interface and avoid having to juggle with the two interfaces forever.
It would be pretty to have the setters in the OC but I fear it’s not worth the hassle.

@come-nc come-nc merged commit 5245d20 into master Oct 23, 2023
@come-nc come-nc deleted the fix/move-token-iprovider-to-ocp branch October 23, 2023 16:01
@come-nc come-nc removed the pending documentation This pull request needs an associated documentation update label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants