hololinked.client.security.APIKeySecurity
Bases: BaseModel
API Key Security Scheme.
The API key is added into a header named X-API-Key.
client = ClientFactory.http(
url="http://localhost:9000/my-thing/resources/wot-td",
security_scheme=APIKeySecurity(value=os.getenv("APIKEY", "default-api-key"))
)
Source code in repo/hololinked/hololinked/client/security.py
Attributes
http_header_name
class-attribute
instance-attribute
Name of the HTTP header to use for authentication, default is X-API-Key.
Override this if the server expects the API key in a different header.