Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
33 changes: 33 additions & 0 deletions airbyte_cdk/sources/declarative/declarative_component_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3064,6 +3064,39 @@ definitions:
The DeclarativeOAuth Specific string of the scopes needed to be grant for authenticated user.
examples:
- user:read user:read_orders workspaces:read
scopes:
title: Scopes
type: array
items:
type: string
description: |-
The DeclarativeOAuth Specific list of scopes needed to be granted for the authenticated user.
When present, takes precedence over the `scope` string property.
The scopes are joined using the `scopes_join_strategy` (default: space) before being
sent to the OAuth provider.
examples:
- ["user:read", "user:write"]
optional_scopes:
title: Optional Scopes
type: array
items:
type: string
description: |-
The DeclarativeOAuth Specific list of optional scopes to request from the OAuth provider.
These scopes may or may not be granted depending on the provider and user consent.
examples:
- ["admin:read"]
scopes_join_strategy:
title: Scopes Join Strategy
type: string
enum:
- space
- comma
- plus
default: space
description: |-
The strategy used to join the `scopes` array into a single string for the OAuth request.
Defaults to `space` per RFC 6749.
Comment thread
aldogonzalez8 marked this conversation as resolved.
access_token_url:
title: Access Token URL
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ class AuthFlowType(Enum):
oauth1_0 = "oauth1.0"


class ScopesJoinStrategy(Enum):
space = "space"
comma = "comma"
plus = "plus"


class BasicHttpAuthenticator(BaseModel):
type: Literal["BasicHttpAuthenticator"]
username: str = Field(
Expand Down Expand Up @@ -846,6 +852,23 @@ class Config:
examples=["user:read user:read_orders workspaces:read"],
title="Scopes",
)
scopes: Optional[List[str]] = Field(
None,
description="The DeclarativeOAuth Specific list of scopes needed to be granted for the authenticated user.\nWhen present, takes precedence over the `scope` string property.\nThe scopes are joined using the `scopes_join_strategy` (default: space) before being\nsent to the OAuth provider.",
examples=[["user:read", "user:write"]],
title="Scopes",
)
optional_scopes: Optional[List[str]] = Field(
None,
description="The DeclarativeOAuth Specific list of optional scopes to request from the OAuth provider.\nThese scopes may or may not be granted depending on the provider and user consent.",
examples=[["admin:read"]],
title="Optional Scopes",
)
scopes_join_strategy: Optional[ScopesJoinStrategy] = Field(
ScopesJoinStrategy.space,
description="The strategy used to join the `scopes` array into a single string for the OAuth request.\nDefaults to `space` per RFC 6749.",
title="Scopes Join Strategy",
)
Comment thread
aldogonzalez8 marked this conversation as resolved.
access_token_url: str = Field(
...,
description="The DeclarativeOAuth Specific URL templated string to obtain the `access_token`, `refresh_token` etc.\nThe placeholders are replaced during the processing to provide neccessary values.",
Expand Down
Loading