-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
App-Dev: how to implement token in app #17596
Comments
@nickvergessen are you a good partner for this request? |
as sharing is the core part, a more flexible oc_share approach would sound good to me to reuse all logic including automatic expiration & co |
@rullzer |
Implement your own logic. We used to have it all in one place but this became full of hacks. |
Yeah, talk also has the logic in it's own place. Just much simpler and easier to adjust in case it's needed |
Hello, I think more flexibility in the oc_share table for not only the 2 types would be a good start |
We really had exactly that in the past. But it is just not suitable, which is why when the calendar/contacts backend was redone, it was moved to it's own table. A "logonscreen" is as easy as: When oc_share contains shares from all the apps, we can not clean it up easily anymore. permissions might or might not work in the same way they do for file, *_id files being integers might be the next problem etc. The list is just too long and you would have to put a lot of effort in the sharing thing additionally causing lots of compatibility issues with the existing users of the API. |
@Rello note that you can use the This means you then just have to verify token (and password) if needed. |
Hello @nickvergessen BUT: for some reason the session-part is the only that that is not working. the password seems not to be stored in the session. Do I need to initialise the session usage somewhere? thank you |
You need to add the |
sweet. thank you so much. one more - could not find it in Talk: But the authentication.php password form triggers a POST to the same page and the route can only have one entry. Talk has the same setup, but I could not figure out how you got it working because it also only offers
|
Talk is hardcoded in the server, to allow us to use short links without apps/spreed inside: Lines 96 to 97 in 9237350
So yeah, just define a POST route too and it should work |
do you use unique method names? That is important I think. |
It took me 1 night to understand your answer;-) |
Thank you @nickvergessen for helping out. Everything is working now |
Hi, |
Hello NC masters,
I am working on a new app. this is providing a public page. A token will be used to "hide" the content to be shown. I investigated existing apps...
I found
$this->shareManager->newShare();
(used infile_sharing ShareAPIController
).This is using
IManager
to create a token and store it inoc_share
table.This standard API seems pretty usable!
BUT:
IManager
only knows 2 types "file" and "folder", so I am not sure if this is the correct way to misuse this for an own app, where the share is not linked tofiles
.The alternative would be to implement an own token-api-logic in my app and store it in an app-specific
_share
table, but I like the standard API approachAny advice?
thank you and keep up NC!
The text was updated successfully, but these errors were encountered: