Metadata-Version: 2.4
Name: fastapi-authz-lite
Version: 0.1.0
Summary: fastapi-authz-lite: plug-and-play authentication for FastAPI (JWT, password hashing, dependencies).
Author: Kubenew
License: MIT
Project-URL: Homepage, https://github.com/Kubenew/fastapi-auth-kit
Project-URL: Repository, https://github.com/Kubenew/fastapi-auth-kit
Keywords: fastapi,auth,jwt,security,rbac
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.100.0
Requires-Dist: starlette>=0.27.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-jose>=3.3.0
Requires-Dist: passlib[bcrypt]>=1.7.4
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: httpx>=0.24.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Dynamic: license-file

# fastapi-auth-kit

`fastapi-auth-kit` provides plug-and-play authentication for FastAPI.

## Features (v0.1.0)

- JWT access token creation + verification
- Password hashing (bcrypt)
- FastAPI dependency: `require_user()`

Refresh tokens + OAuth planned for v0.2+.

## Install

```bash
pip install fastapi-auth-kit
```

## Quick example

```python
from fastapi import FastAPI, Depends
from fastapi_auth_kit import AuthKit, AuthConfig

app = FastAPI()

auth = AuthKit(AuthConfig(secret_key="supersecret"))

@app.post("/login")
def login(username: str):
    token = auth.create_access_token({"sub": username})
    return {"access_token": token}

@app.get("/me")
def me(user=Depends(auth.require_user())):
    return user
```

## License
MIT
