-
Notifications
You must be signed in to change notification settings - Fork 188
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
Question about Storage module #679
Comments
functions:
isAuthenticated: 'return !!request.auth'
isOwner: "return !!request.auth && userId === request.auth['user-id']"
validToken: 'return request.query.token === resource.Metadata.token'
paths:
/user/:userId/:
list: 'isOwner(userId)'
/user/:userId/:fileId:
read: 'isOwner(userId) || validToken()'
write: 'isOwner(userId)'
/public*:
read: 'true'
write: 'true' as you can see, about |
@cybaj thank you for your answer my question is how do I send the token? Like bearer token {'Authentication: 'Bearer '' for example? |
@chatzich you can use |
ok thank you for your answer I assume that the token is the token given by Hasura backend plus, right? |
So there is a fixed token for every file, am I correct? |
@chatzich Yes, you are. |
So I have to each token in database in order to retrieve it through hasura graphql server and after that use it to retrieve from hasura-backend-plus module, right? |
@chatzich Yes, I think so. You should store the token for the object file to get the file by token if you are not owner of the object file. |
I read the documentation and I see that the storage API requests do not demand a token in order to authenticate the user who is requesting the resource am I correct ? or did I misunderstand it?
The text was updated successfully, but these errors were encountered: