This repository was archived by the owner on Oct 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Add sessionToken as constructor option #8
Open
achimkoellner
wants to merge
121
commits into
tenorviol:master
Choose a base branch
from
achimkoellner:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find function
… objects in queries as well as base objects
Session tokens only work with the rest api key. While using the master key you can edit all data anyway.
Parse.test.js runs tests against the master key, while testRestApiKey.js runs tests against the rest api key to test sesstion tokens for users.
getUser and getFileByUser now redirect to their respective newer version while logging a warning message to the console. Also removes one console.log from Parse.test.js and adds one more contributor.
Optimizes and adds some methods
allow posting arbitrary data to /installations
patch for utf-8 search
I read somewhere that this is better and it has personally prevented the "[Error: getaddrinfo ENOTFOUND api.parse.com]" error I get occasionally.
Changed the parse options variable "host" field to "hostname"
feat(user): allow user logout
Without a timeout set, the socket can "hang" waiting for a response.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd love to use node-parse-api with a logged-in user. The node server receives a sessionToken from the client and performs database operations on behalf of that session.
For that purpose the session_token (besides app_key and api_key) can be passed to the constructor.
If no sessionToken is passed to the parseRequest method by argument, the method checks if the constructor options contain a session_token value and sends an X-Parse-Session-Token header with the request.
This allows e.g. to find objects of classes that are restricted to be read by only that user (or role).