Skip to content

Support for specific hasher for API Keys (API_KEY_HASHERS) #39

@lucasrcezimbra

Description

@lucasrcezimbra

Currently, ninja-api-key uses settings.PASSWORD_HASHERS to hash and verify API keys. It couples API key hashing with Django's password authentication system.

There are scenarios where a developer may want to use a faster (but less secure) hasher only for API keys without weakening password security for user authentication.

Proposal: Introduce support for a separate setting: API_KEY_HASHERS. When defined, ninja-api-key should use settings.API_KEY_HASHERS; if not defined, it falls back to settings.PASSWORD_HASHERS to maintain current behavior and backward compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions