Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
dreiattest leverages pyttest and integrates it into django. It handles routing, different config options and persistence of tokens and public keys. To use dreiAttest you need to use the corresponing libraries for iOS and Android / Kotlin Multiplatform.
dreiAttest is available on PyPI and can be installed via $ python -m pip install dreiattest-django
.
After the installation make sure to add dreiattest
to your INSTALLED_APPS
and trigger all migrations
with python manage.py migrate dreiattest
. Also, you need to register the default endpoints in your urls.py
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('dreiattest.urls')),
...
]
There are multiple settings you can and or have to set in your settings.py. The following are mandatory:
DREIATTEST_APPLE_APPID
DREIATTEST_GOOGLE_APK_NAME
, DREIATTEST_GOOGLE_APK_CERTIFICATE_DIGEST
DREIATTEST_GOOGLE_APK_NAME
, DREIATTEST_GOOGLE_DECRYPTION_KEY
, DREIATTEST_GOOGLE_VERIFICATION_KEY
which can be generated as described hereThese are all the possible config values and what they do.
BasePlugin
- gives you the option to handle extra verificationYou can find the default value (if any) for each of them in the settings.py
All that's left is to add the signature_required
view decorator.
from dreiattest.decorators import signature_required
@signature_required()
def demo(request: WSGIRequest):
return JsonResponse({'foo': 'bar'})
The main two exceptions that should be handled by you are PyAttestException
and DreiAttestException
. dreiattest ships with the HandleDreiattestExceptionsMiddleware
you could use if you don't want to handle those errors by yourself. The middleware only catches those two exception classes and returns a JsonResponse
with status code 400.
MIDDLEWARE = [
...
'dreiattest.middlewares.HandleDreiattestExceptionsMiddleware',
]
@signature_required
. The request holds an assertion which will be verified before the actual django view is executed.master
for possible pull requests__version__.py
$ pipenv run upload
- This will automatically create and push the correct tag in git and upload that version to pypiFAQs
Unknown package
We found that django-dreiattest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.