A small repo to provide functions to authenticate against SalesForce.
Project description
SalesForce JWT Auth
A small python module to use server client auth against SalesForce
Installation
python -m pip install git+https://gitlab.com/Rehket/salesforce-jwt.git
Usage
import sfjwt
import requests
# With environment variables set:
instance_url, bearer_token = sfjwt.get_login()
# or if you just want to pass them:
#instance_url, bearer_token = sfjwt.jwt_login(
# consumer_id="my_connected_app_consumer_id",
# username="my_sfdc_user_id_that_is_preauthorized@sfdc.com",
# private_key="my_connected_app_private_key",
# environment="(sandbox|production)",
#)
# Make a request.
my_headers = {"Accept": "application/json", "Authorization": f"Bearer {bearer_token}"}
my_instance_data = requests.post(f"https://{instance_url}//services/data/v46.0/", headers = my_headers)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sfjwt-1.0.1.tar.gz
(2.7 kB
view details)
File details
Details for the file sfjwt-1.0.1.tar.gz.
File metadata
- Download URL: sfjwt-1.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3c2644577f97fe1ca3dd08b70673e365b16bef6e85a39732e5a977667ccfb52
|
|
| MD5 |
cd493d176b312524bc0302bb6840b631
|
|
| BLAKE2b-256 |
5f918725325ae72b22a2d15565b4853b5796fa6da630bad1777f616f176bfc6f
|