check • AI Agent SDK

check: Check authentication for a request.

check

Method

</div>

This is a method of the AuthProtocol class in the protocols module.

Check authentication for a request.

Signature

python
def check(request: Any) -> Dict[str, Any]

Parameters

ParamField Any

The request object to authenticate

Returns

ResponseField Dict[str, Any]
  • success: bool – whether authentication succeeded
  • user_id: Optional[str] – authenticated user ID
  • role: Optional[str] – user role/permissions
  • metadata: Dict[str, Any] – additional auth context

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3041