Client API Key Schema (schemas/client_api_key.py)

MIRIX · auth, Auth / Identity, api-key, client, schema, security

Schema for client API keys, including hashed storage, permission levels, and lifecycle timestamps for secure access control.

# Source: https://github.com/mperkins0155/MIRIX | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
from datetime import datetime
from typing import Optional

from pydantic import Field

from mirix.helpers.datetime_helpers import get_utc_time
from mirix.schemas.mirix_base import MirixBase


class ClientApiKeyBase(MirixBase):
    __id_prefix__ = "client_api_key"


class ClientApiKey(ClientApiKeyBase):
    """
    Representation of a client API key.

    Parameters:
        id (str): The unique identifier of the API key.
        client_id (str): The client this API key belongs to.
        organization_id (str): The organization id.
        api_key_hash (str): The hashed API key.
        

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key