Skip to content

Commit 795989c

Browse files
feat: Include login_url in managed auth connection response
1 parent 91f2aa6 commit 795989c

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

.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

authconnection.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ func NewAuthConnectionService(opts ...option.RequestOption) (r AuthConnectionSer
4646
return
4747
}
4848

49-
// Creates an auth connection for a profile and domain combination. Returns 409
50-
// Conflict if an auth connection already exists for the given profile and domain.
49+
// Creates an auth connection for a profile and domain combination. If the provided
50+
// profile_name does not exist, it is created automatically. Returns 409 Conflict
51+
// if an auth connection already exists for the given profile and domain.
5152
func (r *AuthConnectionService) New(ctx context.Context, body AuthConnectionNewParams, opts ...option.RequestOption) (res *ManagedAuth, err error) {
5253
opts = slices.Concat(r.Options, opts)
5354
path := "auth/connections"
@@ -292,6 +293,8 @@ type ManagedAuth struct {
292293
LastAuthAt time.Time `json:"last_auth_at" format:"date-time"`
293294
// Browser live view URL for debugging (present when flow in progress)
294295
LiveViewURL string `json:"live_view_url" api:"nullable" format:"uri"`
296+
// Optional login page URL to skip discovery
297+
LoginURL string `json:"login_url" format:"uri"`
295298
// MFA method options (present when flow_step=awaiting_input and MFA selection
296299
// required)
297300
MfaOptions []ManagedAuthMfaOption `json:"mfa_options" api:"nullable"`
@@ -332,6 +335,7 @@ type ManagedAuth struct {
332335
HostedURL respjson.Field
333336
LastAuthAt respjson.Field
334337
LiveViewURL respjson.Field
338+
LoginURL respjson.Field
335339
MfaOptions respjson.Field
336340
PendingSSOButtons respjson.Field
337341
PostLoginURL respjson.Field
@@ -544,7 +548,8 @@ func (r *ManagedAuthSignInOption) UnmarshalJSON(data []byte) error {
544548
type ManagedAuthCreateRequestParam struct {
545549
// Domain for authentication
546550
Domain string `json:"domain" api:"required"`
547-
// Name of the profile to manage authentication for
551+
// Name of the profile to manage authentication for. If the profile does not exist,
552+
// it is created automatically.
548553
ProfileName string `json:"profile_name" api:"required"`
549554
// Interval in seconds between automatic health checks. When set, the system
550555
// periodically verifies the authentication status and triggers re-authentication

0 commit comments

Comments
 (0)