pub enum AuthType {
SessionToken,
MasterKey,
RestApiKey,
NoAuth,
}
Expand description
Specifies the type of authentication credentials to be used for an API request.
This enum helps determine which keys or tokens are prioritized when constructing the headers for a request to the Parse Server.
Variants§
SessionToken
Use the current session token. This is typically obtained after a user logs in. If no session token is available, the request might fail or use other credentials based on client configuration.
MasterKey
Use the Master Key. This key bypasses all ACLs and Class-Level Permissions. It should be used sparingly and kept secure.
RestApiKey
Use the REST API Key. If the REST API Key is not configured on the client, it may fall back to using the JavaScript Key if that is configured. This key is typically used for general API access from trusted server environments.
NoAuth
No specific authentication to be actively chosen for this request.
The request will rely on the default headers configured in the Parse
(e.g., Application ID, and potentially a pre-configured JavaScript Key or REST API Key if no Master Key was set globally).
This is suitable for operations that don’t require user context or elevated privileges,
such as public data queries or user signup/login endpoints themselves.