Skip to content

Commit

Permalink
Merge pull request #77 from danielbolivar/main
Browse files Browse the repository at this point in the history
fix: update documentation to use correct package naming convention fo…
  • Loading branch information
koladev32 authored Dec 28, 2024
2 parents f310096 + d2d8708 commit b0d3c45
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/analytics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ To use the `ApiKeyAnalyticsMiddleware`, follow these setup instructions:
INSTALLED_APPS = (
...
"rest_framework",
"drf-simple-apikey",
"drf-simple-apikey.analytics", # Ensure this app is added
"drf_simple_apikey",
"drf_simple_apikey.analytics", # Ensure this app is added
)
2. Add the `ApiKeyAnalyticsMiddleware` to the `MIDDLEWARE` settings in your Django configuration.
Expand All @@ -50,7 +50,7 @@ To use the `ApiKeyAnalyticsMiddleware`, follow these setup instructions:
MIDDLEWARE = [
...
'django.middleware.security.SecurityMiddleware',
'drf-simple-apikey.analytics.middleware.ApiKeyAnalyticsMiddleware', # Add the middleware here
'drf_simple_apikey.analytics.middleware.ApiKeyAnalyticsMiddleware', # Add the middleware here
...
]
Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ file:
INSTALLED_APPS = [
# ...
"rest_framework",
"drf-simple-apikey",
"drf_simple_apikey",
]
3- Add the ``FERNET_KEY`` setting in your ``DRF_API_KEY``
Expand Down Expand Up @@ -88,7 +88,7 @@ permission class.
from rest_framework import viewsets
from drf-simple-apikey.backends import APIKeyAuthentication
from drf_simple_apikey.backends import APIKeyAuthentication
from rest_framework.response import Response
class FruitViewSets(viewsets.ViewSet):
Expand Down Expand Up @@ -125,4 +125,4 @@ Contributing
------------

See
`CONTRIBUTING.md <https://github.com/koladev32/drf-simple-apikey/blob/main/CONTRIBUTING.md>`__.
`CONTRIBUTING.md <https://github.com/koladev32/drf-simple-apikey/blob/main/CONTRIBUTING.md>`__.
4 changes: 2 additions & 2 deletions docs/permissions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ You can then call use this class in your view 👇

.. code:: python
from drf-simple-apikey.permissions import IsActiveEntity
from drf_simple_apikey.permissions import IsActiveEntity
class YourViewSet(viewsets.ViewSet):
...
authentication_classes = (APIKeyAuthentication, )
permission_classes = (IsActiveEntity, )
Feel free to read the code of the permission class at
`https://github.com/koladev32/drf-simple-apikey/blob/main/drf-simple-apikey/permissions.py <https://github.com/koladev32/drf-simple-apikey/blob/main/drf-simple-apikey/backends.py>`__.
`https://github.com/koladev32/drf-simple-apikey/blob/main/drf-simple-apikey/permissions.py <https://github.com/koladev32/drf-simple-apikey/blob/main/drf-simple-apikey/backends.py>`__.
8 changes: 4 additions & 4 deletions docs/rotation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Activation

Before activating a rotation, ensure to set the rotating Fernet key ``ROTATION_FERNET_SECRET`` in the settings of the package.

You will need to add the rotation app ``drf-simple-apikey.rotation`` in the ``INSTALLED_APPS`` Django setting of your project.
You will need to add the rotation app ``drf_simple_apikey.rotation`` in the ``INSTALLED_APPS`` Django setting of your project.

.. code-block:: python
INSTALLED_APPS=(
...
"rest_framework",
"drf-simple-apikey",
"drf-simple-apikey.rotation", # added app
"drf_simple_apikey",
"drf_simple_apikey.rotation", # added app
)
And you will need to run the migrate command:
Expand Down Expand Up @@ -102,4 +102,4 @@ Key Usage During Rotation
transition phase, ensuring that existing keys remain valid.

- **Encryption**: During rotation, new API keys are encrypted using the new key to ensure enhanced
security.
security.

0 comments on commit b0d3c45

Please sign in to comment.