Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
jwt-verify - Skill - OpenSmartRoute
Skillv1.0.0
jwt-verify
Implement JWT verification middleware in FastAPI for user auth. Use when securing APIs or handling tokens.
Imported from diegosouzapw/awesome-omni-skill (skills/testing-security/jwt-verify-majiayu000/SKILL.md). Install upstream with npx skills add diegosouzapw/awesome-omni-skill --skill jwt-verify-majiayu000. Copyright stays with the author.
JWTVerify Instructions
Input: Request with Authorization header, shared secret.
Output: Verified user claims or 401 error.
Steps:
Install dependencies if needed (jose, fastapi-security).
Generate middleware code.
Example Code:
from fastapi import Depends, HTTPException
from jose import JWTError, jwt
from fastapi.security import HTTPBearer
security = HTTPBearer()
async def verify_jwt(token: str = Depends(security)):
try:
payload = jwt.decode(token.credentials, SECRET_KEY, algorithms=["HS256"])
return payload
except JWTError:
raise HTTPException(401, "Invalid token")
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slot
curl -s -X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.