from drf_spectacular.extensions import OpenApiAuthenticationExtension


class AccountJWTScheme(OpenApiAuthenticationExtension):
    target_class = "users.authentication.AccountJWTAuthentication"
    name = "jwtAuth"

    def get_security_definition(self, auto_schema):
        return {"type": "http", "scheme": "bearer", "bearerFormat": "JWT"}
