LaneAuth#

class ansys.aedt.mcp.lanes.client.LaneAuth(token: str | None)#

Bases: httpx2.Auth

Send a lane bearer token and record whether the lane rejected it.

The MCP client turns an HTTP 401 into a generic error, so the status is captured here, where the raw response is still visible.

Parameters:
tokenstr, optional

Bearer token. When None, no Authorization header is sent.

Overview#

auth_flow

Add the bearer token and inspect the response.

Import detail#

from ansys.aedt.mcp.lanes.client import LaneAuth

Attribute detail#

LaneAuth.rejected = False#

Method detail#

LaneAuth.auth_flow(request: httpx2.Request) → collections.abc.Generator[httpx2.Request, httpx2.Response, None]#

Add the bearer token and inspect the response.

Parameters:
requesthttpx2.Request

Outgoing request.

Yields:
httpx2.Request

The authenticated request.