Skip to content

Commit b97b320

Browse files
feat: Include login_url in managed auth connection response
1 parent f2ca26e commit b97b320

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 104
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-f7024f4171c7c4ec558de1c27f338b1089ffddd0d2dbfdb9bb9f9c2abe8f47bf.yml
3-
openapi_spec_hash: ced43682b49e73a2862f99b49abb4fcd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ac10847d991ef8ed89124b5550922cb5726af2b4a4c3396ee6ff82938302fc25.yml
3+
openapi_spec_hash: 0d902563108fe2461708c05336eab40a
44
config_hash: 16e4457a0bb26e98a335a1c2a572290a

src/kernel/resources/auth/connections.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,15 @@ def create(
7676
) -> ManagedAuth:
7777
"""Creates an auth connection for a profile and domain combination.
7878
79-
Returns 409
80-
Conflict if an auth connection already exists for the given profile and domain.
79+
If the provided
80+
profile_name does not exist, it is created automatically. Returns 409 Conflict
81+
if an auth connection already exists for the given profile and domain.
8182
8283
Args:
8384
domain: Domain for authentication
8485
85-
profile_name: Name of the profile to manage authentication for
86+
profile_name: Name of the profile to manage authentication for. If the profile does not exist,
87+
it is created automatically.
8688
8789
allowed_domains: Additional domains valid for this auth flow (besides the primary domain). Useful
8890
when login pages redirect to different domains.
@@ -537,13 +539,15 @@ async def create(
537539
) -> ManagedAuth:
538540
"""Creates an auth connection for a profile and domain combination.
539541
540-
Returns 409
541-
Conflict if an auth connection already exists for the given profile and domain.
542+
If the provided
543+
profile_name does not exist, it is created automatically. Returns 409 Conflict
544+
if an auth connection already exists for the given profile and domain.
542545
543546
Args:
544547
domain: Domain for authentication
545548
546-
profile_name: Name of the profile to manage authentication for
549+
profile_name: Name of the profile to manage authentication for. If the profile does not exist,
550+
it is created automatically.
547551
548552
allowed_domains: Additional domains valid for this auth flow (besides the primary domain). Useful
549553
when login pages redirect to different domains.

src/kernel/types/auth/connection_create_params.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class ConnectionCreateParams(TypedDict, total=False):
1414
"""Domain for authentication"""
1515

1616
profile_name: Required[str]
17-
"""Name of the profile to manage authentication for"""
17+
"""Name of the profile to manage authentication for.
18+
19+
If the profile does not exist, it is created automatically.
20+
"""
1821

1922
allowed_domains: SequenceNotStr[str]
2023
"""Additional domains valid for this auth flow (besides the primary domain).

src/kernel/types/auth/managed_auth.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ class ManagedAuth(BaseModel):
215215
live_view_url: Optional[str] = None
216216
"""Browser live view URL for debugging (present when flow in progress)"""
217217

218+
login_url: Optional[str] = None
219+
"""Optional login page URL to skip discovery"""
220+
218221
mfa_options: Optional[List[MfaOption]] = None
219222
"""
220223
MFA method options (present when flow_step=awaiting_input and MFA selection

0 commit comments

Comments
 (0)