Skip to content

Commit

Permalink
feat: OpenAPI spec update via Stainless API (#1550)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 12, 2024
1 parent 2991edd commit 4ba8991
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
102 changes: 102 additions & 0 deletions zero_trust/identityprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,15 @@ type AccessIdentityProvidersAccessAzureAdConfig struct {
DirectoryID string `json:"directory_id"`
// The claim name for email in the id_token response.
EmailClaimName string `json:"email_claim_name"`
// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
Prompt AccessIdentityProvidersAccessAzureAdConfigPrompt `json:"prompt"`
// Should Cloudflare try to load groups from your account
SupportGroups bool `json:"support_groups"`
JSON accessIdentityProvidersAccessAzureAdConfigJSON `json:"-"`
Expand All @@ -295,6 +304,7 @@ type accessIdentityProvidersAccessAzureAdConfigJSON struct {
ConditionalAccessEnabled apijson.Field
DirectoryID apijson.Field
EmailClaimName apijson.Field
Prompt apijson.Field
SupportGroups apijson.Field
raw string
ExtraFields map[string]apijson.Field
Expand All @@ -308,6 +318,22 @@ func (r accessIdentityProvidersAccessAzureAdConfigJSON) RawJSON() string {
return r.raw
}

// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
type AccessIdentityProvidersAccessAzureAdConfigPrompt string

const (
AccessIdentityProvidersAccessAzureAdConfigPromptLogin AccessIdentityProvidersAccessAzureAdConfigPrompt = "login"
AccessIdentityProvidersAccessAzureAdConfigPromptSelectAccount AccessIdentityProvidersAccessAzureAdConfigPrompt = "select_account"
AccessIdentityProvidersAccessAzureAdConfigPromptNone AccessIdentityProvidersAccessAzureAdConfigPrompt = "none"
)

// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
Expand Down Expand Up @@ -2339,6 +2365,15 @@ type IdentityProviderListResponseAccessAzureAdConfig struct {
DirectoryID string `json:"directory_id"`
// The claim name for email in the id_token response.
EmailClaimName string `json:"email_claim_name"`
// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
Prompt IdentityProviderListResponseAccessAzureAdConfigPrompt `json:"prompt"`
// Should Cloudflare try to load groups from your account
SupportGroups bool `json:"support_groups"`
JSON identityProviderListResponseAccessAzureAdConfigJSON `json:"-"`
Expand All @@ -2353,6 +2388,7 @@ type identityProviderListResponseAccessAzureAdConfigJSON struct {
ConditionalAccessEnabled apijson.Field
DirectoryID apijson.Field
EmailClaimName apijson.Field
Prompt apijson.Field
SupportGroups apijson.Field
raw string
ExtraFields map[string]apijson.Field
Expand All @@ -2366,6 +2402,22 @@ func (r identityProviderListResponseAccessAzureAdConfigJSON) RawJSON() string {
return r.raw
}

// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
type IdentityProviderListResponseAccessAzureAdConfigPrompt string

const (
IdentityProviderListResponseAccessAzureAdConfigPromptLogin IdentityProviderListResponseAccessAzureAdConfigPrompt = "login"
IdentityProviderListResponseAccessAzureAdConfigPromptSelectAccount IdentityProviderListResponseAccessAzureAdConfigPrompt = "select_account"
IdentityProviderListResponseAccessAzureAdConfigPromptNone IdentityProviderListResponseAccessAzureAdConfigPrompt = "none"
)

// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
Expand Down Expand Up @@ -4248,6 +4300,15 @@ type IdentityProviderNewParamsConfig struct {
OneloginAccount param.Field[string] `json:"onelogin_account"`
// Your PingOne environment identifier
PingEnvID param.Field[string] `json:"ping_env_id"`
// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
Prompt param.Field[IdentityProviderNewParamsConfigPrompt] `json:"prompt"`
// OAuth scopes
Scopes param.Field[[]string] `json:"scopes"`
// Sign the SAML authentication request with Access credentials. To verify the
Expand Down Expand Up @@ -4276,6 +4337,22 @@ func (r IdentityProviderNewParamsConfigHeaderAttribute) MarshalJSON() (data []by
return apijson.MarshalRoot(r)
}

// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
type IdentityProviderNewParamsConfigPrompt string

const (
IdentityProviderNewParamsConfigPromptLogin IdentityProviderNewParamsConfigPrompt = "login"
IdentityProviderNewParamsConfigPromptSelectAccount IdentityProviderNewParamsConfigPrompt = "select_account"
IdentityProviderNewParamsConfigPromptNone IdentityProviderNewParamsConfigPrompt = "none"
)

// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
Expand Down Expand Up @@ -4465,6 +4542,15 @@ type IdentityProviderUpdateParamsConfig struct {
OneloginAccount param.Field[string] `json:"onelogin_account"`
// Your PingOne environment identifier
PingEnvID param.Field[string] `json:"ping_env_id"`
// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
Prompt param.Field[IdentityProviderUpdateParamsConfigPrompt] `json:"prompt"`
// OAuth scopes
Scopes param.Field[[]string] `json:"scopes"`
// Sign the SAML authentication request with Access credentials. To verify the
Expand Down Expand Up @@ -4493,6 +4579,22 @@ func (r IdentityProviderUpdateParamsConfigHeaderAttribute) MarshalJSON() (data [
return apijson.MarshalRoot(r)
}

// Indicates the type of user interaction that is required. prompt=login forces the
// user to enter their credentials on that request, negating single-sign on.
// prompt=none is the opposite. It ensures that the user isn't presented with any
// interactive prompt. If the request can't be completed silently by using
// single-sign on, the Microsoft identity platform returns an interaction_required
// error. prompt=select_account interrupts single sign-on providing account
// selection experience listing all the accounts either in session or any
// remembered account or an option to choose to use a different account altogether.
type IdentityProviderUpdateParamsConfigPrompt string

const (
IdentityProviderUpdateParamsConfigPromptLogin IdentityProviderUpdateParamsConfigPrompt = "login"
IdentityProviderUpdateParamsConfigPromptSelectAccount IdentityProviderUpdateParamsConfigPrompt = "select_account"
IdentityProviderUpdateParamsConfigPromptNone IdentityProviderUpdateParamsConfigPrompt = "none"
)

// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
Expand Down
2 changes: 2 additions & 0 deletions zero_trust/identityprovider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func TestIdentityProviderNewWithOptionalParams(t *testing.T) {
EmailClaimName: cloudflare.F("custom_claim_name"),
ConditionalAccessEnabled: cloudflare.F(true),
DirectoryID: cloudflare.F("<your azure directory uuid>"),
Prompt: cloudflare.F(zero_trust.IdentityProviderNewParamsConfigPromptLogin),
SupportGroups: cloudflare.F(true),
CentrifyAccount: cloudflare.F("https://abc123.my.centrify.com/"),
CentrifyAppID: cloudflare.F("exampleapp"),
Expand Down Expand Up @@ -111,6 +112,7 @@ func TestIdentityProviderUpdateWithOptionalParams(t *testing.T) {
EmailClaimName: cloudflare.F("custom_claim_name"),
ConditionalAccessEnabled: cloudflare.F(true),
DirectoryID: cloudflare.F("<your azure directory uuid>"),
Prompt: cloudflare.F(zero_trust.IdentityProviderUpdateParamsConfigPromptLogin),
SupportGroups: cloudflare.F(true),
CentrifyAccount: cloudflare.F("https://abc123.my.centrify.com/"),
CentrifyAppID: cloudflare.F("exampleapp"),
Expand Down

0 comments on commit 4ba8991

Please sign in to comment.