Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions docs/api/core/utcp/data/auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: auth
sidebar_label: auth
---

# auth

**File:** `core/src/utcp/data/auth.py`

### class Auth {#auth}

<details>
<summary>Documentation</summary>

Authentication details for a provider.


**Attributes**

- **`auth_type`**: The authentication type identifier.
</details>

#### Fields:

- auth_type: str

---

### class AuthSerializer ([Serializer](./../interfaces/serializer.md#serializer)[Auth]) {#authserializer}

<details>
<summary>Documentation</summary>

[Serializer](./../interfaces/serializer.md#serializer) for authentication details.

Defines the contract for serializers that convert authentication details to and from

**Dictionaries For Storage Or Transmission. Serializers Are Responsible For**

- Converting authentication details to dictionaries for storage or transmission
- Converting dictionaries back to authentication details
- Ensuring data consistency during serialization and deserialization
</details>

#### Fields:

- auth_serializers: dict[str, [Serializer](./../interfaces/serializer.md#serializer)[Auth]]

#### Methods:

<details>
<summary>to_dict(self, obj: Auth) -> dict</summary>

Convert an Auth object to a dictionary.


**Args**

- **`obj`**: The Auth object to convert.



**Returns**

The dictionary converted from the Auth object.
</details>

<details>
<summary>validate_dict(self, obj: dict) -> Auth</summary>

Validate a dictionary and convert it to an Auth object.


**Args**

- **`obj`**: The dictionary to validate and convert.



**Returns**

The Auth object converted from the dictionary.
</details>

---
80 changes: 80 additions & 0 deletions docs/api/core/utcp/data/auth_implementations/api_key_auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: api_key_auth
sidebar_label: api_key_auth
---

# api_key_auth

**File:** `core/src/utcp/data/auth_implementations/api_key_auth.py`

### class ApiKeyAuth ([Auth](./../auth.md#auth)) {#apikeyauth}

<details>
<summary>Documentation</summary>

Authentication using an API key.

The key can be provided directly or sourced from an environment variable.
Supports placement in headers, query parameters, or cookies.


**Attributes**

- **`auth_type`**: The authentication type identifier, always "api_key".
- **`api_key`**: The API key for authentication. Values starting with '$' or formatted as '$\{\}' are
treated as an injected variable from environment or configuration.
- **`var_name`**: The name of the header, query parameter, or cookie that
contains the API key.
- **`location`**: Where to include the API key (header, query parameter, or cookie).
</details>

#### Fields:

- auth_type: Literal['api_key']
- api_key: str
- var_name: str
- location: Literal['header', 'query', 'cookie']

---

### class ApiKeyAuthSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[ApiKeyAuth]) {#apikeyauthserializer}

*No class documentation available*

#### Methods:

<details>
<summary>to_dict(self, obj: ApiKeyAuth) -> dict</summary>

Convert an ApiKeyAuth object to a dictionary.


**Args**

- **`obj`**: The ApiKeyAuth object to convert.



**Returns**

The dictionary converted from the ApiKeyAuth object.
</details>

<details>
<summary>validate_dict(self, obj: dict) -> ApiKeyAuth</summary>

Validate a dictionary and convert it to an ApiKeyAuth object.


**Args**

- **`obj`**: The dictionary to validate and convert.



**Returns**

The ApiKeyAuth object converted from the dictionary.
</details>

---
76 changes: 76 additions & 0 deletions docs/api/core/utcp/data/auth_implementations/basic_auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: basic_auth
sidebar_label: basic_auth
---

# basic_auth

**File:** `core/src/utcp/data/auth_implementations/basic_auth.py`

### class BasicAuth ([Auth](./../auth.md#auth)) {#basicauth}

<details>
<summary>Documentation</summary>

Authentication using HTTP Basic Authentication.

Uses the standard HTTP Basic Authentication scheme with username and password
encoded in the Authorization header.


**Attributes**

- **`auth_type`**: The authentication type identifier, always "basic".
- **`username`**: The username for basic authentication. Recommended to use injected variables.
- **`password`**: The password for basic authentication. Recommended to use injected variables.
</details>

#### Fields:

- auth_type: Literal['basic']
- username: str
- password: str

---

### class BasicAuthSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[BasicAuth]) {#basicauthserializer}

*No class documentation available*

#### Methods:

<details>
<summary>to_dict(self, obj: BasicAuth) -> dict</summary>

Convert a BasicAuth object to a dictionary.


**Args**

- **`obj`**: The BasicAuth object to convert.



**Returns**

The dictionary converted from the BasicAuth object.
</details>

<details>
<summary>validate_dict(self, obj: dict) -> BasicAuth</summary>

Validate a dictionary and convert it to a BasicAuth object.


**Args**

- **`obj`**: The dictionary to validate and convert.



**Returns**

The BasicAuth object converted from the dictionary.
</details>

---
80 changes: 80 additions & 0 deletions docs/api/core/utcp/data/auth_implementations/oauth2_auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: oauth2_auth
sidebar_label: oauth2_auth
---

# oauth2_auth

**File:** `core/src/utcp/data/auth_implementations/oauth2_auth.py`

### class OAuth2Auth ([Auth](./../auth.md#auth)) {#oauth2auth}

<details>
<summary>Documentation</summary>

Authentication using OAuth2 client credentials flow.

Implements the OAuth2 client credentials grant type for machine-to-machine
authentication. The client automatically handles token acquisition and refresh.


**Attributes**

- **`auth_type`**: The authentication type identifier, always "oauth2".
- **`token_url`**: The URL endpoint to fetch the OAuth2 access token from. Recommended to use injected variables.
- **`client_id`**: The OAuth2 client identifier. Recommended to use injected variables.
- **`client_secret`**: The OAuth2 client secret. Recommended to use injected variables.
- **`scope`**: Optional scope parameter to limit the access token's permissions.
</details>

#### Fields:

- auth_type: Literal['oauth2']
- token_url: str
- client_id: str
- client_secret: str
- scope: Optional[str]

---

### class OAuth2AuthSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[OAuth2Auth]) {#oauth2authserializer}

*No class documentation available*

#### Methods:

<details>
<summary>to_dict(self, obj: OAuth2Auth) -> dict</summary>

Convert an OAuth2Auth object to a dictionary.


**Args**

- **`obj`**: The OAuth2Auth object to convert.



**Returns**

The dictionary converted from the OAuth2Auth object.
</details>

<details>
<summary>validate_dict(self, obj: dict) -> OAuth2Auth</summary>

Validate a dictionary and convert it to an OAuth2Auth object.


**Args**

- **`obj`**: The dictionary to validate and convert.



**Returns**

The OAuth2Auth object converted from the dictionary.
</details>

---
Loading
Loading