Comments (5)
@alex-kowalczyk Is there any MJML backed that uses API Keys or OAuth2?
from django-mjml.
@liminspace I don't think that backends support that authentication directly, but it is quite common for self-hosted setups to host services behind authentication proxy, for instance with OAuth2-based JWTs in Google Cloud. Custom transport allowing to plug any authentication would be useful to integrate with such self-hosted backends.
from django-mjml.
@liminspace would you be open for a PR for this?
We are hosting the MJML function in AWS Lambda with an API Gateway and one easy way to limit access to it would be to add ApiKey Auth.
There are 2 ways I seed that could handle this use-case:
- adding a different key to the settings (like API_KEY) and simply add it to the headers in https://github.com/liminspace/django-mjml/blob/main/mjml/tools.py#L119 (but this would be maybe too specific)
- allow HTTP_AUTH to be whatever is accepted by requests, and not just a tuple.
I think the 2nd solution would be easy to implement and non-breakable. If you’re willing to consider it, I can propose a PR.
from django-mjml.
@Alexerson sure, you can show your solution and I'll take it in implementing the feature
from django-mjml.
Thanks. See PR.
from django-mjml.
Related Issues (20)
- Add support for Django 3.1 HOT 1
- MJML tags not being recognized HOT 3
- How to use with blocks? HOT 1
- MJML compiler in TCP mode failing in CI on bitbucket HOT 10
- Custom backend feature HOT 6
- Add support for django 3.2 HOT 7
- Mock httpserver HOT 2
- Dont start the server with django-mjml. HOT 3
- MJML compile error (via MJML TCP server): no working server HOT 6
- Update to support Django 4.0 HOT 4
- Does mjml support blocks in templates ? HOT 1
- Possibility to render *.mjml templates to *.html templates HOT 1
- tcpserver.js removed in 1.0 release but is still in docs HOT 2
- Support django 4.2 HOT 1
- MJML server received too many data error firing and not sure why HOT 9
- Allow `check_mjml_command()` to be skipped on app start HOT 1
- Message in stderr is breaking django-mjml HOT 7
- mj-include doesn't work HOT 1
- Getting timeouts since 0.8.0 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-mjml.