Using custom request
See original GitHub issueHi, Is there a way to access the request session that makes the call to salesforce in a view?
I am trying to use this package with OpenId credentials. Ultimately would like to do something like this:
def my_accounts(request):
session = requests.Session()
session.headers.update(...)
Account.objects(session=session).all()
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to Use custom request (make:request)? (laravel) Method ...
In ProfileRequest change extends FormRequest to extends Request . Then add use Illuminate\Http\Request; above the class.
Read more >Validation - Laravel - The PHP Framework For Web Artisans
By reading this high-level overview, you'll be able to gain a good general understanding of how to validate incoming request data using Laravel: ......
Read more >How to Create Custom Form Request Validations in Laravel ...
This tutorial describes how to create and use custom Form Request validation in your Laravel (5.8 or 6+) projects.
Read more >Create a Custom Request | API Connector - Mixed Analytics
In this article, we'll walk through how to create a custom request using the API Connector add-on for Google Sheets. If you'd prefer...
Read more >Custom Request and APIRoute class - FastAPI
Let's see how to make use of a custom Request subclass to decompress gzip requests. And an APIRoute subclass to use that custom...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is exactly what “dynamic authentication” does:
It is regularly tested by
tests/test_dynamic_auth/tests.py
.It should be thread safe to use different tokens/organizations in different in individual threads. That was tested manually four years ago, but no automated test exists.
Three years ago I wrote also a modified general
SalesforceAuth
that can work with a custom authentication class configurable by DATABASES settings, not on only the default SalesforcePasswordAuth or a direct work with tokens by auth.dynamic_start(), e.g. a class for interactive authentication by “Force.com CLI” by web browser, useful for development with Salesforce, without saving a password anywhere. It is not a part of production repository still and it is little obsoleted because SFDX is probably a better option now. If that solution would be committed then the dynamic auth probably will have to be enabled in settings to work.Thanks @philchristensen and @hynekcer, that does trick.