From c8e54269f407f8b74407ec539977438e1dc01bb7 Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Tue, 16 Apr 2024 14:42:03 -0400 Subject: [PATCH] make build_sdks --- sdk/dotnet/AttackProtection.cs | 54 +- sdk/dotnet/Branding.cs | 30 - sdk/dotnet/BrandingTheme.cs | 101 -- sdk/dotnet/Client.cs | 106 +- sdk/dotnet/ClientCredentials.cs | 77 -- sdk/dotnet/Connection.cs | 677 ++++++++-- sdk/dotnet/ConnectionClient.cs | 10 +- sdk/dotnet/ConnectionClients.cs | 15 +- sdk/dotnet/CustomDomain.cs | 2 +- sdk/dotnet/EmailProvider.cs | 52 - sdk/dotnet/EmailTemplate.cs | 5 +- sdk/dotnet/GetClient.cs | 4 + sdk/dotnet/GetConnection.cs | 4 + sdk/dotnet/GetOrganization.cs | 4 + sdk/dotnet/GetResourceServer.cs | 4 + sdk/dotnet/GetRole.cs | 4 + sdk/dotnet/GetUser.cs | 2 + sdk/dotnet/Guardian.cs | 36 +- sdk/dotnet/Hook.cs | 16 +- sdk/dotnet/LogStream.cs | 22 +- sdk/dotnet/Organization.cs | 9 +- sdk/dotnet/OrganizationConnection.cs | 8 +- sdk/dotnet/OrganizationConnections.cs | 9 +- sdk/dotnet/OrganizationMember.cs | 5 +- sdk/dotnet/OrganizationMemberRole.cs | 15 +- sdk/dotnet/OrganizationMemberRoles.cs | 17 +- sdk/dotnet/OrganizationMembers.cs | 9 +- sdk/dotnet/Pages.cs | 20 +- sdk/dotnet/Prompt.cs | 4 +- sdk/dotnet/PromptPartials.cs | 10 +- sdk/dotnet/ResourceServer.cs | 7 +- sdk/dotnet/ResourceServerScope.cs | 7 +- sdk/dotnet/ResourceServerScopes.cs | 5 +- sdk/dotnet/Role.cs | 3 +- sdk/dotnet/Rule.cs | 6 +- sdk/dotnet/RuleConfig.cs | 8 +- sdk/dotnet/Tenant.cs | 22 +- sdk/dotnet/TriggerAction.cs | 5 +- sdk/dotnet/TriggerActions.cs | 8 +- sdk/dotnet/User.cs | 7 +- sdk/dotnet/UserRole.cs | 4 +- sdk/dotnet/UserRoles.cs | 4 +- sdk/go/auth0/attackProtection.go | 44 +- sdk/go/auth0/branding.go | 45 - sdk/go/auth0/brandingTheme.go | 98 -- sdk/go/auth0/client.go | 94 +- sdk/go/auth0/clientCredentials.go | 83 -- sdk/go/auth0/connection.go | 709 ++++++++-- sdk/go/auth0/connectionClient.go | 9 +- sdk/go/auth0/connectionClients.go | 13 +- sdk/go/auth0/customDomain.go | 2 +- sdk/go/auth0/emailProvider.go | 59 - sdk/go/auth0/emailTemplate.go | 5 +- sdk/go/auth0/getClient.go | 2 + sdk/go/auth0/getConnection.go | 2 + sdk/go/auth0/getOrganization.go | 2 + sdk/go/auth0/getResourceServer.go | 2 + sdk/go/auth0/getRole.go | 2 + sdk/go/auth0/getUser.go | 1 + sdk/go/auth0/guardian.go | 40 +- sdk/go/auth0/hook.go | 15 +- sdk/go/auth0/logStream.go | 22 +- sdk/go/auth0/organization.go | 11 +- sdk/go/auth0/organizationConnection.go | 8 +- sdk/go/auth0/organizationConnections.go | 9 +- sdk/go/auth0/organizationMember.go | 5 +- sdk/go/auth0/organizationMemberRole.go | 13 +- sdk/go/auth0/organizationMemberRoles.go | 15 +- sdk/go/auth0/organizationMembers.go | 9 +- sdk/go/auth0/pages.go | 18 +- sdk/go/auth0/prompt.go | 4 +- sdk/go/auth0/promptPartials.go | 10 +- sdk/go/auth0/resourceServer.go | 7 +- sdk/go/auth0/resourceServerScope.go | 7 +- sdk/go/auth0/resourceServerScopes.go | 5 +- sdk/go/auth0/role.go | 3 +- sdk/go/auth0/rule.go | 5 +- sdk/go/auth0/ruleConfig.go | 7 +- sdk/go/auth0/tenant.go | 22 +- sdk/go/auth0/triggerAction.go | 5 +- sdk/go/auth0/triggerActions.go | 8 +- sdk/go/auth0/user.go | 7 +- sdk/go/auth0/userRole.go | 4 +- sdk/go/auth0/userRoles.go | 4 +- .../com/pulumi/auth0/AttackProtection.java | 38 +- .../java/com/pulumi/auth0/Auth0Functions.java | 64 + .../main/java/com/pulumi/auth0/Branding.java | 42 - .../java/com/pulumi/auth0/BrandingTheme.java | 114 -- .../main/java/com/pulumi/auth0/Client.java | 86 +- .../com/pulumi/auth0/ClientCredentials.java | 84 -- .../java/com/pulumi/auth0/ClientGrant.java | 6 +- .../java/com/pulumi/auth0/Connection.java | 682 ++++++++-- .../com/pulumi/auth0/ConnectionClient.java | 6 +- .../com/pulumi/auth0/ConnectionClients.java | 10 +- .../java/com/pulumi/auth0/EmailProvider.java | 61 - .../java/com/pulumi/auth0/EmailTemplate.java | 1 + .../main/java/com/pulumi/auth0/Guardian.java | 38 +- .../src/main/java/com/pulumi/auth0/Hook.java | 8 +- .../main/java/com/pulumi/auth0/LogStream.java | 22 +- .../java/com/pulumi/auth0/Organization.java | 9 +- .../pulumi/auth0/OrganizationConnection.java | 2 + .../pulumi/auth0/OrganizationConnections.java | 3 + .../com/pulumi/auth0/OrganizationMember.java | 1 + .../pulumi/auth0/OrganizationMemberRole.java | 10 +- .../pulumi/auth0/OrganizationMemberRoles.java | 10 +- .../com/pulumi/auth0/OrganizationMembers.java | 1 + .../src/main/java/com/pulumi/auth0/Pages.java | 20 +- .../main/java/com/pulumi/auth0/Prompt.java | 2 +- .../java/com/pulumi/auth0/PromptPartials.java | 8 +- .../java/com/pulumi/auth0/ResourceServer.java | 5 +- .../com/pulumi/auth0/ResourceServerScope.java | 1 + .../pulumi/auth0/ResourceServerScopes.java | 1 + .../src/main/java/com/pulumi/auth0/Role.java | 1 + .../src/main/java/com/pulumi/auth0/Rule.java | 4 +- .../java/com/pulumi/auth0/RuleConfig.java | 4 +- .../main/java/com/pulumi/auth0/Tenant.java | 20 +- .../java/com/pulumi/auth0/TriggerAction.java | 1 + .../java/com/pulumi/auth0/TriggerActions.java | 2 + .../src/main/java/com/pulumi/auth0/User.java | 7 +- .../main/java/com/pulumi/auth0/UserRole.java | 2 + .../main/java/com/pulumi/auth0/UserRoles.java | 2 + sdk/nodejs/attackProtection.ts | 34 +- sdk/nodejs/branding.ts | 21 - sdk/nodejs/brandingTheme.ts | 83 -- sdk/nodejs/client.ts | 84 +- sdk/nodejs/clientCredentials.ts | 54 - sdk/nodejs/connection.ts | 554 ++++++-- sdk/nodejs/connectionClient.ts | 9 +- sdk/nodejs/connectionClients.ts | 11 +- sdk/nodejs/customDomain.ts | 2 +- sdk/nodejs/emailProvider.ts | 38 - sdk/nodejs/emailTemplate.ts | 5 +- sdk/nodejs/getClient.ts | 4 + sdk/nodejs/getConnection.ts | 4 + sdk/nodejs/getOrganization.ts | 4 + sdk/nodejs/getResourceServer.ts | 4 + sdk/nodejs/getRole.ts | 4 + sdk/nodejs/getUser.ts | 2 + sdk/nodejs/guardian.ts | 34 +- sdk/nodejs/hook.ts | 14 +- sdk/nodejs/logStream.ts | 22 +- sdk/nodejs/organization.ts | 9 +- sdk/nodejs/organizationConnection.ts | 12 +- sdk/nodejs/organizationConnections.ts | 15 +- sdk/nodejs/organizationMember.ts | 7 +- sdk/nodejs/organizationMemberRole.ts | 11 +- sdk/nodejs/organizationMemberRoles.ts | 13 +- sdk/nodejs/organizationMembers.ts | 11 +- sdk/nodejs/pages.ts | 18 +- sdk/nodejs/prompt.ts | 4 +- sdk/nodejs/promptPartials.ts | 10 +- sdk/nodejs/resourceServer.ts | 7 +- sdk/nodejs/resourceServerScope.ts | 9 +- sdk/nodejs/resourceServerScopes.ts | 7 +- sdk/nodejs/role.ts | 5 +- sdk/nodejs/rule.ts | 6 +- sdk/nodejs/ruleConfig.ts | 8 +- sdk/nodejs/tenant.ts | 22 +- sdk/nodejs/triggerAction.ts | 5 +- sdk/nodejs/triggerActions.ts | 8 +- sdk/nodejs/user.ts | 7 +- sdk/nodejs/userRole.ts | 8 +- sdk/nodejs/userRoles.ts | 8 +- sdk/python/pulumi_auth0/attack_protection.py | 68 +- sdk/python/pulumi_auth0/branding.py | 38 - sdk/python/pulumi_auth0/branding_theme.py | 164 --- sdk/python/pulumi_auth0/client.py | 172 +-- sdk/python/pulumi_auth0/client_credentials.py | 96 -- sdk/python/pulumi_auth0/connection.py | 1150 ++++++++++++++--- sdk/python/pulumi_auth0/connection_client.py | 16 +- sdk/python/pulumi_auth0/connection_clients.py | 20 +- sdk/python/pulumi_auth0/custom_domain.py | 4 +- sdk/python/pulumi_auth0/email_provider.py | 70 - sdk/python/pulumi_auth0/email_template.py | 10 +- sdk/python/pulumi_auth0/get_client.py | 4 + sdk/python/pulumi_auth0/get_connection.py | 4 + sdk/python/pulumi_auth0/get_organization.py | 4 + .../pulumi_auth0/get_resource_server.py | 4 + sdk/python/pulumi_auth0/get_role.py | 4 + sdk/python/pulumi_auth0/get_user.py | 2 + sdk/python/pulumi_auth0/guardian.py | 68 +- sdk/python/pulumi_auth0/hook.py | 28 +- sdk/python/pulumi_auth0/log_stream.py | 52 +- sdk/python/pulumi_auth0/organization.py | 22 +- .../pulumi_auth0/organization_connection.py | 20 +- .../pulumi_auth0/organization_connections.py | 24 +- .../pulumi_auth0/organization_member.py | 12 +- .../pulumi_auth0/organization_member_role.py | 20 +- .../pulumi_auth0/organization_member_roles.py | 24 +- .../pulumi_auth0/organization_members.py | 20 +- sdk/python/pulumi_auth0/pages.py | 36 +- sdk/python/pulumi_auth0/prompt.py | 8 +- sdk/python/pulumi_auth0/prompt_partials.py | 24 +- sdk/python/pulumi_auth0/resource_server.py | 18 +- .../pulumi_auth0/resource_server_scope.py | 16 +- .../pulumi_auth0/resource_server_scopes.py | 12 +- sdk/python/pulumi_auth0/role.py | 8 +- sdk/python/pulumi_auth0/rule.py | 16 +- sdk/python/pulumi_auth0/rule_config.py | 20 +- sdk/python/pulumi_auth0/tenant.py | 48 +- sdk/python/pulumi_auth0/trigger_action.py | 10 +- sdk/python/pulumi_auth0/trigger_actions.py | 16 +- sdk/python/pulumi_auth0/user.py | 18 +- sdk/python/pulumi_auth0/user_role.py | 14 +- sdk/python/pulumi_auth0/user_roles.py | 14 +- 205 files changed, 4752 insertions(+), 3073 deletions(-) diff --git a/sdk/dotnet/AttackProtection.cs b/sdk/dotnet/AttackProtection.cs index 60b5dbf8..a18eebdc 100644 --- a/sdk/dotnet/AttackProtection.cs +++ b/sdk/dotnet/AttackProtection.cs @@ -23,28 +23,30 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myProtection = new Auth0.AttackProtection("myProtection", new() + /// var myProtection = new Auth0.AttackProtection("my_protection", new() /// { - /// BreachedPasswordDetection = new Auth0.Inputs.AttackProtectionBreachedPasswordDetectionArgs + /// SuspiciousIpThrottling = new Auth0.Inputs.AttackProtectionSuspiciousIpThrottlingArgs /// { - /// AdminNotificationFrequencies = new[] - /// { - /// "daily", - /// }, /// Enabled = true, - /// Method = "standard", - /// PreUserRegistration = new Auth0.Inputs.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs - /// { - /// Shields = new[] - /// { - /// "block", - /// }, - /// }, /// Shields = new[] /// { /// "admin_notification", /// "block", /// }, + /// Allowlists = new[] + /// { + /// "192.168.1.1", + /// }, + /// PreLogin = new Auth0.Inputs.AttackProtectionSuspiciousIpThrottlingPreLoginArgs + /// { + /// MaxAttempts = 100, + /// Rate = 864000, + /// }, + /// PreUserRegistration = new Auth0.Inputs.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs + /// { + /// MaxAttempts = 50, + /// Rate = 1200, + /// }, /// }, /// BruteForceProtection = new Auth0.Inputs.AttackProtectionBruteForceProtectionArgs /// { @@ -61,28 +63,26 @@ namespace Pulumi.Auth0 /// "user_notification", /// }, /// }, - /// SuspiciousIpThrottling = new Auth0.Inputs.AttackProtectionSuspiciousIpThrottlingArgs + /// BreachedPasswordDetection = new Auth0.Inputs.AttackProtectionBreachedPasswordDetectionArgs /// { - /// Allowlists = new[] + /// AdminNotificationFrequencies = new[] /// { - /// "192.168.1.1", + /// "daily", /// }, /// Enabled = true, - /// PreLogin = new Auth0.Inputs.AttackProtectionSuspiciousIpThrottlingPreLoginArgs - /// { - /// MaxAttempts = 100, - /// Rate = 864000, - /// }, - /// PreUserRegistration = new Auth0.Inputs.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs - /// { - /// MaxAttempts = 50, - /// Rate = 1200, - /// }, + /// Method = "standard", /// Shields = new[] /// { /// "admin_notification", /// "block", /// }, + /// PreUserRegistration = new Auth0.Inputs.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs + /// { + /// Shields = new[] + /// { + /// "block", + /// }, + /// }, /// }, /// }); /// diff --git a/sdk/dotnet/Branding.cs b/sdk/dotnet/Branding.cs index d9c6362c..3375b492 100644 --- a/sdk/dotnet/Branding.cs +++ b/sdk/dotnet/Branding.cs @@ -12,36 +12,6 @@ namespace Pulumi.Auth0 /// /// This resource allows you to manage branding within your Auth0 tenant. Auth0 can be customized with a look and feel that aligns with your organization's brand requirements and user expectations. /// - /// ## Example Usage - /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.IO; - /// using System.Linq; - /// using Pulumi; - /// using Auth0 = Pulumi.Auth0; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var myBrand = new Auth0.Branding("myBrand", new() - /// { - /// LogoUrl = "https://mycompany.org/logo.png", - /// Colors = new Auth0.Inputs.BrandingColorsArgs - /// { - /// Primary = "#0059d6", - /// PageBackground = "#000000", - /// }, - /// UniversalLogin = new Auth0.Inputs.BrandingUniversalLoginArgs - /// { - /// Body = File.ReadAllText("universal_login_body.html"), - /// }, - /// }); - /// - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// ## Import /// /// As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/dotnet/BrandingTheme.cs b/sdk/dotnet/BrandingTheme.cs index dcf669ff..8484bf6b 100644 --- a/sdk/dotnet/BrandingTheme.cs +++ b/sdk/dotnet/BrandingTheme.cs @@ -12,107 +12,6 @@ namespace Pulumi.Auth0 /// /// This resource allows you to manage branding themes for your Universal Login page within your Auth0 tenant. /// - /// ## Example Usage - /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using Auth0 = Pulumi.Auth0; - /// - /// return await Deployment.RunAsync(() => - /// { - /// // An example of a fully configured auth0_branding_theme. - /// var myTheme = new Auth0.BrandingTheme("myTheme", new() - /// { - /// Borders = new Auth0.Inputs.BrandingThemeBordersArgs - /// { - /// ButtonBorderRadius = 1, - /// ButtonBorderWeight = 1, - /// ButtonsStyle = "pill", - /// InputBorderRadius = 3, - /// InputBorderWeight = 1, - /// InputsStyle = "pill", - /// ShowWidgetShadow = false, - /// WidgetBorderWeight = 1, - /// WidgetCornerRadius = 3, - /// }, - /// Colors = new Auth0.Inputs.BrandingThemeColorsArgs - /// { - /// BodyText = "#FF00CC", - /// Error = "#FF00CC", - /// Header = "#FF00CC", - /// Icons = "#FF00CC", - /// InputBackground = "#FF00CC", - /// InputBorder = "#FF00CC", - /// InputFilledText = "#FF00CC", - /// InputLabelsPlaceholders = "#FF00CC", - /// LinksFocusedComponents = "#FF00CC", - /// PrimaryButton = "#FF00CC", - /// PrimaryButtonLabel = "#FF00CC", - /// SecondaryButtonBorder = "#FF00CC", - /// SecondaryButtonLabel = "#FF00CC", - /// Success = "#FF00CC", - /// WidgetBackground = "#FF00CC", - /// WidgetBorder = "#FF00CC", - /// }, - /// Fonts = new Auth0.Inputs.BrandingThemeFontsArgs - /// { - /// BodyText = new Auth0.Inputs.BrandingThemeFontsBodyTextArgs - /// { - /// Bold = false, - /// Size = 100, - /// }, - /// ButtonsText = new Auth0.Inputs.BrandingThemeFontsButtonsTextArgs - /// { - /// Bold = false, - /// Size = 100, - /// }, - /// FontUrl = "https://google.com/font.woff", - /// InputLabels = new Auth0.Inputs.BrandingThemeFontsInputLabelsArgs - /// { - /// Bold = false, - /// Size = 100, - /// }, - /// Links = new Auth0.Inputs.BrandingThemeFontsLinksArgs - /// { - /// Bold = false, - /// Size = 100, - /// }, - /// LinksStyle = "normal", - /// ReferenceTextSize = 12, - /// Subtitle = new Auth0.Inputs.BrandingThemeFontsSubtitleArgs - /// { - /// Bold = false, - /// Size = 100, - /// }, - /// Title = new Auth0.Inputs.BrandingThemeFontsTitleArgs - /// { - /// Bold = false, - /// Size = 100, - /// }, - /// }, - /// PageBackground = new Auth0.Inputs.BrandingThemePageBackgroundArgs - /// { - /// BackgroundColor = "#000000", - /// BackgroundImageUrl = "https://google.com/background.png", - /// PageLayout = "center", - /// }, - /// Widget = new Auth0.Inputs.BrandingThemeWidgetArgs - /// { - /// HeaderTextAlignment = "center", - /// LogoHeight = 55, - /// LogoPosition = "center", - /// LogoUrl = "https://google.com/logo.png", - /// SocialButtonsLayout = "top", - /// }, - /// }); - /// - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// ## Import /// /// This resource can be imported by specifying the Branding Theme ID. diff --git a/sdk/dotnet/Client.cs b/sdk/dotnet/Client.cs index 1ef72ec2..e1625ac8 100644 --- a/sdk/dotnet/Client.cs +++ b/sdk/dotnet/Client.cs @@ -23,55 +23,31 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myClient = new Auth0.Client("myClient", new() + /// var myClient = new Auth0.Client("my_client", new() /// { - /// Addons = new Auth0.Inputs.ClientAddonsArgs - /// { - /// Samlp = new Auth0.Inputs.ClientAddonsSamlpArgs - /// { - /// Audience = "https://example.com/saml", - /// CreateUpnClaim = false, - /// Issuer = "https://example.com", - /// MapIdentities = false, - /// MapUnknownClaimsAsIs = false, - /// Mappings = - /// { - /// { "email", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" }, - /// { "name", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" }, - /// }, - /// NameIdentifierFormat = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", - /// NameIdentifierProbes = new[] - /// { - /// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", - /// }, - /// PassthroughClaimsWithNoMapping = false, - /// SigningCert = @"-----BEGIN PUBLIC KEY----- - /// MIGf...bpP/t3 - /// +JGNGIRMj1hF1rnb6QIDAQAB - /// -----END PUBLIC KEY----- - /// - /// ", - /// }, - /// }, - /// AllowedLogoutUrls = new[] + /// Name = "Application - Acceptance Test", + /// Description = "Test Applications Long Description", + /// AppType = "non_interactive", + /// CustomLoginPageOn = true, + /// IsFirstParty = true, + /// IsTokenEndpointIpHeaderTrusted = true, + /// OidcConformant = false, + /// Callbacks = new[] /// { - /// "https://example.com", + /// "https://example.com/callback", /// }, /// AllowedOrigins = new[] /// { /// "https://example.com", /// }, - /// AppType = "non_interactive", - /// Callbacks = new[] + /// AllowedLogoutUrls = new[] /// { - /// "https://example.com/callback", + /// "https://example.com", /// }, - /// ClientMetadata = + /// WebOrigins = new[] /// { - /// { "foo", "zoo" }, + /// "https://example.com", /// }, - /// CustomLoginPageOn = true, - /// Description = "Test Applications Long Description", /// GrantTypes = new[] /// { /// "authorization_code", @@ -80,37 +56,61 @@ namespace Pulumi.Auth0 /// "password", /// "refresh_token", /// }, - /// IsFirstParty = true, - /// IsTokenEndpointIpHeaderTrusted = true, + /// ClientMetadata = + /// { + /// { "foo", "zoo" }, + /// }, /// JwtConfiguration = new Auth0.Inputs.ClientJwtConfigurationArgs /// { - /// Alg = "RS256", /// LifetimeInSeconds = 300, + /// SecretEncoded = true, + /// Alg = "RS256", /// Scopes = /// { /// { "foo", "bar" }, /// }, - /// SecretEncoded = true, + /// }, + /// RefreshToken = new Auth0.Inputs.ClientRefreshTokenArgs + /// { + /// Leeway = 0, + /// TokenLifetime = 2592000, + /// RotationType = "rotating", + /// ExpirationType = "expiring", /// }, /// Mobile = new Auth0.Inputs.ClientMobileArgs /// { /// Ios = new Auth0.Inputs.ClientMobileIosArgs /// { - /// AppBundleIdentifier = "com.my.bundle.id", /// TeamId = "9JA89QQLNQ", + /// AppBundleIdentifier = "com.my.bundle.id", /// }, /// }, - /// OidcConformant = false, - /// RefreshToken = new Auth0.Inputs.ClientRefreshTokenArgs - /// { - /// ExpirationType = "expiring", - /// Leeway = 0, - /// RotationType = "rotating", - /// TokenLifetime = 2592000, - /// }, - /// WebOrigins = new[] + /// Addons = new Auth0.Inputs.ClientAddonsArgs /// { - /// "https://example.com", + /// Samlp = new Auth0.Inputs.ClientAddonsSamlpArgs + /// { + /// Audience = "https://example.com/saml", + /// Issuer = "https://example.com", + /// Mappings = + /// { + /// { "email", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" }, + /// { "name", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" }, + /// }, + /// CreateUpnClaim = false, + /// PassthroughClaimsWithNoMapping = false, + /// MapUnknownClaimsAsIs = false, + /// MapIdentities = false, + /// NameIdentifierFormat = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + /// NameIdentifierProbes = new[] + /// { + /// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", + /// }, + /// SigningCert = @"-----BEGIN PUBLIC KEY----- + /// MIGf...bpP/t3 + /// +JGNGIRMj1hF1rnb6QIDAQAB + /// -----END PUBLIC KEY----- + /// ", + /// }, /// }, /// }); /// diff --git a/sdk/dotnet/ClientCredentials.cs b/sdk/dotnet/ClientCredentials.cs index c4552cf1..6391749f 100644 --- a/sdk/dotnet/ClientCredentials.cs +++ b/sdk/dotnet/ClientCredentials.cs @@ -15,83 +15,6 @@ namespace Pulumi.Auth0 /// > Refer to the client secret rotation guide /// for instructions on how to rotate client secrets with zero downtime. /// - /// ## Example Usage - /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using Auth0 = Pulumi.Auth0; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var myClient = new Auth0.Client("myClient", new() - /// { - /// AppType = "non_interactive", - /// JwtConfiguration = new Auth0.Inputs.ClientJwtConfigurationArgs - /// { - /// Alg = "RS256", - /// }, - /// }); - /// - /// // Configuring client_secret_post as an authentication method. - /// var testClientCredentials = new Auth0.ClientCredentials("testClientCredentials", new() - /// { - /// ClientId = myClient.Id, - /// AuthenticationMethod = "client_secret_post", - /// }); - /// - /// // Configuring client_secret_basic as an authentication method. - /// var testIndex_clientCredentialsClientCredentials = new Auth0.ClientCredentials("testIndex/clientCredentialsClientCredentials", new() - /// { - /// ClientId = myClient.Id, - /// AuthenticationMethod = "client_secret_basic", - /// }); - /// - /// // Configuring none as an authentication method. - /// var testAuth0Index_clientCredentialsClientCredentials = new Auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials", new() - /// { - /// ClientId = myClient.Id, - /// AuthenticationMethod = "none", - /// }); - /// - /// // Configuring private_key_jwt as an authentication method. - /// var testAuth0Index_clientCredentialsClientCredentials1 = new Auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials1", new() - /// { - /// ClientId = myClient.Id, - /// AuthenticationMethod = "private_key_jwt", - /// PrivateKeyJwt = new Auth0.Inputs.ClientCredentialsPrivateKeyJwtArgs - /// { - /// Credentials = new[] - /// { - /// new Auth0.Inputs.ClientCredentialsPrivateKeyJwtCredentialArgs - /// { - /// Name = "Testing Credentials 1", - /// CredentialType = "public_key", - /// Algorithm = "RS256", - /// ParseExpiryFromCert = true, - /// Pem = @"-----BEGIN CERTIFICATE----- - /// MIIFWDCCA0ACCQDXqpBo3R...G9w0BAQsFADBuMQswCQYDVQQGEwJl - /// -----END CERTIFICATE----- - /// ", - /// }, - /// }, - /// }, - /// }); - /// - /// // Configuring the client_secret. - /// var testAuth0Index_clientCredentialsClientCredentials2 = new Auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials2", new() - /// { - /// ClientId = myClient.Id, - /// AuthenticationMethod = "client_secret_basic", - /// ClientSecret = "LUFqPx+sRLjbL7peYRPFmFu-bbvE7u7og4YUNe_C345=683341", - /// }); - /// - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// ## Import /// /// This resource can be imported by specifying the client ID. diff --git a/sdk/dotnet/Connection.cs b/sdk/dotnet/Connection.cs index f785750d..266016a4 100644 --- a/sdk/dotnet/Connection.cs +++ b/sdk/dotnet/Connection.cs @@ -17,6 +17,102 @@ namespace Pulumi.Auth0 /// /// ## Example Usage /// + /// ### Auth0 Connection + /// + /// <!--Start PulumiCodeChooser --> + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Auth0 = Pulumi.Auth0; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // This is an example of an Auth0 connection. + /// var myConnection = new Auth0.Connection("my_connection", new() + /// { + /// Name = "Example-Connection", + /// IsDomainConnection = true, + /// Strategy = "auth0", + /// Metadata = + /// { + /// { "key1", "foo" }, + /// { "key2", "bar" }, + /// }, + /// Options = new Auth0.Inputs.ConnectionOptionsArgs + /// { + /// PasswordPolicy = "excellent", + /// BruteForceProtection = true, + /// EnabledDatabaseCustomization = true, + /// ImportMode = false, + /// RequiresUsername = true, + /// DisableSignup = false, + /// CustomScripts = + /// { + /// { "get_user", @" function getByEmail(email, callback) { + /// return callback(new Error(""Whoops!"")); + /// } + /// " }, + /// }, + /// Configuration = + /// { + /// { "foo", "bar" }, + /// { "bar", "baz" }, + /// }, + /// UpstreamParams = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["screen_name"] = new Dictionary<string, object?> + /// { + /// ["alias"] = "login_hint", + /// }, + /// }), + /// PasswordHistories = new[] + /// { + /// new Auth0.Inputs.ConnectionOptionsPasswordHistoryArgs + /// { + /// Enable = true, + /// Size = 3, + /// }, + /// }, + /// PasswordNoPersonalInfo = new Auth0.Inputs.ConnectionOptionsPasswordNoPersonalInfoArgs + /// { + /// Enable = true, + /// }, + /// PasswordDictionary = new Auth0.Inputs.ConnectionOptionsPasswordDictionaryArgs + /// { + /// Enable = true, + /// Dictionaries = new[] + /// { + /// "password", + /// "admin", + /// "1234", + /// }, + /// }, + /// PasswordComplexityOptions = new Auth0.Inputs.ConnectionOptionsPasswordComplexityOptionsArgs + /// { + /// MinLength = 12, + /// }, + /// Validation = new Auth0.Inputs.ConnectionOptionsValidationArgs + /// { + /// Username = new Auth0.Inputs.ConnectionOptionsValidationUsernameArgs + /// { + /// Min = 10, + /// Max = 40, + /// }, + /// }, + /// Mfa = new Auth0.Inputs.ConnectionOptionsMfaArgs + /// { + /// Active = true, + /// ReturnEnrollSettings = true, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// <!--End PulumiCodeChooser --> + /// /// ### Google OAuth2 Connection /// /// > Your Auth0 account may be pre-configured with a `google-oauth2` connection. @@ -30,22 +126,20 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var googleOauth2 = new Auth0.Connection("googleOauth2", new() + /// // This is an example of a Google OAuth2 connection. + /// var googleOauth2 = new Auth0.Connection("google_oauth2", new() /// { + /// Name = "Google-OAuth2-Connection", + /// Strategy = "google-oauth2", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { + /// ClientId = "<client-id>", + /// ClientSecret = "<client-secret>", /// AllowedAudiences = new[] /// { /// "example.com", /// "api.example.com", /// }, - /// ClientId = "<client-id>", - /// ClientSecret = "<client-secret>", - /// NonPersistentAttrs = new[] - /// { - /// "ethnicity", - /// "gender", - /// }, /// Scopes = new[] /// { /// "email", @@ -54,36 +148,94 @@ namespace Pulumi.Auth0 /// "youtube", /// }, /// SetUserRootAttributes = "on_each_login", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, /// }, - /// Strategy = "google-oauth2", /// }); /// /// }); /// ``` /// <!--End PulumiCodeChooser --> /// - /// ### Facebook Connection + /// ### Google Apps /// /// <!--Start PulumiCodeChooser --> /// ```csharp /// using System.Collections.Generic; /// using System.Linq; + /// using System.Text.Json; /// using Pulumi; /// using Auth0 = Pulumi.Auth0; /// /// return await Deployment.RunAsync(() => /// { - /// var facebook = new Auth0.Connection("facebook", new() + /// var googleApps = new Auth0.Connection("google_apps", new() /// { + /// Name = "connection-google-apps", + /// IsDomainConnection = false, + /// Strategy = "google-apps", + /// ShowAsButton = false, /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { - /// ClientId = "<client-id>", - /// ClientSecret = "<client-secret>", + /// ClientId = "", + /// ClientSecret = "", + /// Domain = "example.com", + /// TenantDomain = "example.com", + /// DomainAliases = new[] + /// { + /// "example.com", + /// "api.example.com", + /// }, + /// ApiEnableUsers = true, + /// Scopes = new[] + /// { + /// "ext_profile", + /// "ext_groups", + /// }, + /// IconUrl = "https://example.com/assets/logo.png", + /// UpstreamParams = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["screen_name"] = new Dictionary<string, object?> + /// { + /// ["alias"] = "login_hint", + /// }, + /// }), + /// SetUserRootAttributes = "on_each_login", /// NonPersistentAttrs = new[] /// { /// "ethnicity", /// "gender", /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// <!--End PulumiCodeChooser --> + /// + /// ### Facebook Connection + /// + /// <!--Start PulumiCodeChooser --> + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Auth0 = Pulumi.Auth0; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // This is an example of a Facebook connection. + /// var facebook = new Auth0.Connection("facebook", new() + /// { + /// Name = "Facebook-Connection", + /// Strategy = "facebook", + /// Options = new Auth0.Inputs.ConnectionOptionsArgs + /// { + /// ClientId = "<client-id>", + /// ClientSecret = "<client-secret>", /// Scopes = new[] /// { /// "public_profile", @@ -92,8 +244,12 @@ namespace Pulumi.Auth0 /// "user_birthday", /// }, /// SetUserRootAttributes = "on_each_login", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, /// }, - /// Strategy = "facebook", /// }); /// /// }); @@ -111,30 +267,31 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { + /// // This is an example of an Apple connection. /// var apple = new Auth0.Connection("apple", new() /// { + /// Name = "Apple-Connection", + /// Strategy = "apple", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { /// ClientId = "<client-id>", /// ClientSecret = @"-----BEGIN PRIVATE KEY----- /// MIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA - /// -----END PRIVATE KEY----- - /// ", + /// -----END PRIVATE KEY-----", + /// TeamId = "<team-id>", /// KeyId = "<key-id>", - /// NonPersistentAttrs = new[] - /// { - /// "ethnicity", - /// "gender", - /// }, /// Scopes = new[] /// { /// "email", /// "name", /// }, /// SetUserRootAttributes = "on_first_login", - /// TeamId = "<team-id>", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, /// }, - /// Strategy = "apple", /// }); /// /// }); @@ -152,17 +309,16 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { + /// // This is an example of an LinkedIn connection. /// var linkedin = new Auth0.Connection("linkedin", new() /// { + /// Name = "Linkedin-Connection", + /// Strategy = "linkedin", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { /// ClientId = "<client-id>", /// ClientSecret = "<client-secret>", - /// NonPersistentAttrs = new[] - /// { - /// "ethnicity", - /// "gender", - /// }, + /// StrategyVersion = 2, /// Scopes = new[] /// { /// "basic_profile", @@ -170,9 +326,12 @@ namespace Pulumi.Auth0 /// "email", /// }, /// SetUserRootAttributes = "on_each_login", - /// StrategyVersion = 2, + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, /// }, - /// Strategy = "linkedin", /// }); /// /// }); @@ -190,17 +349,15 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { + /// // This is an example of an GitHub connection. /// var github = new Auth0.Connection("github", new() /// { + /// Name = "GitHub-Connection", + /// Strategy = "github", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { /// ClientId = "<client-id>", /// ClientSecret = "<client-secret>", - /// NonPersistentAttrs = new[] - /// { - /// "ethnicity", - /// "gender", - /// }, /// Scopes = new[] /// { /// "email", @@ -209,8 +366,12 @@ namespace Pulumi.Auth0 /// "repo", /// }, /// SetUserRootAttributes = "on_each_login", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, /// }, - /// Strategy = "github", /// }); /// /// }); @@ -228,26 +389,28 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { + /// // This is an example of an SalesForce connection. /// var salesforce = new Auth0.Connection("salesforce", new() /// { + /// Name = "Salesforce-Connection", + /// Strategy = "salesforce", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { /// ClientId = "<client-id>", /// ClientSecret = "<client-secret>", /// CommunityBaseUrl = "https://salesforce.example.com", - /// NonPersistentAttrs = new[] - /// { - /// "ethnicity", - /// "gender", - /// }, /// Scopes = new[] /// { /// "openid", /// "email", /// }, /// SetUserRootAttributes = "on_first_login", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, /// }, - /// Strategy = "salesforce", /// }); /// /// }); @@ -267,86 +430,159 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { + /// // This is an example of an OAuth2 connection. /// var oauth2 = new Auth0.Connection("oauth2", new() /// { + /// Name = "OAuth2-Connection", + /// Strategy = "oauth2", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { - /// AuthorizationEndpoint = "https://auth.example.com/oauth2/authorize", /// ClientId = "<client-id>", /// ClientSecret = "<client-secret>", - /// IconUrl = "https://auth.example.com/assets/logo.png", - /// NonPersistentAttrs = new[] - /// { - /// "ethnicity", - /// "gender", - /// }, - /// PkceEnabled = true, /// Scopes = new[] /// { /// "basic_profile", /// "profile", /// "email", /// }, + /// TokenEndpoint = "https://auth.example.com/oauth2/token", + /// AuthorizationEndpoint = "https://auth.example.com/oauth2/authorize", + /// PkceEnabled = true, + /// IconUrl = "https://auth.example.com/assets/logo.png", /// Scripts = /// { /// { "fetchUserProfile", @" function fetchUserProfile(accessToken, context, callback) { /// return callback(new Error(""Whoops!"")); /// } - /// /// " }, /// }, /// SetUserRootAttributes = "on_each_login", - /// TokenEndpoint = "https://auth.example.com/oauth2/token", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, /// }, - /// Strategy = "oauth2", /// }); /// /// }); /// ``` /// <!--End PulumiCodeChooser --> /// - /// ### SMS Connection - /// - /// > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms". + /// ### Active Directory (AD) /// /// <!--Start PulumiCodeChooser --> /// ```csharp /// using System.Collections.Generic; /// using System.Linq; + /// using System.Text.Json; /// using Pulumi; /// using Auth0 = Pulumi.Auth0; /// /// return await Deployment.RunAsync(() => /// { - /// var sms = new Auth0.Connection("sms", new() + /// var ad = new Auth0.Connection("ad", new() /// { - /// IsDomainConnection = false, + /// Name = "connection-active-directory", + /// DisplayName = "Active Directory Connection", + /// Strategy = "ad", + /// ShowAsButton = true, /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { + /// DisableSelfServiceChangePassword = true, /// BruteForceProtection = true, - /// DisableSignup = false, - /// ForwardRequestInfo = true, - /// From = "+15555555555", - /// GatewayAuthentication = new Auth0.Inputs.ConnectionOptionsGatewayAuthenticationArgs - /// { - /// Audience = "https://somewhere.com/sms-gateway", - /// Method = "bearer", - /// Secret = "4e2680bb74ec2ae24736476dd37ed6c2", - /// SecretBase64Encoded = false, - /// Subject = "test.us.auth0.com:sms", - /// }, - /// GatewayUrl = "https://somewhere.com/sms-gateway", - /// Name = "sms", - /// Provider = "sms_gateway", - /// Syntax = "md_with_macros", - /// Template = "@@password@@", - /// Totp = new Auth0.Inputs.ConnectionOptionsTotpArgs + /// TenantDomain = "example.com", + /// IconUrl = "https://example.com/assets/logo.png", + /// DomainAliases = new[] /// { - /// Length = 6, - /// TimeStep = 300, + /// "example.com", + /// "api.example.com", + /// }, + /// Ips = new[] + /// { + /// "192.168.1.1", + /// "192.168.1.2", + /// }, + /// SetUserRootAttributes = "on_each_login", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, + /// UpstreamParams = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["screen_name"] = new Dictionary<string, object?> + /// { + /// ["alias"] = "login_hint", + /// }, + /// }), + /// UseCertAuth = false, + /// UseKerberos = false, + /// DisableCache = false, + /// }, + /// }); + /// + /// }); + /// ``` + /// <!--End PulumiCodeChooser --> + /// + /// ### Azure AD Connection + /// + /// <!--Start PulumiCodeChooser --> + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Auth0 = Pulumi.Auth0; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var azureAd = new Auth0.Connection("azure_ad", new() + /// { + /// Name = "connection-azure-ad", + /// Strategy = "waad", + /// ShowAsButton = true, + /// Options = new Auth0.Inputs.ConnectionOptionsArgs + /// { + /// IdentityApi = "azure-active-directory-v1.0", + /// ClientId = "123456", + /// ClientSecret = "123456", + /// AppId = "app-id-123", + /// TenantDomain = "example.onmicrosoft.com", + /// Domain = "example.onmicrosoft.com", + /// DomainAliases = new[] + /// { + /// "example.com", + /// "api.example.com", + /// }, + /// IconUrl = "https://example.onmicrosoft.com/assets/logo.png", + /// UseWsfed = false, + /// WaadProtocol = "openid-connect", + /// WaadCommonEndpoint = false, + /// MaxGroupsToRetrieve = "250", + /// ApiEnableUsers = true, + /// Scopes = new[] + /// { + /// "basic_profile", + /// "ext_groups", + /// "ext_profile", + /// }, + /// SetUserRootAttributes = "on_each_login", + /// ShouldTrustEmailVerifiedConnection = "never_set_emails_as_verified", + /// UpstreamParams = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["screen_name"] = new Dictionary<string, object?> + /// { + /// ["alias"] = "login_hint", + /// }, + /// }), + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", /// }, /// }, - /// Strategy = "sms", /// }); /// /// }); @@ -366,31 +602,130 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var passwordlessEmail = new Auth0.Connection("passwordlessEmail", new() + /// // This is an example of an Email connection. + /// var passwordlessEmail = new Auth0.Connection("passwordless_email", new() /// { + /// Strategy = "email", + /// Name = "email", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { - /// AuthParams = - /// { - /// { "responseType", "code" }, - /// { "scope", "openid email profile offline_access" }, - /// }, - /// BruteForceProtection = true, - /// DisableSignup = false, - /// From = "{{ application.name }} <root@auth0.com>", /// Name = "email", - /// NonPersistentAttrs = new() { }, - /// SetUserRootAttributes = "on_each_login", + /// From = "{{ application.name }} <root@auth0.com>", /// Subject = "Welcome to {{ application.name }}", /// Syntax = "liquid", /// Template = "<html>This is the body of the email</html>", + /// DisableSignup = false, + /// BruteForceProtection = true, + /// SetUserRootAttributes = "on_each_login", + /// NonPersistentAttrs = new() { }, + /// AuthParams = + /// { + /// { "scope", "openid email profile offline_access" }, + /// { "response_type", "code" }, + /// }, /// Totp = new Auth0.Inputs.ConnectionOptionsTotpArgs /// { - /// Length = 6, /// TimeStep = 300, + /// Length = 6, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// <!--End PulumiCodeChooser --> + /// + /// ### SAML Connection + /// + /// <!--Start PulumiCodeChooser --> + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Auth0 = Pulumi.Auth0; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // This is an example of a SAML connection. + /// var samlp = new Auth0.Connection("samlp", new() + /// { + /// Name = "SAML-Connection", + /// Strategy = "samlp", + /// Options = new Auth0.Inputs.ConnectionOptionsArgs + /// { + /// Debug = false, + /// SigningCert = "<signing-certificate>", + /// SignInEndpoint = "https://saml.provider/sign_in", + /// SignOutEndpoint = "https://saml.provider/sign_out", + /// DisableSignOut = true, + /// TenantDomain = "example.com", + /// DomainAliases = new[] + /// { + /// "example.com", + /// "alias.example.com", + /// }, + /// ProtocolBinding = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + /// RequestTemplate = @"<samlp:AuthnRequest xmlns:samlp=""urn:oasis:names:tc:SAML:2.0:protocol"" + /// @@AssertServiceURLAndDestination@@ + /// ID=""@@ID@@"" + /// IssueInstant=""@@IssueInstant@@"" + /// ProtocolBinding=""@@ProtocolBinding@@"" Version=""2.0""> + /// <saml:Issuer xmlns:saml=""urn:oasis:names:tc:SAML:2.0:assertion"">@@Issuer@@</saml:Issuer> + /// </samlp:AuthnRequest>", + /// UserIdAttribute = "https://saml.provider/imi/ns/identity-200810", + /// SignatureAlgorithm = "rsa-sha256", + /// DigestAlgorithm = "sha256", + /// IconUrl = "https://saml.provider/assets/logo.png", + /// EntityId = "<entity_id>", + /// MetadataXml = @" <?xml version=""1.0""?> + /// <md:EntityDescriptor xmlns:md=""urn:oasis:names:tc:SAML:2.0:metadata"" xmlns:ds=""http://www.w3.org/2000/09/xmldsig#"" entityID=""https://example.com""> + /// <md:IDPSSODescriptor protocolSupportEnumeration=""urn:oasis:names:tc:SAML:2.0:protocol""> + /// <md:SingleLogoutService Binding=""urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"" Location=""https://saml.provider/sign_out""/> + /// <md:SingleSignOnService Binding=""urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"" Location=""https://saml.provider/sign_in""/> + /// </md:IDPSSODescriptor> + /// </md:EntityDescriptor> + /// ", + /// MetadataUrl = "https://saml.provider/imi/ns/FederationMetadata.xml", + /// FieldsMap = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["name"] = new[] + /// { + /// "name", + /// "nameidentifier", + /// }, + /// ["email"] = new[] + /// { + /// "emailaddress", + /// "nameidentifier", + /// }, + /// ["family_name"] = "surname", + /// }), + /// SigningKey = new Auth0.Inputs.ConnectionOptionsSigningKeyArgs + /// { + /// Key = @"-----BEGIN PRIVATE KEY----- + /// ...{your private key here}... + /// -----END PRIVATE KEY-----", + /// Cert = @"-----BEGIN CERTIFICATE----- + /// ...{your public key cert here}... + /// -----END CERTIFICATE-----", + /// }, + /// DecryptionKey = new Auth0.Inputs.ConnectionOptionsDecryptionKeyArgs + /// { + /// Key = @"-----BEGIN PRIVATE KEY----- + /// ...{your private key here}... + /// -----END PRIVATE KEY-----", + /// Cert = @"-----BEGIN CERTIFICATE----- + /// ...{your public key cert here}... + /// -----END CERTIFICATE-----", + /// }, + /// IdpInitiated = new Auth0.Inputs.ConnectionOptionsIdpInitiatedArgs + /// { + /// ClientId = "client_id", + /// ClientProtocol = "samlp", + /// ClientAuthorizeQuery = "type=code&timeout=30", /// }, /// }, - /// Strategy = "email", /// }); /// /// }); @@ -408,26 +743,178 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { + /// // This is an example of a WindowsLive connection. /// var windowslive = new Auth0.Connection("windowslive", new() /// { + /// Name = "Windowslive-Connection", + /// Strategy = "windowslive", /// Options = new Auth0.Inputs.ConnectionOptionsArgs /// { /// ClientId = "<client-id>", /// ClientSecret = "<client-secret>", + /// StrategyVersion = 2, + /// Scopes = new[] + /// { + /// "signin", + /// "graph_user", + /// }, + /// SetUserRootAttributes = "on_first_login", /// NonPersistentAttrs = new[] /// { /// "ethnicity", /// "gender", /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// <!--End PulumiCodeChooser --> + /// + /// ### OIDC Connection + /// + /// <!--Start PulumiCodeChooser --> + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Auth0 = Pulumi.Auth0; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // This is an example of an OIDC connection. + /// var oidc = new Auth0.Connection("oidc", new() + /// { + /// Name = "oidc-connection", + /// DisplayName = "OIDC Connection", + /// Strategy = "oidc", + /// ShowAsButton = false, + /// Options = new Auth0.Inputs.ConnectionOptionsArgs + /// { + /// ClientId = "1234567", + /// ClientSecret = "1234567", + /// DomainAliases = new[] + /// { + /// "example.com", + /// }, + /// TenantDomain = "", + /// IconUrl = "https://example.com/assets/logo.png", + /// Type = "back_channel", + /// Issuer = "https://www.paypalobjects.com", + /// JwksUri = "https://api.paypal.com/v1/oauth2/certs", + /// DiscoveryUrl = "https://www.paypalobjects.com/.well-known/openid-configuration", + /// TokenEndpoint = "https://api.paypal.com/v1/oauth2/token", + /// UserinfoEndpoint = "https://api.paypal.com/v1/oauth2/token/userinfo", + /// AuthorizationEndpoint = "https://www.paypal.com/signin/authorize", /// Scopes = new[] /// { - /// "signin", - /// "graph_user", + /// "openid", + /// "email", /// }, /// SetUserRootAttributes = "on_first_login", - /// StrategyVersion = 2, + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, + /// ConnectionSettings = new Auth0.Inputs.ConnectionOptionsConnectionSettingsArgs + /// { + /// Pkce = "auto", + /// }, + /// AttributeMap = new Auth0.Inputs.ConnectionOptionsAttributeMapArgs + /// { + /// MappingMode = "use_map", + /// UserinfoScope = "openid email profile groups", + /// Attributes = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["name"] = "${context.tokenset.name}", + /// ["email"] = "${context.tokenset.email}", + /// ["email_verified"] = "${context.tokenset.email_verified}", + /// ["nickname"] = "${context.tokenset.nickname}", + /// ["picture"] = "${context.tokenset.picture}", + /// ["given_name"] = "${context.tokenset.given_name}", + /// ["family_name"] = "${context.tokenset.family_name}", + /// }), + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// <!--End PulumiCodeChooser --> + /// + /// ### Okta Connection + /// + /// <!--Start PulumiCodeChooser --> + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Auth0 = Pulumi.Auth0; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // This is an example of an Okta Workforce connection. + /// var okta = new Auth0.Connection("okta", new() + /// { + /// Name = "okta-connection", + /// DisplayName = "Okta Workforce Connection", + /// Strategy = "okta", + /// ShowAsButton = false, + /// Options = new Auth0.Inputs.ConnectionOptionsArgs + /// { + /// ClientId = "1234567", + /// ClientSecret = "1234567", + /// Domain = "example.okta.com", + /// DomainAliases = new[] + /// { + /// "example.com", + /// }, + /// Issuer = "https://example.okta.com", + /// JwksUri = "https://example.okta.com/oauth2/v1/keys", + /// TokenEndpoint = "https://example.okta.com/oauth2/v1/token", + /// UserinfoEndpoint = "https://example.okta.com/oauth2/v1/userinfo", + /// AuthorizationEndpoint = "https://example.okta.com/oauth2/v1/authorize", + /// Scopes = new[] + /// { + /// "openid", + /// "email", + /// }, + /// SetUserRootAttributes = "on_first_login", + /// NonPersistentAttrs = new[] + /// { + /// "ethnicity", + /// "gender", + /// }, + /// UpstreamParams = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["screen_name"] = new Dictionary<string, object?> + /// { + /// ["alias"] = "login_hint", + /// }, + /// }), + /// ConnectionSettings = new Auth0.Inputs.ConnectionOptionsConnectionSettingsArgs + /// { + /// Pkce = "auto", + /// }, + /// AttributeMap = new Auth0.Inputs.ConnectionOptionsAttributeMapArgs + /// { + /// MappingMode = "basic_profile", + /// UserinfoScope = "openid email profile groups", + /// Attributes = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["name"] = "${context.tokenset.name}", + /// ["email"] = "${context.tokenset.email}", + /// ["email_verified"] = "${context.tokenset.email_verified}", + /// ["nickname"] = "${context.tokenset.nickname}", + /// ["picture"] = "${context.tokenset.picture}", + /// ["given_name"] = "${context.tokenset.given_name}", + /// ["family_name"] = "${context.tokenset.family_name}", + /// }), + /// }, /// }, - /// Strategy = "windowslive", /// }); /// /// }); diff --git a/sdk/dotnet/ConnectionClient.cs b/sdk/dotnet/ConnectionClient.cs index 49ae6309..08053633 100644 --- a/sdk/dotnet/ConnectionClient.cs +++ b/sdk/dotnet/ConnectionClient.cs @@ -28,16 +28,20 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myConn = new Auth0.Connection("myConn", new() + /// var myConn = new Auth0.Connection("my_conn", new() /// { + /// Name = "My-Auth0-Connection", /// Strategy = "auth0", /// }); /// - /// var myClient = new Auth0.Client("myClient"); + /// var myClient = new Auth0.Client("my_client", new() + /// { + /// Name = "My-Auth0-Client", + /// }); /// /// // One connection to one client association. /// // To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. - /// var myConnClientAssoc = new Auth0.ConnectionClient("myConnClientAssoc", new() + /// var myConnClientAssoc = new Auth0.ConnectionClient("my_conn_client_assoc", new() /// { /// ConnectionId = myConn.Id, /// ClientId = myClient.Id, diff --git a/sdk/dotnet/ConnectionClients.cs b/sdk/dotnet/ConnectionClients.cs index f5ca51ce..b5d283f4 100644 --- a/sdk/dotnet/ConnectionClients.cs +++ b/sdk/dotnet/ConnectionClients.cs @@ -28,18 +28,25 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myConn = new Auth0.Connection("myConn", new() + /// var myConn = new Auth0.Connection("my_conn", new() /// { + /// Name = "My-Auth0-Connection", /// Strategy = "auth0", /// }); /// - /// var myFirstClient = new Auth0.Client("myFirstClient"); + /// var myFirstClient = new Auth0.Client("my_first_client", new() + /// { + /// Name = "My-First-Auth0-Client", + /// }); /// - /// var mySecondClient = new Auth0.Client("mySecondClient"); + /// var mySecondClient = new Auth0.Client("my_second_client", new() + /// { + /// Name = "My-Second-Auth0-Client", + /// }); /// /// // One connection to many clients association. /// // To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. - /// var myConnClientsAssoc = new Auth0.ConnectionClients("myConnClientsAssoc", new() + /// var myConnClientsAssoc = new Auth0.ConnectionClients("my_conn_clients_assoc", new() /// { /// ConnectionId = myConn.Id, /// EnabledClients = new[] diff --git a/sdk/dotnet/CustomDomain.cs b/sdk/dotnet/CustomDomain.cs index 50a04078..12df69c4 100644 --- a/sdk/dotnet/CustomDomain.cs +++ b/sdk/dotnet/CustomDomain.cs @@ -23,7 +23,7 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myCustomDomain = new Auth0.CustomDomain("myCustomDomain", new() + /// var myCustomDomain = new Auth0.CustomDomain("my_custom_domain", new() /// { /// Domain = "auth.example.com", /// Type = "auth0_managed_certs", diff --git a/sdk/dotnet/EmailProvider.cs b/sdk/dotnet/EmailProvider.cs index bbcf2b33..72b6c67a 100644 --- a/sdk/dotnet/EmailProvider.cs +++ b/sdk/dotnet/EmailProvider.cs @@ -12,58 +12,6 @@ namespace Pulumi.Auth0 /// /// With Auth0, you can have standard welcome, password reset, and account verification email-based workflows built right into Auth0. This resource allows you to configure email providers, so you can route all emails that are part of Auth0's authentication workflows through the supported high-volume email service of your choice. /// - /// ## Example Usage - /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using Auth0 = Pulumi.Auth0; - /// - /// return await Deployment.RunAsync(() => - /// { - /// // This is an example on how to set up the email provider with Amazon SES. - /// var amazonSesEmailProvider = new Auth0.EmailProvider("amazonSesEmailProvider", new() - /// { - /// Credentials = new Auth0.Inputs.EmailProviderCredentialsArgs - /// { - /// AccessKeyId = "AKIAXXXXXXXXXXXXXXXX", - /// Region = "us-east-1", - /// SecretAccessKey = "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - /// }, - /// DefaultFromAddress = "accounts@example.com", - /// Enabled = true, - /// }); - /// - /// // This is an example on how to set up the email provider with Sendgrid. - /// var sendgridEmailProvider = new Auth0.EmailProvider("sendgridEmailProvider", new() - /// { - /// Credentials = new Auth0.Inputs.EmailProviderCredentialsArgs - /// { - /// ApiKey = "secretAPIKey", - /// }, - /// DefaultFromAddress = "accounts@example.com", - /// Enabled = true, - /// }); - /// - /// // This is an example on how to set up the email provider with MS365. - /// var smtpEmailProvider = new Auth0.EmailProvider("smtpEmailProvider", new() - /// { - /// Credentials = new Auth0.Inputs.EmailProviderCredentialsArgs - /// { - /// Ms365ClientId = "ms365_client_id", - /// Ms365ClientSecret = "ms365_client_secret", - /// Ms365TenantId = "ms365_tenant_id", - /// }, - /// DefaultFromAddress = "accounts@example.com", - /// Enabled = true, - /// }); - /// - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// ## Import /// /// As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/dotnet/EmailTemplate.cs b/sdk/dotnet/EmailTemplate.cs index 0687b3d7..be2b7284 100644 --- a/sdk/dotnet/EmailTemplate.cs +++ b/sdk/dotnet/EmailTemplate.cs @@ -23,8 +23,9 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myEmailProvider = new Auth0.EmailProvider("myEmailProvider", new() + /// var myEmailProvider = new Auth0.EmailProvider("my_email_provider", new() /// { + /// Name = "ses", /// Enabled = true, /// DefaultFromAddress = "accounts@example.com", /// Credentials = new Auth0.Inputs.EmailProviderCredentialsArgs @@ -35,7 +36,7 @@ namespace Pulumi.Auth0 /// }, /// }); /// - /// var myEmailTemplate = new Auth0.EmailTemplate("myEmailTemplate", new() + /// var myEmailTemplate = new Auth0.EmailTemplate("my_email_template", new() /// { /// Template = "welcome_email", /// Body = "<html><body><h1>Welcome!</h1></body></html>", diff --git a/sdk/dotnet/GetClient.cs b/sdk/dotnet/GetClient.cs index 1fdcfd26..83e92c42 100644 --- a/sdk/dotnet/GetClient.cs +++ b/sdk/dotnet/GetClient.cs @@ -25,11 +25,13 @@ public static class GetClient /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Client loaded using its name. /// var some_client_by_name = Auth0.GetClient.Invoke(new() /// { /// Name = "Name of my Application", /// }); /// + /// // An Auth0 Client loaded using its ID. /// var some_client_by_id = Auth0.GetClient.Invoke(new() /// { /// ClientId = "abcdefghkijklmnopqrstuvwxyz0123456789", @@ -56,11 +58,13 @@ public static Task InvokeAsync(GetClientArgs? args = null, Invo /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Client loaded using its name. /// var some_client_by_name = Auth0.GetClient.Invoke(new() /// { /// Name = "Name of my Application", /// }); /// + /// // An Auth0 Client loaded using its ID. /// var some_client_by_id = Auth0.GetClient.Invoke(new() /// { /// ClientId = "abcdefghkijklmnopqrstuvwxyz0123456789", diff --git a/sdk/dotnet/GetConnection.cs b/sdk/dotnet/GetConnection.cs index dbaea2e7..f892ca2c 100644 --- a/sdk/dotnet/GetConnection.cs +++ b/sdk/dotnet/GetConnection.cs @@ -25,11 +25,13 @@ public static class GetConnection /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Connection loaded using its name. /// var some_connection_by_name = Auth0.GetConnection.Invoke(new() /// { /// Name = "Acceptance-Test-Connection-{{.testName}}", /// }); /// + /// // An Auth0 Connection loaded using its ID. /// var some_connection_by_id = Auth0.GetConnection.Invoke(new() /// { /// ConnectionId = "con_abcdefghkijklmnopqrstuvwxyz0123456789", @@ -56,11 +58,13 @@ public static Task InvokeAsync(GetConnectionArgs? args = nu /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Connection loaded using its name. /// var some_connection_by_name = Auth0.GetConnection.Invoke(new() /// { /// Name = "Acceptance-Test-Connection-{{.testName}}", /// }); /// + /// // An Auth0 Connection loaded using its ID. /// var some_connection_by_id = Auth0.GetConnection.Invoke(new() /// { /// ConnectionId = "con_abcdefghkijklmnopqrstuvwxyz0123456789", diff --git a/sdk/dotnet/GetOrganization.cs b/sdk/dotnet/GetOrganization.cs index 19e46313..f845aaf9 100644 --- a/sdk/dotnet/GetOrganization.cs +++ b/sdk/dotnet/GetOrganization.cs @@ -25,11 +25,13 @@ public static class GetOrganization /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Organization loaded using its name. /// var some_organization_by_name = Auth0.GetOrganization.Invoke(new() /// { /// Name = "my-org", /// }); /// + /// // An Auth0 Organization loaded using its ID. /// var some_organization_by_id = Auth0.GetOrganization.Invoke(new() /// { /// OrganizationId = "org_abcdefghkijklmnopqrstuvwxyz0123456789", @@ -56,11 +58,13 @@ public static Task InvokeAsync(GetOrganizationArgs? args /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Organization loaded using its name. /// var some_organization_by_name = Auth0.GetOrganization.Invoke(new() /// { /// Name = "my-org", /// }); /// + /// // An Auth0 Organization loaded using its ID. /// var some_organization_by_id = Auth0.GetOrganization.Invoke(new() /// { /// OrganizationId = "org_abcdefghkijklmnopqrstuvwxyz0123456789", diff --git a/sdk/dotnet/GetResourceServer.cs b/sdk/dotnet/GetResourceServer.cs index ea62654f..458124c4 100644 --- a/sdk/dotnet/GetResourceServer.cs +++ b/sdk/dotnet/GetResourceServer.cs @@ -25,11 +25,13 @@ public static class GetResourceServer /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Resource Server loaded using its identifier. /// var some_resource_server_by_identifier = Auth0.GetResourceServer.Invoke(new() /// { /// Identifier = "https://my-api.com/v1", /// }); /// + /// // An Auth0 Resource Server loaded using its ID. /// var some_resource_server_by_id = Auth0.GetResourceServer.Invoke(new() /// { /// ResourceServerId = "abcdefghkijklmnopqrstuvwxyz0123456789", @@ -56,11 +58,13 @@ public static Task InvokeAsync(GetResourceServerArgs? a /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Resource Server loaded using its identifier. /// var some_resource_server_by_identifier = Auth0.GetResourceServer.Invoke(new() /// { /// Identifier = "https://my-api.com/v1", /// }); /// + /// // An Auth0 Resource Server loaded using its ID. /// var some_resource_server_by_id = Auth0.GetResourceServer.Invoke(new() /// { /// ResourceServerId = "abcdefghkijklmnopqrstuvwxyz0123456789", diff --git a/sdk/dotnet/GetRole.cs b/sdk/dotnet/GetRole.cs index 8b4c33b2..3931e1b9 100644 --- a/sdk/dotnet/GetRole.cs +++ b/sdk/dotnet/GetRole.cs @@ -25,11 +25,13 @@ public static class GetRole /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Role loaded using its name. /// var some_role_by_name = Auth0.GetRole.Invoke(new() /// { /// Name = "my-role", /// }); /// + /// // An Auth0 Role loaded using its ID. /// var some_role_by_id = Auth0.GetRole.Invoke(new() /// { /// RoleId = "abcdefghkijklmnopqrstuvwxyz0123456789", @@ -56,11 +58,13 @@ public static Task InvokeAsync(GetRoleArgs? args = null, InvokeOp /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 Role loaded using its name. /// var some_role_by_name = Auth0.GetRole.Invoke(new() /// { /// Name = "my-role", /// }); /// + /// // An Auth0 Role loaded using its ID. /// var some_role_by_id = Auth0.GetRole.Invoke(new() /// { /// RoleId = "abcdefghkijklmnopqrstuvwxyz0123456789", diff --git a/sdk/dotnet/GetUser.cs b/sdk/dotnet/GetUser.cs index dca3a513..1febb22c 100644 --- a/sdk/dotnet/GetUser.cs +++ b/sdk/dotnet/GetUser.cs @@ -25,6 +25,7 @@ public static class GetUser /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 User loaded using its ID. /// var myUser = Auth0.GetUser.Invoke(new() /// { /// UserId = "auth0|34fdr23fdsfdfsf", @@ -51,6 +52,7 @@ public static Task InvokeAsync(GetUserArgs args, InvokeOptions? o /// /// return await Deployment.RunAsync(() => /// { + /// // An Auth0 User loaded using its ID. /// var myUser = Auth0.GetUser.Invoke(new() /// { /// UserId = "auth0|34fdr23fdsfdfsf", diff --git a/sdk/dotnet/Guardian.cs b/sdk/dotnet/Guardian.cs index 5fe20e6c..210a71f2 100644 --- a/sdk/dotnet/Guardian.cs +++ b/sdk/dotnet/Guardian.cs @@ -23,20 +23,25 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myGuardian = new Auth0.Guardian("myGuardian", new() + /// var myGuardian = new Auth0.Guardian("my_guardian", new() /// { - /// Duo = new Auth0.Inputs.GuardianDuoArgs + /// Policy = "all-applications", + /// Email = true, + /// Otp = true, + /// RecoveryCode = true, + /// WebauthnPlatform = new Auth0.Inputs.GuardianWebauthnPlatformArgs /// { /// Enabled = true, - /// Hostname = "api-hostname", - /// IntegrationKey = "someKey", - /// SecretKey = "someSecret", /// }, - /// Email = true, - /// Otp = true, + /// WebauthnRoaming = new Auth0.Inputs.GuardianWebauthnRoamingArgs + /// { + /// Enabled = true, + /// UserVerification = "required", + /// }, /// Phone = new Auth0.Inputs.GuardianPhoneArgs /// { /// Enabled = true, + /// Provider = "auth0", /// MessageTypes = new[] /// { /// "sms", @@ -47,11 +52,11 @@ namespace Pulumi.Auth0 /// EnrollmentMessage = "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", /// VerificationMessage = "{{code}} is your verification code for {{tenant.friendly_name}}.", /// }, - /// Provider = "auth0", /// }, - /// Policy = "all-applications", /// Push = new Auth0.Inputs.GuardianPushArgs /// { + /// Enabled = true, + /// Provider = "sns", /// AmazonSns = new Auth0.Inputs.GuardianPushAmazonSnsArgs /// { /// AwsAccessKeyId = "test1", @@ -66,18 +71,13 @@ namespace Pulumi.Auth0 /// AppleAppLink = "https://itunes.apple.com/us/app/my-app/id123121", /// GoogleAppLink = "https://play.google.com/store/apps/details?id=com.my.app", /// }, - /// Enabled = true, - /// Provider = "sns", /// }, - /// RecoveryCode = true, - /// WebauthnPlatform = new Auth0.Inputs.GuardianWebauthnPlatformArgs - /// { - /// Enabled = true, - /// }, - /// WebauthnRoaming = new Auth0.Inputs.GuardianWebauthnRoamingArgs + /// Duo = new Auth0.Inputs.GuardianDuoArgs /// { /// Enabled = true, - /// UserVerification = "required", + /// IntegrationKey = "someKey", + /// SecretKey = "someSecret", + /// Hostname = "api-hostname", /// }, /// }); /// diff --git a/sdk/dotnet/Hook.cs b/sdk/dotnet/Hook.cs index 90d44e1a..3f30cbd7 100644 --- a/sdk/dotnet/Hook.cs +++ b/sdk/dotnet/Hook.cs @@ -25,23 +25,23 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myHook = new Auth0.Hook("myHook", new() + /// var myHook = new Auth0.Hook("my_hook", new() /// { - /// Dependencies = - /// { - /// { "auth0", "2.30.0" }, - /// }, - /// Enabled = true, + /// Name = "My Pre User Registration Hook", /// Script = @" function (user, context, callback) { /// callback(null, { user }); /// } - /// /// ", + /// TriggerId = "pre-user-registration", + /// Enabled = true, /// Secrets = /// { /// { "foo", "bar" }, /// }, - /// TriggerId = "pre-user-registration", + /// Dependencies = + /// { + /// { "auth0", "2.30.0" }, + /// }, /// }); /// /// }); diff --git a/sdk/dotnet/LogStream.cs b/sdk/dotnet/LogStream.cs index 0ef18045..15c0674e 100644 --- a/sdk/dotnet/LogStream.cs +++ b/sdk/dotnet/LogStream.cs @@ -24,26 +24,29 @@ namespace Pulumi.Auth0 /// return await Deployment.RunAsync(() => /// { /// // This is an example of an http log stream. - /// var myWebhook = new Auth0.LogStream("myWebhook", new() + /// var myWebhook = new Auth0.LogStream("my_webhook", new() /// { + /// Name = "HTTP log stream", + /// Type = "http", /// Filters = new[] /// { /// /// { - /// { "name", "auth.login.fail" }, /// { "type", "category" }, + /// { "name", "auth.login.fail" }, /// }, /// /// { - /// { "name", "auth.signup.fail" }, /// { "type", "category" }, + /// { "name", "auth.signup.fail" }, /// }, /// }, /// Sink = new Auth0.Inputs.LogStreamSinkArgs /// { - /// HttpAuthorization = "AKIAXXXXXXXXXXXXXXXX", - /// HttpContentFormat = "JSONOBJECT", + /// HttpEndpoint = "https://example.com/logs", /// HttpContentType = "application/json", + /// HttpContentFormat = "JSONOBJECT", + /// HttpAuthorization = "AKIAXXXXXXXXXXXXXXXX", /// HttpCustomHeaders = new[] /// { /// @@ -52,21 +55,20 @@ namespace Pulumi.Auth0 /// { "value", "bar" }, /// }, /// }, - /// HttpEndpoint = "https://example.com/logs", /// }, - /// Type = "http", /// }); /// /// // This is an example of an Amazon EventBridge log stream. - /// var exampleAws = new Auth0.LogStream("exampleAws", new() + /// var exampleAws = new Auth0.LogStream("example_aws", new() /// { + /// Name = "AWS Eventbridge", + /// Type = "eventbridge", + /// Status = "active", /// Sink = new Auth0.Inputs.LogStreamSinkArgs /// { /// AwsAccountId = "my_account_id", /// AwsRegion = "us-east-2", /// }, - /// Status = "active", - /// Type = "eventbridge", /// }); /// /// }); diff --git a/sdk/dotnet/Organization.cs b/sdk/dotnet/Organization.cs index 328b9764..9fbf7b16 100644 --- a/sdk/dotnet/Organization.cs +++ b/sdk/dotnet/Organization.cs @@ -29,18 +29,19 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myOrganization = new Auth0.Organization("myOrganization", new() + /// var myOrganization = new Auth0.Organization("my_organization", new() /// { + /// Name = "auth0-inc", + /// DisplayName = "Auth0 Inc.", /// Branding = new Auth0.Inputs.OrganizationBrandingArgs /// { + /// LogoUrl = "https://example.com/assets/icons/icon.png", /// Colors = /// { - /// { "pageBackground", "#e1e1e1" }, /// { "primary", "#f2f2f2" }, + /// { "page_background", "#e1e1e1" }, /// }, - /// LogoUrl = "https://example.com/assets/icons/icon.png", /// }, - /// DisplayName = "Auth0 Inc.", /// }); /// /// }); diff --git a/sdk/dotnet/OrganizationConnection.cs b/sdk/dotnet/OrganizationConnection.cs index fe72be80..ef660bd6 100644 --- a/sdk/dotnet/OrganizationConnection.cs +++ b/sdk/dotnet/OrganizationConnection.cs @@ -28,17 +28,19 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myConnection = new Auth0.Connection("myConnection", new() + /// var myConnection = new Auth0.Connection("my_connection", new() /// { + /// Name = "My Connection", /// Strategy = "auth0", /// }); /// - /// var myOrganization = new Auth0.Organization("myOrganization", new() + /// var myOrganization = new Auth0.Organization("my_organization", new() /// { + /// Name = "my-organization", /// DisplayName = "My Organization", /// }); /// - /// var myOrgConn = new Auth0.OrganizationConnection("myOrgConn", new() + /// var myOrgConn = new Auth0.OrganizationConnection("my_org_conn", new() /// { /// OrganizationId = myOrganization.Id, /// ConnectionId = myConnection.Id, diff --git a/sdk/dotnet/OrganizationConnections.cs b/sdk/dotnet/OrganizationConnections.cs index 77ff296e..33684555 100644 --- a/sdk/dotnet/OrganizationConnections.cs +++ b/sdk/dotnet/OrganizationConnections.cs @@ -28,18 +28,21 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myConnection_1 = new Auth0.Connection("myConnection-1", new() + /// var myConnection_1 = new Auth0.Connection("my_connection-1", new() /// { + /// Name = "My Connection 1", /// Strategy = "auth0", /// }); /// - /// var myConnection_2 = new Auth0.Connection("myConnection-2", new() + /// var myConnection_2 = new Auth0.Connection("my_connection-2", new() /// { + /// Name = "My Connection 2", /// Strategy = "auth0", /// }); /// - /// var myOrganization = new Auth0.Organization("myOrganization", new() + /// var myOrganization = new Auth0.Organization("my_organization", new() /// { + /// Name = "my-organization", /// DisplayName = "My Organization", /// }); /// diff --git a/sdk/dotnet/OrganizationMember.cs b/sdk/dotnet/OrganizationMember.cs index 50721eb8..7b8bf341 100644 --- a/sdk/dotnet/OrganizationMember.cs +++ b/sdk/dotnet/OrganizationMember.cs @@ -35,12 +35,13 @@ namespace Pulumi.Auth0 /// Password = "MyPass123$", /// }); /// - /// var myOrg = new Auth0.Organization("myOrg", new() + /// var myOrg = new Auth0.Organization("my_org", new() /// { + /// Name = "org-admin", /// DisplayName = "Admin", /// }); /// - /// var myOrgMember = new Auth0.OrganizationMember("myOrgMember", new() + /// var myOrgMember = new Auth0.OrganizationMember("my_org_member", new() /// { /// OrganizationId = myOrg.Id, /// UserId = user.Id, diff --git a/sdk/dotnet/OrganizationMemberRole.cs b/sdk/dotnet/OrganizationMemberRole.cs index 9e701180..922dc897 100644 --- a/sdk/dotnet/OrganizationMemberRole.cs +++ b/sdk/dotnet/OrganizationMemberRole.cs @@ -23,9 +23,15 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var reader = new Auth0.Role("reader"); + /// var reader = new Auth0.Role("reader", new() + /// { + /// Name = "Reader", + /// }); /// - /// var writer = new Auth0.Role("writer"); + /// var writer = new Auth0.Role("writer", new() + /// { + /// Name = "Writer", + /// }); /// /// var user = new Auth0.User("user", new() /// { @@ -34,12 +40,13 @@ namespace Pulumi.Auth0 /// Password = "MyPass123$", /// }); /// - /// var myOrg = new Auth0.Organization("myOrg", new() + /// var myOrg = new Auth0.Organization("my_org", new() /// { + /// Name = "some-org", /// DisplayName = "Some Org", /// }); /// - /// var myOrgMember = new Auth0.OrganizationMember("myOrgMember", new() + /// var myOrgMember = new Auth0.OrganizationMember("my_org_member", new() /// { /// OrganizationId = myOrg.Id, /// UserId = user.Id, diff --git a/sdk/dotnet/OrganizationMemberRoles.cs b/sdk/dotnet/OrganizationMemberRoles.cs index d2b838c6..e999261d 100644 --- a/sdk/dotnet/OrganizationMemberRoles.cs +++ b/sdk/dotnet/OrganizationMemberRoles.cs @@ -23,9 +23,15 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var reader = new Auth0.Role("reader"); + /// var reader = new Auth0.Role("reader", new() + /// { + /// Name = "Reader", + /// }); /// - /// var writer = new Auth0.Role("writer"); + /// var writer = new Auth0.Role("writer", new() + /// { + /// Name = "Writer", + /// }); /// /// var user = new Auth0.User("user", new() /// { @@ -34,18 +40,19 @@ namespace Pulumi.Auth0 /// Password = "MyPass123$", /// }); /// - /// var myOrg = new Auth0.Organization("myOrg", new() + /// var myOrg = new Auth0.Organization("my_org", new() /// { + /// Name = "some-org", /// DisplayName = "Some Org", /// }); /// - /// var myOrgMember = new Auth0.OrganizationMember("myOrgMember", new() + /// var myOrgMember = new Auth0.OrganizationMember("my_org_member", new() /// { /// OrganizationId = myOrg.Id, /// UserId = user.Id, /// }); /// - /// var myOrgMemberRoles = new Auth0.OrganizationMemberRoles("myOrgMemberRoles", new() + /// var myOrgMemberRoles = new Auth0.OrganizationMemberRoles("my_org_member_roles", new() /// { /// OrganizationId = myOrg.Id, /// UserId = user.Id, diff --git a/sdk/dotnet/OrganizationMembers.cs b/sdk/dotnet/OrganizationMembers.cs index b5ef07df..e0f6a95c 100644 --- a/sdk/dotnet/OrganizationMembers.cs +++ b/sdk/dotnet/OrganizationMembers.cs @@ -28,26 +28,27 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var user1 = new Auth0.User("user1", new() + /// var user1 = new Auth0.User("user_1", new() /// { /// ConnectionName = "Username-Password-Authentication", /// Email = "myuser1@auth0.com", /// Password = "MyPass123$", /// }); /// - /// var user2 = new Auth0.User("user2", new() + /// var user2 = new Auth0.User("user_2", new() /// { /// ConnectionName = "Username-Password-Authentication", /// Email = "myuser2@auth0.com", /// Password = "MyPass123$", /// }); /// - /// var myOrg = new Auth0.Organization("myOrg", new() + /// var myOrg = new Auth0.Organization("my_org", new() /// { + /// Name = "some-org", /// DisplayName = "Some Organization", /// }); /// - /// var myMembers = new Auth0.OrganizationMembers("myMembers", new() + /// var myMembers = new Auth0.OrganizationMembers("my_members", new() /// { /// OrganizationId = myOrg.Id, /// Members = new[] diff --git a/sdk/dotnet/Pages.cs b/sdk/dotnet/Pages.cs index 45ab82c4..1a52784e 100644 --- a/sdk/dotnet/Pages.cs +++ b/sdk/dotnet/Pages.cs @@ -23,28 +23,28 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myPages = new Auth0.Pages("myPages", new() + /// var myPages = new Auth0.Pages("my_pages", new() /// { - /// ChangePassword = new Auth0.Inputs.PagesChangePasswordArgs + /// Login = new Auth0.Inputs.PagesLoginArgs /// { /// Enabled = true, - /// Html = "<html><body>My Custom Reset Password Page</body></html>", + /// Html = "<html><body>My Custom Login Page</body></html>", /// }, - /// Error = new Auth0.Inputs.PagesErrorArgs + /// ChangePassword = new Auth0.Inputs.PagesChangePasswordArgs /// { - /// Html = "<html><body>My Custom Error Page</body></html>", - /// ShowLogLink = true, - /// Url = "https://example.com", + /// Enabled = true, + /// Html = "<html><body>My Custom Reset Password Page</body></html>", /// }, /// GuardianMfa = new Auth0.Inputs.PagesGuardianMfaArgs /// { /// Enabled = true, /// Html = "<html><body>My Custom MFA Page</body></html>", /// }, - /// Login = new Auth0.Inputs.PagesLoginArgs + /// Error = new Auth0.Inputs.PagesErrorArgs /// { - /// Enabled = true, - /// Html = "<html><body>My Custom Login Page</body></html>", + /// ShowLogLink = true, + /// Html = "<html><body>My Custom Error Page</body></html>", + /// Url = "https://example.com", /// }, /// }); /// diff --git a/sdk/dotnet/Prompt.cs b/sdk/dotnet/Prompt.cs index 688ccd8d..0598acaf 100644 --- a/sdk/dotnet/Prompt.cs +++ b/sdk/dotnet/Prompt.cs @@ -23,10 +23,10 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myPrompt = new Auth0.Prompt("myPrompt", new() + /// var myPrompt = new Auth0.Prompt("my_prompt", new() /// { - /// IdentifierFirst = false, /// UniversalLoginExperience = "new", + /// IdentifierFirst = false, /// WebauthnPlatformFirstFactor = true, /// }); /// diff --git a/sdk/dotnet/PromptPartials.cs b/sdk/dotnet/PromptPartials.cs index 676a471d..76986a78 100644 --- a/sdk/dotnet/PromptPartials.cs +++ b/sdk/dotnet/PromptPartials.cs @@ -23,15 +23,15 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myLoginPromptPartials = new Auth0.PromptPartials("myLoginPromptPartials", new() + /// var myLoginPromptPartials = new Auth0.PromptPartials("my_login_prompt_partials", new() /// { - /// FormContentEnd = "<div>Updated Form Content End</div>", + /// Prompt = "login", /// FormContentStart = "<div>Updated Form Content Start</div>", - /// FormFooterEnd = "<div>Updated Footer End</div>", + /// FormContentEnd = "<div>Updated Form Content End</div>", /// FormFooterStart = "<div>Updated Footer Start</div>", - /// Prompt = "login", - /// SecondaryActionsEnd = "<div>Updated Secondary Actions End</div>", + /// FormFooterEnd = "<div>Updated Footer End</div>", /// SecondaryActionsStart = "<div>Updated Secondary Actions Start</div>", + /// SecondaryActionsEnd = "<div>Updated Secondary Actions End</div>", /// }); /// /// }); diff --git a/sdk/dotnet/ResourceServer.cs b/sdk/dotnet/ResourceServer.cs index 91a29790..67f3bd4e 100644 --- a/sdk/dotnet/ResourceServer.cs +++ b/sdk/dotnet/ResourceServer.cs @@ -23,13 +23,14 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myResourceServer = new Auth0.ResourceServer("myResourceServer", new() + /// var myResourceServer = new Auth0.ResourceServer("my_resource_server", new() /// { - /// AllowOfflineAccess = true, + /// Name = "Example Resource Server (Managed by Terraform)", /// Identifier = "https://api.example.com", /// SigningAlg = "RS256", - /// SkipConsentForVerifiableFirstPartyClients = true, + /// AllowOfflineAccess = true, /// TokenLifetime = 8600, + /// SkipConsentForVerifiableFirstPartyClients = true, /// }); /// /// }); diff --git a/sdk/dotnet/ResourceServerScope.cs b/sdk/dotnet/ResourceServerScope.cs index 1f75e978..ccddeb5f 100644 --- a/sdk/dotnet/ResourceServerScope.cs +++ b/sdk/dotnet/ResourceServerScope.cs @@ -27,18 +27,19 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var resourceServer = new Auth0.ResourceServer("resourceServer", new() + /// var resourceServer = new Auth0.ResourceServer("resource_server", new() /// { + /// Name = "Example Resource Server (Managed by Terraform)", /// Identifier = "https://api.example.com", /// }); /// - /// var readPosts = new Auth0.ResourceServerScope("readPosts", new() + /// var readPosts = new Auth0.ResourceServerScope("read_posts", new() /// { /// ResourceServerIdentifier = resourceServer.Identifier, /// Scope = "read:posts", /// }); /// - /// var writePosts = new Auth0.ResourceServerScope("writePosts", new() + /// var writePosts = new Auth0.ResourceServerScope("write_posts", new() /// { /// ResourceServerIdentifier = resourceServer.Identifier, /// Scope = "write:posts", diff --git a/sdk/dotnet/ResourceServerScopes.cs b/sdk/dotnet/ResourceServerScopes.cs index ee49a5d8..18d3eede 100644 --- a/sdk/dotnet/ResourceServerScopes.cs +++ b/sdk/dotnet/ResourceServerScopes.cs @@ -28,12 +28,13 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myApi = new Auth0.ResourceServer("myApi", new() + /// var myApi = new Auth0.ResourceServer("my_api", new() /// { + /// Name = "Example Resource Server (Managed by Terraform)", /// Identifier = "https://api.example.com", /// }); /// - /// var myApiScopes = new Auth0.ResourceServerScopes("myApiScopes", new() + /// var myApiScopes = new Auth0.ResourceServerScopes("my_api_scopes", new() /// { /// ResourceServerIdentifier = myApi.Identifier, /// Scopes = new[] diff --git a/sdk/dotnet/Role.cs b/sdk/dotnet/Role.cs index 421f55c3..a9fb1471 100644 --- a/sdk/dotnet/Role.cs +++ b/sdk/dotnet/Role.cs @@ -23,8 +23,9 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myRole = new Auth0.Role("myRole", new() + /// var myRole = new Auth0.Role("my_role", new() /// { + /// Name = "My Role - (Managed by Terraform)", /// Description = "Role Description...", /// }); /// diff --git a/sdk/dotnet/Rule.cs b/sdk/dotnet/Rule.cs index 8084cc31..9cc0c6b9 100644 --- a/sdk/dotnet/Rule.cs +++ b/sdk/dotnet/Rule.cs @@ -25,14 +25,14 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myRule = new Auth0.Rule("myRule", new() + /// var myRule = new Auth0.Rule("my_rule", new() /// { - /// Enabled = true, + /// Name = "empty-rule", /// Script = @" function (user, context, callback) { /// callback(null, user, context); /// } - /// /// ", + /// Enabled = true, /// }); /// /// }); diff --git a/sdk/dotnet/RuleConfig.cs b/sdk/dotnet/RuleConfig.cs index 232ce954..e1257ec7 100644 --- a/sdk/dotnet/RuleConfig.cs +++ b/sdk/dotnet/RuleConfig.cs @@ -23,17 +23,17 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myRule = new Auth0.Rule("myRule", new() + /// var myRule = new Auth0.Rule("my_rule", new() /// { - /// Enabled = true, + /// Name = "empty-rule", /// Script = @" function (user, context, callback) { /// callback(null, user, context); /// } - /// /// ", + /// Enabled = true, /// }); /// - /// var myRuleConfig = new Auth0.RuleConfig("myRuleConfig", new() + /// var myRuleConfig = new Auth0.RuleConfig("my_rule_config", new() /// { /// Key = "foo", /// Value = "bar", diff --git a/sdk/dotnet/Tenant.cs b/sdk/dotnet/Tenant.cs index 15273cb5..2ea6a531 100644 --- a/sdk/dotnet/Tenant.cs +++ b/sdk/dotnet/Tenant.cs @@ -26,40 +26,40 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var myTenant = new Auth0.Tenant("myTenant", new() + /// var myTenant = new Auth0.Tenant("my_tenant", new() /// { + /// FriendlyName = "Tenant Name", + /// PictureUrl = "http://example.com/logo.png", + /// SupportEmail = "support@example.com", + /// SupportUrl = "http://example.com/support", /// AllowedLogoutUrls = new[] /// { /// "http://example.com/logout", /// }, - /// DefaultRedirectionUri = "https://example.com/login", + /// SessionLifetime = 8760, + /// SandboxVersion = "12", /// EnabledLocales = new[] /// { /// "en", /// }, + /// DefaultRedirectionUri = "https://example.com/login", /// Flags = new Auth0.Inputs.TenantFlagsArgs /// { /// DisableClickjackProtectionHeaders = true, - /// DisableFieldsMapFix = false, - /// DisableManagementApiSmsObfuscation = false, /// EnablePublicSignupUserExistsError = true, - /// NoDiscloseEnterpriseConnections = false, /// UseScopeDescriptionsForConsent = true, + /// NoDiscloseEnterpriseConnections = false, + /// DisableManagementApiSmsObfuscation = false, + /// DisableFieldsMapFix = false, /// }, - /// FriendlyName = "Tenant Name", - /// PictureUrl = "http://example.com/logo.png", - /// SandboxVersion = "12", /// SessionCookie = new Auth0.Inputs.TenantSessionCookieArgs /// { /// Mode = "non-persistent", /// }, - /// SessionLifetime = 8760, /// Sessions = new Auth0.Inputs.TenantSessionsArgs /// { /// OidcLogoutPromptEnabled = false, /// }, - /// SupportEmail = "support@example.com", - /// SupportUrl = "http://example.com/support", /// }); /// /// }); diff --git a/sdk/dotnet/TriggerAction.cs b/sdk/dotnet/TriggerAction.cs index 9435648f..f311497c 100644 --- a/sdk/dotnet/TriggerAction.cs +++ b/sdk/dotnet/TriggerAction.cs @@ -29,8 +29,9 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var loginAlert = new Auth0.Action("loginAlert", new() + /// var loginAlert = new Auth0.Action("login_alert", new() /// { + /// Name = "Alert after login", /// Code = @"exports.onContinuePostLogin = async (event, api) => { /// console.log(""foo""); /// };"" @@ -43,7 +44,7 @@ namespace Pulumi.Auth0 /// }, /// }); /// - /// var postLoginAlertAction = new Auth0.TriggerAction("postLoginAlertAction", new() + /// var postLoginAlertAction = new Auth0.TriggerAction("post_login_alert_action", new() /// { /// Trigger = "post-login", /// ActionId = loginAlert.Id, diff --git a/sdk/dotnet/TriggerActions.cs b/sdk/dotnet/TriggerActions.cs index be8ff846..4a004dfd 100644 --- a/sdk/dotnet/TriggerActions.cs +++ b/sdk/dotnet/TriggerActions.cs @@ -27,8 +27,9 @@ namespace Pulumi.Auth0 /// /// return await Deployment.RunAsync(() => /// { - /// var actionFoo = new Auth0.Action("actionFoo", new() + /// var actionFoo = new Auth0.Action("action_foo", new() /// { + /// Name = "Test Trigger Binding Foo", /// Code = @"exports.onContinuePostLogin = async (event, api) => { /// console.log(""foo""); /// };"" @@ -41,8 +42,9 @@ namespace Pulumi.Auth0 /// }, /// }); /// - /// var actionBar = new Auth0.Action("actionBar", new() + /// var actionBar = new Auth0.Action("action_bar", new() /// { + /// Name = "Test Trigger Binding Bar", /// Code = @"exports.onContinuePostLogin = async (event, api) => { /// console.log(""bar""); /// };"" @@ -55,7 +57,7 @@ namespace Pulumi.Auth0 /// }, /// }); /// - /// var loginFlow = new Auth0.TriggerActions("loginFlow", new() + /// var loginFlow = new Auth0.TriggerActions("login_flow", new() /// { /// Trigger = "post-login", /// Actions = new[] diff --git a/sdk/dotnet/User.cs b/sdk/dotnet/User.cs index 1f040bd5..5071cf33 100644 --- a/sdk/dotnet/User.cs +++ b/sdk/dotnet/User.cs @@ -26,13 +26,14 @@ namespace Pulumi.Auth0 /// var user = new Auth0.User("user", new() /// { /// ConnectionName = "Username-Password-Authentication", + /// UserId = "12345", + /// Username = "unique_username", + /// Name = "Firstname Lastname", + /// Nickname = "some.nickname", /// Email = "test@test.com", /// EmailVerified = true, - /// Nickname = "some.nickname", /// Password = "passpass$12$12", /// Picture = "https://www.example.com/a-valid-picture-url.jpg", - /// UserId = "12345", - /// Username = "unique_username", /// }); /// /// }); diff --git a/sdk/dotnet/UserRole.cs b/sdk/dotnet/UserRole.cs index f8e81da6..5f0d5a9c 100644 --- a/sdk/dotnet/UserRole.cs +++ b/sdk/dotnet/UserRole.cs @@ -30,6 +30,7 @@ namespace Pulumi.Auth0 /// // Example: /// var admin = new Auth0.Role("admin", new() /// { + /// Name = "admin", /// Description = "Administrator", /// }); /// @@ -37,11 +38,12 @@ namespace Pulumi.Auth0 /// { /// ConnectionName = "Username-Password-Authentication", /// Username = "unique_username", + /// Name = "Firstname Lastname", /// Email = "test@test.com", /// Password = "passpass$12$12", /// }); /// - /// var userRoles = new Auth0.UserRole("userRoles", new() + /// var userRoles = new Auth0.UserRole("user_roles", new() /// { /// UserId = user.Id, /// RoleId = admin.Id, diff --git a/sdk/dotnet/UserRoles.cs b/sdk/dotnet/UserRoles.cs index 5c89c6fa..c3f11cb6 100644 --- a/sdk/dotnet/UserRoles.cs +++ b/sdk/dotnet/UserRoles.cs @@ -30,6 +30,7 @@ namespace Pulumi.Auth0 /// // Example: /// var admin = new Auth0.Role("admin", new() /// { + /// Name = "admin", /// Description = "Administrator", /// }); /// @@ -37,11 +38,12 @@ namespace Pulumi.Auth0 /// { /// ConnectionName = "Username-Password-Authentication", /// Username = "unique_username", + /// Name = "Firstname Lastname", /// Email = "test@test.com", /// Password = "passpass$12$12", /// }); /// - /// var userRoles = new Auth0.UserRoles("userRoles", new() + /// var userRoles = new Auth0.UserRoles("user_roles", new() /// { /// UserId = user.Id, /// Roles = new[] diff --git a/sdk/go/auth0/attackProtection.go b/sdk/go/auth0/attackProtection.go index ef81d6e6..1bf2d27b 100644 --- a/sdk/go/auth0/attackProtection.go +++ b/sdk/go/auth0/attackProtection.go @@ -28,22 +28,24 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewAttackProtection(ctx, "myProtection", &auth0.AttackProtectionArgs{ -// BreachedPasswordDetection: &auth0.AttackProtectionBreachedPasswordDetectionArgs{ -// AdminNotificationFrequencies: pulumi.StringArray{ -// pulumi.String("daily"), -// }, +// _, err := auth0.NewAttackProtection(ctx, "my_protection", &auth0.AttackProtectionArgs{ +// SuspiciousIpThrottling: &auth0.AttackProtectionSuspiciousIpThrottlingArgs{ // Enabled: pulumi.Bool(true), -// Method: pulumi.String("standard"), -// PreUserRegistration: &auth0.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs{ -// Shields: pulumi.StringArray{ -// pulumi.String("block"), -// }, -// }, // Shields: pulumi.StringArray{ // pulumi.String("admin_notification"), // pulumi.String("block"), // }, +// Allowlists: pulumi.StringArray{ +// pulumi.String("192.168.1.1"), +// }, +// PreLogin: &auth0.AttackProtectionSuspiciousIpThrottlingPreLoginArgs{ +// MaxAttempts: pulumi.Int(100), +// Rate: pulumi.Int(864000), +// }, +// PreUserRegistration: &auth0.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs{ +// MaxAttempts: pulumi.Int(50), +// Rate: pulumi.Int(1200), +// }, // }, // BruteForceProtection: &auth0.AttackProtectionBruteForceProtectionArgs{ // Allowlists: pulumi.StringArray{ @@ -57,23 +59,21 @@ import ( // pulumi.String("user_notification"), // }, // }, -// SuspiciousIpThrottling: &auth0.AttackProtectionSuspiciousIpThrottlingArgs{ -// Allowlists: pulumi.StringArray{ -// pulumi.String("192.168.1.1"), +// BreachedPasswordDetection: &auth0.AttackProtectionBreachedPasswordDetectionArgs{ +// AdminNotificationFrequencies: pulumi.StringArray{ +// pulumi.String("daily"), // }, // Enabled: pulumi.Bool(true), -// PreLogin: &auth0.AttackProtectionSuspiciousIpThrottlingPreLoginArgs{ -// MaxAttempts: pulumi.Int(100), -// Rate: pulumi.Int(864000), -// }, -// PreUserRegistration: &auth0.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs{ -// MaxAttempts: pulumi.Int(50), -// Rate: pulumi.Int(1200), -// }, +// Method: pulumi.String("standard"), // Shields: pulumi.StringArray{ // pulumi.String("admin_notification"), // pulumi.String("block"), // }, +// PreUserRegistration: &auth0.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs{ +// Shields: pulumi.StringArray{ +// pulumi.String("block"), +// }, +// }, // }, // }) // if err != nil { diff --git a/sdk/go/auth0/branding.go b/sdk/go/auth0/branding.go index f32801a7..a4499273 100644 --- a/sdk/go/auth0/branding.go +++ b/sdk/go/auth0/branding.go @@ -13,51 +13,6 @@ import ( // This resource allows you to manage branding within your Auth0 tenant. Auth0 can be customized with a look and feel that aligns with your organization's brand requirements and user expectations. // -// ## Example Usage -// -// -// ```go -// package main -// -// import ( -// -// "os" -// -// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func readFileOrPanic(path string) pulumi.StringPtrInput { -// data, err := os.ReadFile(path) -// if err != nil { -// panic(err.Error()) -// } -// return pulumi.String(string(data)) -// } -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewBranding(ctx, "myBrand", &auth0.BrandingArgs{ -// LogoUrl: pulumi.String("https://mycompany.org/logo.png"), -// Colors: &auth0.BrandingColorsArgs{ -// Primary: pulumi.String("#0059d6"), -// PageBackground: pulumi.String("#000000"), -// }, -// UniversalLogin: &auth0.BrandingUniversalLoginArgs{ -// Body: readFileOrPanic("universal_login_body.html"), -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// // ## Import // // As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/go/auth0/brandingTheme.go b/sdk/go/auth0/brandingTheme.go index 1406fe7e..62d6aed1 100644 --- a/sdk/go/auth0/brandingTheme.go +++ b/sdk/go/auth0/brandingTheme.go @@ -14,104 +14,6 @@ import ( // This resource allows you to manage branding themes for your Universal Login page within your Auth0 tenant. // -// ## Example Usage -// -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// // An example of a fully configured auth0_branding_theme. -// _, err := auth0.NewBrandingTheme(ctx, "myTheme", &auth0.BrandingThemeArgs{ -// Borders: &auth0.BrandingThemeBordersArgs{ -// ButtonBorderRadius: pulumi.Float64(1), -// ButtonBorderWeight: pulumi.Float64(1), -// ButtonsStyle: pulumi.String("pill"), -// InputBorderRadius: pulumi.Float64(3), -// InputBorderWeight: pulumi.Float64(1), -// InputsStyle: pulumi.String("pill"), -// ShowWidgetShadow: pulumi.Bool(false), -// WidgetBorderWeight: pulumi.Float64(1), -// WidgetCornerRadius: pulumi.Float64(3), -// }, -// Colors: &auth0.BrandingThemeColorsArgs{ -// BodyText: pulumi.String("#FF00CC"), -// Error: pulumi.String("#FF00CC"), -// Header: pulumi.String("#FF00CC"), -// Icons: pulumi.String("#FF00CC"), -// InputBackground: pulumi.String("#FF00CC"), -// InputBorder: pulumi.String("#FF00CC"), -// InputFilledText: pulumi.String("#FF00CC"), -// InputLabelsPlaceholders: pulumi.String("#FF00CC"), -// LinksFocusedComponents: pulumi.String("#FF00CC"), -// PrimaryButton: pulumi.String("#FF00CC"), -// PrimaryButtonLabel: pulumi.String("#FF00CC"), -// SecondaryButtonBorder: pulumi.String("#FF00CC"), -// SecondaryButtonLabel: pulumi.String("#FF00CC"), -// Success: pulumi.String("#FF00CC"), -// WidgetBackground: pulumi.String("#FF00CC"), -// WidgetBorder: pulumi.String("#FF00CC"), -// }, -// Fonts: &auth0.BrandingThemeFontsArgs{ -// BodyText: &auth0.BrandingThemeFontsBodyTextArgs{ -// Bold: pulumi.Bool(false), -// Size: pulumi.Float64(100), -// }, -// ButtonsText: &auth0.BrandingThemeFontsButtonsTextArgs{ -// Bold: pulumi.Bool(false), -// Size: pulumi.Float64(100), -// }, -// FontUrl: pulumi.String("https://google.com/font.woff"), -// InputLabels: &auth0.BrandingThemeFontsInputLabelsArgs{ -// Bold: pulumi.Bool(false), -// Size: pulumi.Float64(100), -// }, -// Links: &auth0.BrandingThemeFontsLinksArgs{ -// Bold: pulumi.Bool(false), -// Size: pulumi.Float64(100), -// }, -// LinksStyle: pulumi.String("normal"), -// ReferenceTextSize: pulumi.Float64(12), -// Subtitle: &auth0.BrandingThemeFontsSubtitleArgs{ -// Bold: pulumi.Bool(false), -// Size: pulumi.Float64(100), -// }, -// Title: &auth0.BrandingThemeFontsTitleArgs{ -// Bold: pulumi.Bool(false), -// Size: pulumi.Float64(100), -// }, -// }, -// PageBackground: &auth0.BrandingThemePageBackgroundArgs{ -// BackgroundColor: pulumi.String("#000000"), -// BackgroundImageUrl: pulumi.String("https://google.com/background.png"), -// PageLayout: pulumi.String("center"), -// }, -// Widget: &auth0.BrandingThemeWidgetArgs{ -// HeaderTextAlignment: pulumi.String("center"), -// LogoHeight: pulumi.Float64(55), -// LogoPosition: pulumi.String("center"), -// LogoUrl: pulumi.String("https://google.com/logo.png"), -// SocialButtonsLayout: pulumi.String("top"), -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// // ## Import // // This resource can be imported by specifying the Branding Theme ID. diff --git a/sdk/go/auth0/client.go b/sdk/go/auth0/client.go index 698225dc..c30b66a0 100644 --- a/sdk/go/auth0/client.go +++ b/sdk/go/auth0/client.go @@ -28,48 +28,26 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewClient(ctx, "myClient", &auth0.ClientArgs{ -// Addons: &auth0.ClientAddonsArgs{ -// Samlp: &auth0.ClientAddonsSamlpArgs{ -// Audience: pulumi.String("https://example.com/saml"), -// CreateUpnClaim: pulumi.Bool(false), -// Issuer: pulumi.String("https://example.com"), -// MapIdentities: pulumi.Bool(false), -// MapUnknownClaimsAsIs: pulumi.Bool(false), -// Mappings: pulumi.Map{ -// "email": pulumi.Any("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), -// "name": pulumi.Any("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"), -// }, -// NameIdentifierFormat: pulumi.String("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"), -// NameIdentifierProbes: pulumi.StringArray{ -// pulumi.String("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), -// }, -// PassthroughClaimsWithNoMapping: pulumi.Bool(false), -// SigningCert: pulumi.String(`-----BEGIN PUBLIC KEY----- -// -// MIGf...bpP/t3 -// +JGNGIRMj1hF1rnb6QIDAQAB -// -----END PUBLIC KEY----- -// -// `), -// -// }, -// }, -// AllowedLogoutUrls: pulumi.StringArray{ -// pulumi.String("https://example.com"), +// _, err := auth0.NewClient(ctx, "my_client", &auth0.ClientArgs{ +// Name: pulumi.String("Application - Acceptance Test"), +// Description: pulumi.String("Test Applications Long Description"), +// AppType: pulumi.String("non_interactive"), +// CustomLoginPageOn: pulumi.Bool(true), +// IsFirstParty: pulumi.Bool(true), +// IsTokenEndpointIpHeaderTrusted: pulumi.Bool(true), +// OidcConformant: pulumi.Bool(false), +// Callbacks: pulumi.StringArray{ +// pulumi.String("https://example.com/callback"), // }, // AllowedOrigins: pulumi.StringArray{ // pulumi.String("https://example.com"), // }, -// AppType: pulumi.String("non_interactive"), -// Callbacks: pulumi.StringArray{ -// pulumi.String("https://example.com/callback"), +// AllowedLogoutUrls: pulumi.StringArray{ +// pulumi.String("https://example.com"), // }, -// ClientMetadata: pulumi.Map{ -// "foo": pulumi.Any("zoo"), +// WebOrigins: pulumi.StringArray{ +// pulumi.String("https://example.com"), // }, -// CustomLoginPageOn: pulumi.Bool(true), -// Description: pulumi.String("Test Applications Long Description"), // GrantTypes: pulumi.StringArray{ // pulumi.String("authorization_code"), // pulumi.String("http://auth0.com/oauth/grant-type/password-realm"), @@ -77,31 +55,47 @@ import ( // pulumi.String("password"), // pulumi.String("refresh_token"), // }, -// IsFirstParty: pulumi.Bool(true), -// IsTokenEndpointIpHeaderTrusted: pulumi.Bool(true), +// ClientMetadata: pulumi.Map{ +// "foo": pulumi.Any("zoo"), +// }, // JwtConfiguration: &auth0.ClientJwtConfigurationArgs{ -// Alg: pulumi.String("RS256"), // LifetimeInSeconds: pulumi.Int(300), +// SecretEncoded: pulumi.Bool(true), +// Alg: pulumi.String("RS256"), // Scopes: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, -// SecretEncoded: pulumi.Bool(true), +// }, +// RefreshToken: &auth0.ClientRefreshTokenArgs{ +// Leeway: pulumi.Int(0), +// TokenLifetime: pulumi.Int(2592000), +// RotationType: pulumi.String("rotating"), +// ExpirationType: pulumi.String("expiring"), // }, // Mobile: &auth0.ClientMobileArgs{ // Ios: &auth0.ClientMobileIosArgs{ -// AppBundleIdentifier: pulumi.String("com.my.bundle.id"), // TeamId: pulumi.String("9JA89QQLNQ"), +// AppBundleIdentifier: pulumi.String("com.my.bundle.id"), // }, // }, -// OidcConformant: pulumi.Bool(false), -// RefreshToken: &auth0.ClientRefreshTokenArgs{ -// ExpirationType: pulumi.String("expiring"), -// Leeway: pulumi.Int(0), -// RotationType: pulumi.String("rotating"), -// TokenLifetime: pulumi.Int(2592000), -// }, -// WebOrigins: pulumi.StringArray{ -// pulumi.String("https://example.com"), +// Addons: &auth0.ClientAddonsArgs{ +// Samlp: &auth0.ClientAddonsSamlpArgs{ +// Audience: pulumi.String("https://example.com/saml"), +// Issuer: pulumi.String("https://example.com"), +// Mappings: pulumi.Map{ +// "email": pulumi.Any("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), +// "name": pulumi.Any("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"), +// }, +// CreateUpnClaim: pulumi.Bool(false), +// PassthroughClaimsWithNoMapping: pulumi.Bool(false), +// MapUnknownClaimsAsIs: pulumi.Bool(false), +// MapIdentities: pulumi.Bool(false), +// NameIdentifierFormat: pulumi.String("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"), +// NameIdentifierProbes: pulumi.StringArray{ +// pulumi.String("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), +// }, +// SigningCert: pulumi.String("-----BEGIN PUBLIC KEY-----\nMIGf...bpP/t3\n+JGNGIRMj1hF1rnb6QIDAQAB\n-----END PUBLIC KEY-----\n"), +// }, // }, // }) // if err != nil { diff --git a/sdk/go/auth0/clientCredentials.go b/sdk/go/auth0/clientCredentials.go index 7c18350f..cb963b66 100644 --- a/sdk/go/auth0/clientCredentials.go +++ b/sdk/go/auth0/clientCredentials.go @@ -17,89 +17,6 @@ import ( // > Refer to the client secret rotation guide // for instructions on how to rotate client secrets with zero downtime. // -// ## Example Usage -// -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// myClient, err := auth0.NewClient(ctx, "myClient", &auth0.ClientArgs{ -// AppType: pulumi.String("non_interactive"), -// JwtConfiguration: &auth0.ClientJwtConfigurationArgs{ -// Alg: pulumi.String("RS256"), -// }, -// }) -// if err != nil { -// return err -// } -// // Configuring client_secret_post as an authentication method. -// _, err = auth0.NewClientCredentials(ctx, "testClientCredentials", &auth0.ClientCredentialsArgs{ -// ClientId: myClient.ID(), -// AuthenticationMethod: pulumi.String("client_secret_post"), -// }) -// if err != nil { -// return err -// } -// // Configuring client_secret_basic as an authentication method. -// _, err = auth0.NewClientCredentials(ctx, "testIndex/clientCredentialsClientCredentials", &auth0.ClientCredentialsArgs{ -// ClientId: myClient.ID(), -// AuthenticationMethod: pulumi.String("client_secret_basic"), -// }) -// if err != nil { -// return err -// } -// // Configuring none as an authentication method. -// _, err = auth0.NewClientCredentials(ctx, "testAuth0Index/clientCredentialsClientCredentials", &auth0.ClientCredentialsArgs{ -// ClientId: myClient.ID(), -// AuthenticationMethod: pulumi.String("none"), -// }) -// if err != nil { -// return err -// } -// // Configuring private_key_jwt as an authentication method. -// _, err = auth0.NewClientCredentials(ctx, "testAuth0Index/clientCredentialsClientCredentials1", &auth0.ClientCredentialsArgs{ -// ClientId: myClient.ID(), -// AuthenticationMethod: pulumi.String("private_key_jwt"), -// PrivateKeyJwt: &auth0.ClientCredentialsPrivateKeyJwtArgs{ -// Credentials: auth0.ClientCredentialsPrivateKeyJwtCredentialArray{ -// &auth0.ClientCredentialsPrivateKeyJwtCredentialArgs{ -// Name: pulumi.String("Testing Credentials 1"), -// CredentialType: pulumi.String("public_key"), -// Algorithm: pulumi.String("RS256"), -// ParseExpiryFromCert: pulumi.Bool(true), -// Pem: pulumi.String("-----BEGIN CERTIFICATE-----\nMIIFWDCCA0ACCQDXqpBo3R...G9w0BAQsFADBuMQswCQYDVQQGEwJl\n-----END CERTIFICATE-----\n"), -// }, -// }, -// }, -// }) -// if err != nil { -// return err -// } -// // Configuring the client_secret. -// _, err = auth0.NewClientCredentials(ctx, "testAuth0Index/clientCredentialsClientCredentials2", &auth0.ClientCredentialsArgs{ -// ClientId: myClient.ID(), -// AuthenticationMethod: pulumi.String("client_secret_basic"), -// ClientSecret: pulumi.String("LUFqPx+sRLjbL7peYRPFmFu-bbvE7u7og4YUNe_C345=683341"), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// // ## Import // // This resource can be imported by specifying the client ID. diff --git a/sdk/go/auth0/connection.go b/sdk/go/auth0/connection.go index 666b060d..d76d3a53 100644 --- a/sdk/go/auth0/connection.go +++ b/sdk/go/auth0/connection.go @@ -19,6 +19,98 @@ import ( // // ## Example Usage // +// ### Auth0 Connection +// +// +// ```go +// package main +// +// import ( +// +// "encoding/json" +// +// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// tmpJSON0, err := json.Marshal(map[string]interface{}{ +// "screen_name": map[string]interface{}{ +// "alias": "login_hint", +// }, +// }) +// if err != nil { +// return err +// } +// json0 := string(tmpJSON0) +// // This is an example of an Auth0 connection. +// _, err = auth0.NewConnection(ctx, "my_connection", &auth0.ConnectionArgs{ +// Name: pulumi.String("Example-Connection"), +// IsDomainConnection: pulumi.Bool(true), +// Strategy: pulumi.String("auth0"), +// Metadata: pulumi.StringMap{ +// "key1": pulumi.String("foo"), +// "key2": pulumi.String("bar"), +// }, +// Options: &auth0.ConnectionOptionsArgs{ +// PasswordPolicy: pulumi.String("excellent"), +// BruteForceProtection: pulumi.Bool(true), +// EnabledDatabaseCustomization: pulumi.Bool(true), +// ImportMode: pulumi.Bool(false), +// RequiresUsername: pulumi.Bool(true), +// DisableSignup: pulumi.Bool(false), +// CustomScripts: pulumi.StringMap{ +// "get_user": pulumi.String(" function getByEmail(email, callback) {\n return callback(new Error(\"Whoops!\"));\n }\n"), +// }, +// Configuration: pulumi.Map{ +// "foo": pulumi.Any("bar"), +// "bar": pulumi.Any("baz"), +// }, +// UpstreamParams: pulumi.String(json0), +// PasswordHistories: auth0.ConnectionOptionsPasswordHistoryArray{ +// &auth0.ConnectionOptionsPasswordHistoryArgs{ +// Enable: pulumi.Bool(true), +// Size: pulumi.Int(3), +// }, +// }, +// PasswordNoPersonalInfo: &auth0.ConnectionOptionsPasswordNoPersonalInfoArgs{ +// Enable: pulumi.Bool(true), +// }, +// PasswordDictionary: &auth0.ConnectionOptionsPasswordDictionaryArgs{ +// Enable: pulumi.Bool(true), +// Dictionaries: pulumi.StringArray{ +// pulumi.String("password"), +// pulumi.String("admin"), +// pulumi.String("1234"), +// }, +// }, +// PasswordComplexityOptions: &auth0.ConnectionOptionsPasswordComplexityOptionsArgs{ +// MinLength: pulumi.Int(12), +// }, +// Validation: &auth0.ConnectionOptionsValidationArgs{ +// Username: &auth0.ConnectionOptionsValidationUsernameArgs{ +// Min: pulumi.Int(10), +// Max: pulumi.Int(40), +// }, +// }, +// Mfa: &auth0.ConnectionOptionsMfaArgs{ +// Active: pulumi.Bool(true), +// ReturnEnrollSettings: pulumi.Bool(true), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// // ### Google OAuth2 Connection // // > Your Auth0 account may be pre-configured with a `google-oauth2` connection. @@ -36,18 +128,17 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewConnection(ctx, "googleOauth2", &auth0.ConnectionArgs{ +// // This is an example of a Google OAuth2 connection. +// _, err := auth0.NewConnection(ctx, "google_oauth2", &auth0.ConnectionArgs{ +// Name: pulumi.String("Google-OAuth2-Connection"), +// Strategy: pulumi.String("google-oauth2"), // Options: &auth0.ConnectionOptionsArgs{ +// ClientId: pulumi.String(""), +// ClientSecret: pulumi.String(""), // AllowedAudiences: pulumi.StringArray{ // pulumi.String("example.com"), // pulumi.String("api.example.com"), // }, -// ClientId: pulumi.String(""), -// ClientSecret: pulumi.String(""), -// NonPersistentAttrs: pulumi.StringArray{ -// pulumi.String("ethnicity"), -// pulumi.String("gender"), -// }, // Scopes: pulumi.StringArray{ // pulumi.String("email"), // pulumi.String("profile"), @@ -55,8 +146,11 @@ import ( // pulumi.String("youtube"), // }, // SetUserRootAttributes: pulumi.String("on_each_login"), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, // }, -// Strategy: pulumi.String("google-oauth2"), // }) // if err != nil { // return err @@ -68,7 +162,7 @@ import ( // ``` // // -// ### Facebook Connection +// ### Google Apps // // // ```go @@ -76,6 +170,8 @@ import ( // // import ( // +// "encoding/json" +// // "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -83,14 +179,75 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewConnection(ctx, "facebook", &auth0.ConnectionArgs{ +// tmpJSON0, err := json.Marshal(map[string]interface{}{ +// "screen_name": map[string]interface{}{ +// "alias": "login_hint", +// }, +// }) +// if err != nil { +// return err +// } +// json0 := string(tmpJSON0) +// _, err = auth0.NewConnection(ctx, "google_apps", &auth0.ConnectionArgs{ +// Name: pulumi.String("connection-google-apps"), +// IsDomainConnection: pulumi.Bool(false), +// Strategy: pulumi.String("google-apps"), +// ShowAsButton: pulumi.Bool(false), // Options: &auth0.ConnectionOptionsArgs{ -// ClientId: pulumi.String(""), -// ClientSecret: pulumi.String(""), +// ClientId: pulumi.String(""), +// ClientSecret: pulumi.String(""), +// Domain: pulumi.String("example.com"), +// TenantDomain: pulumi.String("example.com"), +// DomainAliases: pulumi.StringArray{ +// pulumi.String("example.com"), +// pulumi.String("api.example.com"), +// }, +// ApiEnableUsers: pulumi.Bool(true), +// Scopes: pulumi.StringArray{ +// pulumi.String("ext_profile"), +// pulumi.String("ext_groups"), +// }, +// IconUrl: pulumi.String("https://example.com/assets/logo.png"), +// UpstreamParams: pulumi.String(json0), +// SetUserRootAttributes: pulumi.String("on_each_login"), // NonPersistentAttrs: pulumi.StringArray{ // pulumi.String("ethnicity"), // pulumi.String("gender"), // }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// +// ### Facebook Connection +// +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// // This is an example of a Facebook connection. +// _, err := auth0.NewConnection(ctx, "facebook", &auth0.ConnectionArgs{ +// Name: pulumi.String("Facebook-Connection"), +// Strategy: pulumi.String("facebook"), +// Options: &auth0.ConnectionOptionsArgs{ +// ClientId: pulumi.String(""), +// ClientSecret: pulumi.String(""), // Scopes: pulumi.StringArray{ // pulumi.String("public_profile"), // pulumi.String("email"), @@ -98,8 +255,11 @@ import ( // pulumi.String("user_birthday"), // }, // SetUserRootAttributes: pulumi.String("on_each_login"), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, // }, -// Strategy: pulumi.String("facebook"), // }) // if err != nil { // return err @@ -126,23 +286,25 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // This is an example of an Apple connection. // _, err := auth0.NewConnection(ctx, "apple", &auth0.ConnectionArgs{ +// Name: pulumi.String("Apple-Connection"), +// Strategy: pulumi.String("apple"), // Options: &auth0.ConnectionOptionsArgs{ // ClientId: pulumi.String(""), -// ClientSecret: pulumi.String("-----BEGIN PRIVATE KEY-----\nMIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA\n-----END PRIVATE KEY-----\n"), +// ClientSecret: pulumi.String("-----BEGIN PRIVATE KEY-----\nMIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA\n-----END PRIVATE KEY-----"), +// TeamId: pulumi.String(""), // KeyId: pulumi.String(""), -// NonPersistentAttrs: pulumi.StringArray{ -// pulumi.String("ethnicity"), -// pulumi.String("gender"), -// }, // Scopes: pulumi.StringArray{ // pulumi.String("email"), // pulumi.String("name"), // }, // SetUserRootAttributes: pulumi.String("on_first_login"), -// TeamId: pulumi.String(""), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, // }, -// Strategy: pulumi.String("apple"), // }) // if err != nil { // return err @@ -169,23 +331,25 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // This is an example of an LinkedIn connection. // _, err := auth0.NewConnection(ctx, "linkedin", &auth0.ConnectionArgs{ +// Name: pulumi.String("Linkedin-Connection"), +// Strategy: pulumi.String("linkedin"), // Options: &auth0.ConnectionOptionsArgs{ -// ClientId: pulumi.String(""), -// ClientSecret: pulumi.String(""), -// NonPersistentAttrs: pulumi.StringArray{ -// pulumi.String("ethnicity"), -// pulumi.String("gender"), -// }, +// ClientId: pulumi.String(""), +// ClientSecret: pulumi.String(""), +// StrategyVersion: pulumi.Int(2), // Scopes: pulumi.StringArray{ // pulumi.String("basic_profile"), // pulumi.String("profile"), // pulumi.String("email"), // }, // SetUserRootAttributes: pulumi.String("on_each_login"), -// StrategyVersion: pulumi.Int(2), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, // }, -// Strategy: pulumi.String("linkedin"), // }) // if err != nil { // return err @@ -212,14 +376,13 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // This is an example of an GitHub connection. // _, err := auth0.NewConnection(ctx, "github", &auth0.ConnectionArgs{ +// Name: pulumi.String("GitHub-Connection"), +// Strategy: pulumi.String("github"), // Options: &auth0.ConnectionOptionsArgs{ // ClientId: pulumi.String(""), // ClientSecret: pulumi.String(""), -// NonPersistentAttrs: pulumi.StringArray{ -// pulumi.String("ethnicity"), -// pulumi.String("gender"), -// }, // Scopes: pulumi.StringArray{ // pulumi.String("email"), // pulumi.String("profile"), @@ -227,8 +390,11 @@ import ( // pulumi.String("repo"), // }, // SetUserRootAttributes: pulumi.String("on_each_login"), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, // }, -// Strategy: pulumi.String("github"), // }) // if err != nil { // return err @@ -255,22 +421,24 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // This is an example of an SalesForce connection. // _, err := auth0.NewConnection(ctx, "salesforce", &auth0.ConnectionArgs{ +// Name: pulumi.String("Salesforce-Connection"), +// Strategy: pulumi.String("salesforce"), // Options: &auth0.ConnectionOptionsArgs{ // ClientId: pulumi.String(""), // ClientSecret: pulumi.String(""), // CommunityBaseUrl: pulumi.String("https://salesforce.example.com"), -// NonPersistentAttrs: pulumi.StringArray{ -// pulumi.String("ethnicity"), -// pulumi.String("gender"), -// }, // Scopes: pulumi.StringArray{ // pulumi.String("openid"), // pulumi.String("email"), // }, // SetUserRootAttributes: pulumi.String("on_first_login"), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, // }, -// Strategy: pulumi.String("salesforce"), // }) // if err != nil { // return err @@ -299,29 +467,31 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // This is an example of an OAuth2 connection. // _, err := auth0.NewConnection(ctx, "oauth2", &auth0.ConnectionArgs{ +// Name: pulumi.String("OAuth2-Connection"), +// Strategy: pulumi.String("oauth2"), // Options: &auth0.ConnectionOptionsArgs{ -// AuthorizationEndpoint: pulumi.String("https://auth.example.com/oauth2/authorize"), -// ClientId: pulumi.String(""), -// ClientSecret: pulumi.String(""), -// IconUrl: pulumi.String("https://auth.example.com/assets/logo.png"), -// NonPersistentAttrs: pulumi.StringArray{ -// pulumi.String("ethnicity"), -// pulumi.String("gender"), -// }, -// PkceEnabled: pulumi.Bool(true), +// ClientId: pulumi.String(""), +// ClientSecret: pulumi.String(""), // Scopes: pulumi.StringArray{ // pulumi.String("basic_profile"), // pulumi.String("profile"), // pulumi.String("email"), // }, +// TokenEndpoint: pulumi.String("https://auth.example.com/oauth2/token"), +// AuthorizationEndpoint: pulumi.String("https://auth.example.com/oauth2/authorize"), +// PkceEnabled: pulumi.Bool(true), +// IconUrl: pulumi.String("https://auth.example.com/assets/logo.png"), // Scripts: pulumi.StringMap{ -// "fetchUserProfile": pulumi.String(" function fetchUserProfile(accessToken, context, callback) {\n return callback(new Error(\"Whoops!\"));\n }\n \n"), +// "fetchUserProfile": pulumi.String(" function fetchUserProfile(accessToken, context, callback) {\n return callback(new Error(\"Whoops!\"));\n }\n"), // }, // SetUserRootAttributes: pulumi.String("on_each_login"), -// TokenEndpoint: pulumi.String("https://auth.example.com/oauth2/token"), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, // }, -// Strategy: pulumi.String("oauth2"), // }) // if err != nil { // return err @@ -333,9 +503,72 @@ import ( // ``` // // -// ### SMS Connection +// ### Active Directory (AD) +// +// +// ```go +// package main +// +// import ( +// +// "encoding/json" +// +// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// tmpJSON0, err := json.Marshal(map[string]interface{}{ +// "screen_name": map[string]interface{}{ +// "alias": "login_hint", +// }, +// }) +// if err != nil { +// return err +// } +// json0 := string(tmpJSON0) +// _, err = auth0.NewConnection(ctx, "ad", &auth0.ConnectionArgs{ +// Name: pulumi.String("connection-active-directory"), +// DisplayName: pulumi.String("Active Directory Connection"), +// Strategy: pulumi.String("ad"), +// ShowAsButton: pulumi.Bool(true), +// Options: &auth0.ConnectionOptionsArgs{ +// DisableSelfServiceChangePassword: pulumi.Bool(true), +// BruteForceProtection: pulumi.Bool(true), +// TenantDomain: pulumi.String("example.com"), +// IconUrl: pulumi.String("https://example.com/assets/logo.png"), +// DomainAliases: pulumi.StringArray{ +// pulumi.String("example.com"), +// pulumi.String("api.example.com"), +// }, +// Ips: pulumi.StringArray{ +// pulumi.String("192.168.1.1"), +// pulumi.String("192.168.1.2"), +// }, +// SetUserRootAttributes: pulumi.String("on_each_login"), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, +// UpstreamParams: pulumi.String(json0), +// UseCertAuth: pulumi.Bool(false), +// UseKerberos: pulumi.Bool(false), +// DisableCache: pulumi.Bool(false), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // -// > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms". +// ### Azure AD Connection // // // ```go @@ -343,6 +576,8 @@ import ( // // import ( // +// "encoding/json" +// // "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -350,31 +585,49 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewConnection(ctx, "sms", &auth0.ConnectionArgs{ -// IsDomainConnection: pulumi.Bool(false), +// tmpJSON0, err := json.Marshal(map[string]interface{}{ +// "screen_name": map[string]interface{}{ +// "alias": "login_hint", +// }, +// }) +// if err != nil { +// return err +// } +// json0 := string(tmpJSON0) +// _, err = auth0.NewConnection(ctx, "azure_ad", &auth0.ConnectionArgs{ +// Name: pulumi.String("connection-azure-ad"), +// Strategy: pulumi.String("waad"), +// ShowAsButton: pulumi.Bool(true), // Options: &auth0.ConnectionOptionsArgs{ -// BruteForceProtection: pulumi.Bool(true), -// DisableSignup: pulumi.Bool(false), -// ForwardRequestInfo: pulumi.Bool(true), -// From: pulumi.String("+15555555555"), -// GatewayAuthentication: &auth0.ConnectionOptionsGatewayAuthenticationArgs{ -// Audience: pulumi.String("https://somewhere.com/sms-gateway"), -// Method: pulumi.String("bearer"), -// Secret: pulumi.String("4e2680bb74ec2ae24736476dd37ed6c2"), -// SecretBase64Encoded: pulumi.Bool(false), -// Subject: pulumi.String("test.us.auth0.com:sms"), -// }, -// GatewayUrl: pulumi.String("https://somewhere.com/sms-gateway"), -// Name: pulumi.String("sms"), -// Provider: pulumi.String("sms_gateway"), -// Syntax: pulumi.String("md_with_macros"), -// Template: pulumi.String("@@password@@"), -// Totp: &auth0.ConnectionOptionsTotpArgs{ -// Length: pulumi.Int(6), -// TimeStep: pulumi.Int(300), +// IdentityApi: pulumi.String("azure-active-directory-v1.0"), +// ClientId: pulumi.String("123456"), +// ClientSecret: pulumi.String("123456"), +// AppId: pulumi.String("app-id-123"), +// TenantDomain: pulumi.String("example.onmicrosoft.com"), +// Domain: pulumi.String("example.onmicrosoft.com"), +// DomainAliases: pulumi.StringArray{ +// pulumi.String("example.com"), +// pulumi.String("api.example.com"), +// }, +// IconUrl: pulumi.String("https://example.onmicrosoft.com/assets/logo.png"), +// UseWsfed: pulumi.Bool(false), +// WaadProtocol: pulumi.String("openid-connect"), +// WaadCommonEndpoint: pulumi.Bool(false), +// MaxGroupsToRetrieve: pulumi.String("250"), +// ApiEnableUsers: pulumi.Bool(true), +// Scopes: pulumi.StringArray{ +// pulumi.String("basic_profile"), +// pulumi.String("ext_groups"), +// pulumi.String("ext_profile"), +// }, +// SetUserRootAttributes: pulumi.String("on_each_login"), +// ShouldTrustEmailVerifiedConnection: pulumi.String("never_set_emails_as_verified"), +// UpstreamParams: pulumi.String(json0), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), // }, // }, -// Strategy: pulumi.String("sms"), // }) // if err != nil { // return err @@ -403,27 +656,130 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewConnection(ctx, "passwordlessEmail", &auth0.ConnectionArgs{ +// // This is an example of an Email connection. +// _, err := auth0.NewConnection(ctx, "passwordless_email", &auth0.ConnectionArgs{ +// Strategy: pulumi.String("email"), +// Name: pulumi.String("email"), // Options: &auth0.ConnectionOptionsArgs{ -// AuthParams: pulumi.StringMap{ -// "responseType": pulumi.String("code"), -// "scope": pulumi.String("openid email profile offline_access"), -// }, -// BruteForceProtection: pulumi.Bool(true), -// DisableSignup: pulumi.Bool(false), -// From: pulumi.String("{{ application.name }} "), // Name: pulumi.String("email"), -// NonPersistentAttrs: pulumi.StringArray{}, -// SetUserRootAttributes: pulumi.String("on_each_login"), +// From: pulumi.String("{{ application.name }} "), // Subject: pulumi.String("Welcome to {{ application.name }}"), // Syntax: pulumi.String("liquid"), // Template: pulumi.String("This is the body of the email"), +// DisableSignup: pulumi.Bool(false), +// BruteForceProtection: pulumi.Bool(true), +// SetUserRootAttributes: pulumi.String("on_each_login"), +// NonPersistentAttrs: pulumi.StringArray{}, +// AuthParams: pulumi.StringMap{ +// "scope": pulumi.String("openid email profile offline_access"), +// "response_type": pulumi.String("code"), +// }, // Totp: &auth0.ConnectionOptionsTotpArgs{ -// Length: pulumi.Int(6), // TimeStep: pulumi.Int(300), +// Length: pulumi.Int(6), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// +// ### SAML Connection +// +// +// ```go +// package main +// +// import ( +// +// "encoding/json" +// +// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// tmpJSON0, err := json.Marshal(map[string]interface{}{ +// "name": []string{ +// "name", +// "nameidentifier", +// }, +// "email": []string{ +// "emailaddress", +// "nameidentifier", +// }, +// "family_name": "surname", +// }) +// if err != nil { +// return err +// } +// json0 := string(tmpJSON0) +// // This is an example of a SAML connection. +// _, err = auth0.NewConnection(ctx, "samlp", &auth0.ConnectionArgs{ +// Name: pulumi.String("SAML-Connection"), +// Strategy: pulumi.String("samlp"), +// Options: &auth0.ConnectionOptionsArgs{ +// Debug: pulumi.Bool(false), +// SigningCert: pulumi.String(""), +// SignInEndpoint: pulumi.String("https://saml.provider/sign_in"), +// SignOutEndpoint: pulumi.String("https://saml.provider/sign_out"), +// DisableSignOut: pulumi.Bool(true), +// TenantDomain: pulumi.String("example.com"), +// DomainAliases: pulumi.StringArray{ +// pulumi.String("example.com"), +// pulumi.String("alias.example.com"), +// }, +// ProtocolBinding: pulumi.String("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"), +// RequestTemplate: pulumi.String(` +// @@Issuer@@ +// +// `), +// +// UserIdAttribute: pulumi.String("https://saml.provider/imi/ns/identity-200810"), +// SignatureAlgorithm: pulumi.String("rsa-sha256"), +// DigestAlgorithm: pulumi.String("sha256"), +// IconUrl: pulumi.String("https://saml.provider/assets/logo.png"), +// EntityId: pulumi.String(""), +// MetadataXml: pulumi.String(` +// +// +// +// +// +// +// +// `), +// +// MetadataUrl: pulumi.String("https://saml.provider/imi/ns/FederationMetadata.xml"), +// FieldsMap: pulumi.String(json0), +// SigningKey: &auth0.ConnectionOptionsSigningKeyArgs{ +// Key: pulumi.String("-----BEGIN PRIVATE KEY-----\n...{your private key here}...\n-----END PRIVATE KEY-----"), +// Cert: pulumi.String("-----BEGIN CERTIFICATE-----\n...{your public key cert here}...\n-----END CERTIFICATE-----"), +// }, +// DecryptionKey: &auth0.ConnectionOptionsDecryptionKeyArgs{ +// Key: pulumi.String("-----BEGIN PRIVATE KEY-----\n...{your private key here}...\n-----END PRIVATE KEY-----"), +// Cert: pulumi.String("-----BEGIN CERTIFICATE-----\n...{your public key cert here}...\n-----END CERTIFICATE-----"), +// }, +// IdpInitiated: &auth0.ConnectionOptionsIdpInitiatedArgs{ +// ClientId: pulumi.String("client_id"), +// ClientProtocol: pulumi.String("samlp"), +// ClientAuthorizeQuery: pulumi.String("type=code&timeout=30"), // }, // }, -// Strategy: pulumi.String("email"), // }) // if err != nil { // return err @@ -450,22 +806,191 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // This is an example of a WindowsLive connection. // _, err := auth0.NewConnection(ctx, "windowslive", &auth0.ConnectionArgs{ +// Name: pulumi.String("Windowslive-Connection"), +// Strategy: pulumi.String("windowslive"), // Options: &auth0.ConnectionOptionsArgs{ -// ClientId: pulumi.String(""), -// ClientSecret: pulumi.String(""), +// ClientId: pulumi.String(""), +// ClientSecret: pulumi.String(""), +// StrategyVersion: pulumi.Int(2), +// Scopes: pulumi.StringArray{ +// pulumi.String("signin"), +// pulumi.String("graph_user"), +// }, +// SetUserRootAttributes: pulumi.String("on_first_login"), // NonPersistentAttrs: pulumi.StringArray{ // pulumi.String("ethnicity"), // pulumi.String("gender"), // }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// +// ### OIDC Connection +// +// +// ```go +// package main +// +// import ( +// +// "encoding/json" +// +// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// tmpJSON0, err := json.Marshal(map[string]interface{}{ +// "name": "${context.tokenset.name}", +// "email": "${context.tokenset.email}", +// "email_verified": "${context.tokenset.email_verified}", +// "nickname": "${context.tokenset.nickname}", +// "picture": "${context.tokenset.picture}", +// "given_name": "${context.tokenset.given_name}", +// "family_name": "${context.tokenset.family_name}", +// }) +// if err != nil { +// return err +// } +// json0 := string(tmpJSON0) +// // This is an example of an OIDC connection. +// _, err = auth0.NewConnection(ctx, "oidc", &auth0.ConnectionArgs{ +// Name: pulumi.String("oidc-connection"), +// DisplayName: pulumi.String("OIDC Connection"), +// Strategy: pulumi.String("oidc"), +// ShowAsButton: pulumi.Bool(false), +// Options: &auth0.ConnectionOptionsArgs{ +// ClientId: pulumi.String("1234567"), +// ClientSecret: pulumi.String("1234567"), +// DomainAliases: pulumi.StringArray{ +// pulumi.String("example.com"), +// }, +// TenantDomain: pulumi.String(""), +// IconUrl: pulumi.String("https://example.com/assets/logo.png"), +// Type: pulumi.String("back_channel"), +// Issuer: pulumi.String("https://www.paypalobjects.com"), +// JwksUri: pulumi.String("https://api.paypal.com/v1/oauth2/certs"), +// DiscoveryUrl: pulumi.String("https://www.paypalobjects.com/.well-known/openid-configuration"), +// TokenEndpoint: pulumi.String("https://api.paypal.com/v1/oauth2/token"), +// UserinfoEndpoint: pulumi.String("https://api.paypal.com/v1/oauth2/token/userinfo"), +// AuthorizationEndpoint: pulumi.String("https://www.paypal.com/signin/authorize"), // Scopes: pulumi.StringArray{ -// pulumi.String("signin"), -// pulumi.String("graph_user"), +// pulumi.String("openid"), +// pulumi.String("email"), // }, // SetUserRootAttributes: pulumi.String("on_first_login"), -// StrategyVersion: pulumi.Int(2), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, +// ConnectionSettings: &auth0.ConnectionOptionsConnectionSettingsArgs{ +// Pkce: pulumi.String("auto"), +// }, +// AttributeMap: &auth0.ConnectionOptionsAttributeMapArgs{ +// MappingMode: pulumi.String("use_map"), +// UserinfoScope: pulumi.String("openid email profile groups"), +// Attributes: pulumi.String(json0), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// +// ### Okta Connection +// +// +// ```go +// package main +// +// import ( +// +// "encoding/json" +// +// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// tmpJSON0, err := json.Marshal(map[string]interface{}{ +// "screen_name": map[string]interface{}{ +// "alias": "login_hint", +// }, +// }) +// if err != nil { +// return err +// } +// json0 := string(tmpJSON0) +// tmpJSON1, err := json.Marshal(map[string]interface{}{ +// "name": "${context.tokenset.name}", +// "email": "${context.tokenset.email}", +// "email_verified": "${context.tokenset.email_verified}", +// "nickname": "${context.tokenset.nickname}", +// "picture": "${context.tokenset.picture}", +// "given_name": "${context.tokenset.given_name}", +// "family_name": "${context.tokenset.family_name}", +// }) +// if err != nil { +// return err +// } +// json1 := string(tmpJSON1) +// // This is an example of an Okta Workforce connection. +// _, err = auth0.NewConnection(ctx, "okta", &auth0.ConnectionArgs{ +// Name: pulumi.String("okta-connection"), +// DisplayName: pulumi.String("Okta Workforce Connection"), +// Strategy: pulumi.String("okta"), +// ShowAsButton: pulumi.Bool(false), +// Options: &auth0.ConnectionOptionsArgs{ +// ClientId: pulumi.String("1234567"), +// ClientSecret: pulumi.String("1234567"), +// Domain: pulumi.String("example.okta.com"), +// DomainAliases: pulumi.StringArray{ +// pulumi.String("example.com"), +// }, +// Issuer: pulumi.String("https://example.okta.com"), +// JwksUri: pulumi.String("https://example.okta.com/oauth2/v1/keys"), +// TokenEndpoint: pulumi.String("https://example.okta.com/oauth2/v1/token"), +// UserinfoEndpoint: pulumi.String("https://example.okta.com/oauth2/v1/userinfo"), +// AuthorizationEndpoint: pulumi.String("https://example.okta.com/oauth2/v1/authorize"), +// Scopes: pulumi.StringArray{ +// pulumi.String("openid"), +// pulumi.String("email"), +// }, +// SetUserRootAttributes: pulumi.String("on_first_login"), +// NonPersistentAttrs: pulumi.StringArray{ +// pulumi.String("ethnicity"), +// pulumi.String("gender"), +// }, +// UpstreamParams: pulumi.String(json0), +// ConnectionSettings: &auth0.ConnectionOptionsConnectionSettingsArgs{ +// Pkce: pulumi.String("auto"), +// }, +// AttributeMap: &auth0.ConnectionOptionsAttributeMapArgs{ +// MappingMode: pulumi.String("basic_profile"), +// UserinfoScope: pulumi.String("openid email profile groups"), +// Attributes: pulumi.String(json1), +// }, // }, -// Strategy: pulumi.String("windowslive"), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/connectionClient.go b/sdk/go/auth0/connectionClient.go index 89ea10a3..5516a423 100644 --- a/sdk/go/auth0/connectionClient.go +++ b/sdk/go/auth0/connectionClient.go @@ -34,19 +34,22 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// myConn, err := auth0.NewConnection(ctx, "myConn", &auth0.ConnectionArgs{ +// myConn, err := auth0.NewConnection(ctx, "my_conn", &auth0.ConnectionArgs{ +// Name: pulumi.String("My-Auth0-Connection"), // Strategy: pulumi.String("auth0"), // }) // if err != nil { // return err // } -// myClient, err := auth0.NewClient(ctx, "myClient", nil) +// myClient, err := auth0.NewClient(ctx, "my_client", &auth0.ClientArgs{ +// Name: pulumi.String("My-Auth0-Client"), +// }) // if err != nil { // return err // } // // One connection to one client association. // // To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. -// _, err = auth0.NewConnectionClient(ctx, "myConnClientAssoc", &auth0.ConnectionClientArgs{ +// _, err = auth0.NewConnectionClient(ctx, "my_conn_client_assoc", &auth0.ConnectionClientArgs{ // ConnectionId: myConn.ID(), // ClientId: myClient.ID(), // }) diff --git a/sdk/go/auth0/connectionClients.go b/sdk/go/auth0/connectionClients.go index c988cfca..395bf980 100644 --- a/sdk/go/auth0/connectionClients.go +++ b/sdk/go/auth0/connectionClients.go @@ -34,23 +34,28 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// myConn, err := auth0.NewConnection(ctx, "myConn", &auth0.ConnectionArgs{ +// myConn, err := auth0.NewConnection(ctx, "my_conn", &auth0.ConnectionArgs{ +// Name: pulumi.String("My-Auth0-Connection"), // Strategy: pulumi.String("auth0"), // }) // if err != nil { // return err // } -// myFirstClient, err := auth0.NewClient(ctx, "myFirstClient", nil) +// myFirstClient, err := auth0.NewClient(ctx, "my_first_client", &auth0.ClientArgs{ +// Name: pulumi.String("My-First-Auth0-Client"), +// }) // if err != nil { // return err // } -// mySecondClient, err := auth0.NewClient(ctx, "mySecondClient", nil) +// mySecondClient, err := auth0.NewClient(ctx, "my_second_client", &auth0.ClientArgs{ +// Name: pulumi.String("My-Second-Auth0-Client"), +// }) // if err != nil { // return err // } // // One connection to many clients association. // // To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. -// _, err = auth0.NewConnectionClients(ctx, "myConnClientsAssoc", &auth0.ConnectionClientsArgs{ +// _, err = auth0.NewConnectionClients(ctx, "my_conn_clients_assoc", &auth0.ConnectionClientsArgs{ // ConnectionId: myConn.ID(), // EnabledClients: pulumi.StringArray{ // myFirstClient.ID(), diff --git a/sdk/go/auth0/customDomain.go b/sdk/go/auth0/customDomain.go index 34acf3f3..0c2695a7 100644 --- a/sdk/go/auth0/customDomain.go +++ b/sdk/go/auth0/customDomain.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewCustomDomain(ctx, "myCustomDomain", &auth0.CustomDomainArgs{ +// _, err := auth0.NewCustomDomain(ctx, "my_custom_domain", &auth0.CustomDomainArgs{ // Domain: pulumi.String("auth.example.com"), // Type: pulumi.String("auth0_managed_certs"), // }) diff --git a/sdk/go/auth0/emailProvider.go b/sdk/go/auth0/emailProvider.go index 8231fbd8..cf20332b 100644 --- a/sdk/go/auth0/emailProvider.go +++ b/sdk/go/auth0/emailProvider.go @@ -14,65 +14,6 @@ import ( // With Auth0, you can have standard welcome, password reset, and account verification email-based workflows built right into Auth0. This resource allows you to configure email providers, so you can route all emails that are part of Auth0's authentication workflows through the supported high-volume email service of your choice. // -// ## Example Usage -// -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// // This is an example on how to set up the email provider with Amazon SES. -// _, err := auth0.NewEmailProvider(ctx, "amazonSesEmailProvider", &auth0.EmailProviderArgs{ -// Credentials: &auth0.EmailProviderCredentialsArgs{ -// AccessKeyId: pulumi.String("AKIAXXXXXXXXXXXXXXXX"), -// Region: pulumi.String("us-east-1"), -// SecretAccessKey: pulumi.String("7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"), -// }, -// DefaultFromAddress: pulumi.String("accounts@example.com"), -// Enabled: pulumi.Bool(true), -// }) -// if err != nil { -// return err -// } -// // This is an example on how to set up the email provider with Sendgrid. -// _, err = auth0.NewEmailProvider(ctx, "sendgridEmailProvider", &auth0.EmailProviderArgs{ -// Credentials: &auth0.EmailProviderCredentialsArgs{ -// ApiKey: pulumi.String("secretAPIKey"), -// }, -// DefaultFromAddress: pulumi.String("accounts@example.com"), -// Enabled: pulumi.Bool(true), -// }) -// if err != nil { -// return err -// } -// // This is an example on how to set up the email provider with MS365. -// _, err = auth0.NewEmailProvider(ctx, "smtpEmailProvider", &auth0.EmailProviderArgs{ -// Credentials: &auth0.EmailProviderCredentialsArgs{ -// Ms365ClientId: pulumi.String("ms365_client_id"), -// Ms365ClientSecret: pulumi.String("ms365_client_secret"), -// Ms365TenantId: pulumi.String("ms365_tenant_id"), -// }, -// DefaultFromAddress: pulumi.String("accounts@example.com"), -// Enabled: pulumi.Bool(true), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// // ## Import // // As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/go/auth0/emailTemplate.go b/sdk/go/auth0/emailTemplate.go index e756ddfb..0e77a68b 100644 --- a/sdk/go/auth0/emailTemplate.go +++ b/sdk/go/auth0/emailTemplate.go @@ -29,7 +29,8 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// myEmailProvider, err := auth0.NewEmailProvider(ctx, "myEmailProvider", &auth0.EmailProviderArgs{ +// myEmailProvider, err := auth0.NewEmailProvider(ctx, "my_email_provider", &auth0.EmailProviderArgs{ +// Name: pulumi.String("ses"), // Enabled: pulumi.Bool(true), // DefaultFromAddress: pulumi.String("accounts@example.com"), // Credentials: &auth0.EmailProviderCredentialsArgs{ @@ -41,7 +42,7 @@ import ( // if err != nil { // return err // } -// _, err = auth0.NewEmailTemplate(ctx, "myEmailTemplate", &auth0.EmailTemplateArgs{ +// _, err = auth0.NewEmailTemplate(ctx, "my_email_template", &auth0.EmailTemplateArgs{ // Template: pulumi.String("welcome_email"), // Body: pulumi.String("

Welcome!

"), // From: pulumi.String("welcome@example.com"), diff --git a/sdk/go/auth0/getClient.go b/sdk/go/auth0/getClient.go index ef7e5aa9..a86b6e62 100644 --- a/sdk/go/auth0/getClient.go +++ b/sdk/go/auth0/getClient.go @@ -28,12 +28,14 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // An Auth0 Client loaded using its name. // _, err := auth0.LookupClient(ctx, &auth0.LookupClientArgs{ // Name: pulumi.StringRef("Name of my Application"), // }, nil) // if err != nil { // return err // } +// // An Auth0 Client loaded using its ID. // _, err = auth0.LookupClient(ctx, &auth0.LookupClientArgs{ // ClientId: pulumi.StringRef("abcdefghkijklmnopqrstuvwxyz0123456789"), // }, nil) diff --git a/sdk/go/auth0/getConnection.go b/sdk/go/auth0/getConnection.go index d83aa318..812d4d0d 100644 --- a/sdk/go/auth0/getConnection.go +++ b/sdk/go/auth0/getConnection.go @@ -28,12 +28,14 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // An Auth0 Connection loaded using its name. // _, err := auth0.LookupConnection(ctx, &auth0.LookupConnectionArgs{ // Name: pulumi.StringRef("Acceptance-Test-Connection-{{.testName}}"), // }, nil) // if err != nil { // return err // } +// // An Auth0 Connection loaded using its ID. // _, err = auth0.LookupConnection(ctx, &auth0.LookupConnectionArgs{ // ConnectionId: pulumi.StringRef("con_abcdefghkijklmnopqrstuvwxyz0123456789"), // }, nil) diff --git a/sdk/go/auth0/getOrganization.go b/sdk/go/auth0/getOrganization.go index 91ce72d3..7c79e0f6 100644 --- a/sdk/go/auth0/getOrganization.go +++ b/sdk/go/auth0/getOrganization.go @@ -28,12 +28,14 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // An Auth0 Organization loaded using its name. // _, err := auth0.LookupOrganization(ctx, &auth0.LookupOrganizationArgs{ // Name: pulumi.StringRef("my-org"), // }, nil) // if err != nil { // return err // } +// // An Auth0 Organization loaded using its ID. // _, err = auth0.LookupOrganization(ctx, &auth0.LookupOrganizationArgs{ // OrganizationId: pulumi.StringRef("org_abcdefghkijklmnopqrstuvwxyz0123456789"), // }, nil) diff --git a/sdk/go/auth0/getResourceServer.go b/sdk/go/auth0/getResourceServer.go index a626041a..a422a910 100644 --- a/sdk/go/auth0/getResourceServer.go +++ b/sdk/go/auth0/getResourceServer.go @@ -28,12 +28,14 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // An Auth0 Resource Server loaded using its identifier. // _, err := auth0.LookupResourceServer(ctx, &auth0.LookupResourceServerArgs{ // Identifier: pulumi.StringRef("https://my-api.com/v1"), // }, nil) // if err != nil { // return err // } +// // An Auth0 Resource Server loaded using its ID. // _, err = auth0.LookupResourceServer(ctx, &auth0.LookupResourceServerArgs{ // ResourceServerId: pulumi.StringRef("abcdefghkijklmnopqrstuvwxyz0123456789"), // }, nil) diff --git a/sdk/go/auth0/getRole.go b/sdk/go/auth0/getRole.go index 9159701e..49ac44ce 100644 --- a/sdk/go/auth0/getRole.go +++ b/sdk/go/auth0/getRole.go @@ -28,12 +28,14 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // An Auth0 Role loaded using its name. // _, err := auth0.LookupRole(ctx, &auth0.LookupRoleArgs{ // Name: pulumi.StringRef("my-role"), // }, nil) // if err != nil { // return err // } +// // An Auth0 Role loaded using its ID. // _, err = auth0.LookupRole(ctx, &auth0.LookupRoleArgs{ // RoleId: pulumi.StringRef("abcdefghkijklmnopqrstuvwxyz0123456789"), // }, nil) diff --git a/sdk/go/auth0/getUser.go b/sdk/go/auth0/getUser.go index 88ae6233..0cea239f 100644 --- a/sdk/go/auth0/getUser.go +++ b/sdk/go/auth0/getUser.go @@ -28,6 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // An Auth0 User loaded using its ID. // _, err := auth0.LookupUser(ctx, &auth0.LookupUserArgs{ // UserId: "auth0|34fdr23fdsfdfsf", // }, nil) diff --git a/sdk/go/auth0/guardian.go b/sdk/go/auth0/guardian.go index 9ed4debd..84a2029d 100644 --- a/sdk/go/auth0/guardian.go +++ b/sdk/go/auth0/guardian.go @@ -29,17 +29,21 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewGuardian(ctx, "myGuardian", &auth0.GuardianArgs{ -// Duo: &auth0.GuardianDuoArgs{ -// Enabled: pulumi.Bool(true), -// Hostname: pulumi.String("api-hostname"), -// IntegrationKey: pulumi.String("someKey"), -// SecretKey: pulumi.String("someSecret"), +// _, err := auth0.NewGuardian(ctx, "my_guardian", &auth0.GuardianArgs{ +// Policy: pulumi.String("all-applications"), +// Email: pulumi.Bool(true), +// Otp: pulumi.Bool(true), +// RecoveryCode: pulumi.Bool(true), +// WebauthnPlatform: &auth0.GuardianWebauthnPlatformArgs{ +// Enabled: pulumi.Bool(true), +// }, +// WebauthnRoaming: &auth0.GuardianWebauthnRoamingArgs{ +// Enabled: pulumi.Bool(true), +// UserVerification: pulumi.String("required"), // }, -// Email: pulumi.Bool(true), -// Otp: pulumi.Bool(true), // Phone: &auth0.GuardianPhoneArgs{ -// Enabled: pulumi.Bool(true), +// Enabled: pulumi.Bool(true), +// Provider: pulumi.String("auth0"), // MessageTypes: pulumi.StringArray{ // pulumi.String("sms"), // pulumi.String("voice"), @@ -48,10 +52,10 @@ import ( // EnrollmentMessage: pulumi.String("{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment."), // VerificationMessage: pulumi.String("{{code}} is your verification code for {{tenant.friendly_name}}."), // }, -// Provider: pulumi.String("auth0"), // }, -// Policy: pulumi.String("all-applications"), // Push: &auth0.GuardianPushArgs{ +// Enabled: pulumi.Bool(true), +// Provider: pulumi.String("sns"), // AmazonSns: &auth0.GuardianPushAmazonSnsArgs{ // AwsAccessKeyId: pulumi.String("test1"), // AwsRegion: pulumi.String("us-west-1"), @@ -64,16 +68,12 @@ import ( // AppleAppLink: pulumi.String("https://itunes.apple.com/us/app/my-app/id123121"), // GoogleAppLink: pulumi.String("https://play.google.com/store/apps/details?id=com.my.app"), // }, -// Enabled: pulumi.Bool(true), -// Provider: pulumi.String("sns"), -// }, -// RecoveryCode: pulumi.Bool(true), -// WebauthnPlatform: &auth0.GuardianWebauthnPlatformArgs{ -// Enabled: pulumi.Bool(true), // }, -// WebauthnRoaming: &auth0.GuardianWebauthnRoamingArgs{ -// Enabled: pulumi.Bool(true), -// UserVerification: pulumi.String("required"), +// Duo: &auth0.GuardianDuoArgs{ +// Enabled: pulumi.Bool(true), +// IntegrationKey: pulumi.String("someKey"), +// SecretKey: pulumi.String("someSecret"), +// Hostname: pulumi.String("api-hostname"), // }, // }) // if err != nil { diff --git a/sdk/go/auth0/hook.go b/sdk/go/auth0/hook.go index 7afc35a9..f2701464 100644 --- a/sdk/go/auth0/hook.go +++ b/sdk/go/auth0/hook.go @@ -31,16 +31,17 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewHook(ctx, "myHook", &auth0.HookArgs{ -// Dependencies: pulumi.Map{ -// "auth0": pulumi.Any("2.30.0"), -// }, -// Enabled: pulumi.Bool(true), -// Script: pulumi.String(" function (user, context, callback) {\n callback(null, { user });\n }\n \n"), +// _, err := auth0.NewHook(ctx, "my_hook", &auth0.HookArgs{ +// Name: pulumi.String("My Pre User Registration Hook"), +// Script: pulumi.String(" function (user, context, callback) {\n callback(null, { user });\n }\n"), +// TriggerId: pulumi.String("pre-user-registration"), +// Enabled: pulumi.Bool(true), // Secrets: pulumi.Map{ // "foo": pulumi.Any("bar"), // }, -// TriggerId: pulumi.String("pre-user-registration"), +// Dependencies: pulumi.Map{ +// "auth0": pulumi.Any("2.30.0"), +// }, // }) // if err != nil { // return err diff --git a/sdk/go/auth0/logStream.go b/sdk/go/auth0/logStream.go index 5e47f793..d9259c9a 100644 --- a/sdk/go/auth0/logStream.go +++ b/sdk/go/auth0/logStream.go @@ -30,42 +30,44 @@ import ( // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // // This is an example of an http log stream. -// _, err := auth0.NewLogStream(ctx, "myWebhook", &auth0.LogStreamArgs{ +// _, err := auth0.NewLogStream(ctx, "my_webhook", &auth0.LogStreamArgs{ +// Name: pulumi.String("HTTP log stream"), +// Type: pulumi.String("http"), // Filters: pulumi.StringMapArray{ // pulumi.StringMap{ -// "name": pulumi.String("auth.login.fail"), // "type": pulumi.String("category"), +// "name": pulumi.String("auth.login.fail"), // }, // pulumi.StringMap{ -// "name": pulumi.String("auth.signup.fail"), // "type": pulumi.String("category"), +// "name": pulumi.String("auth.signup.fail"), // }, // }, // Sink: &auth0.LogStreamSinkArgs{ -// HttpAuthorization: pulumi.String("AKIAXXXXXXXXXXXXXXXX"), -// HttpContentFormat: pulumi.String("JSONOBJECT"), +// HttpEndpoint: pulumi.String("https://example.com/logs"), // HttpContentType: pulumi.String("application/json"), +// HttpContentFormat: pulumi.String("JSONOBJECT"), +// HttpAuthorization: pulumi.String("AKIAXXXXXXXXXXXXXXXX"), // HttpCustomHeaders: pulumi.StringMapArray{ // pulumi.StringMap{ // "header": pulumi.String("foo"), // "value": pulumi.String("bar"), // }, // }, -// HttpEndpoint: pulumi.String("https://example.com/logs"), // }, -// Type: pulumi.String("http"), // }) // if err != nil { // return err // } // // This is an example of an Amazon EventBridge log stream. -// _, err = auth0.NewLogStream(ctx, "exampleAws", &auth0.LogStreamArgs{ +// _, err = auth0.NewLogStream(ctx, "example_aws", &auth0.LogStreamArgs{ +// Name: pulumi.String("AWS Eventbridge"), +// Type: pulumi.String("eventbridge"), +// Status: pulumi.String("active"), // Sink: &auth0.LogStreamSinkArgs{ // AwsAccountId: pulumi.String("my_account_id"), // AwsRegion: pulumi.String("us-east-2"), // }, -// Status: pulumi.String("active"), -// Type: pulumi.String("eventbridge"), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/organization.go b/sdk/go/auth0/organization.go index d9795c06..41496eed 100644 --- a/sdk/go/auth0/organization.go +++ b/sdk/go/auth0/organization.go @@ -34,15 +34,16 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewOrganization(ctx, "myOrganization", &auth0.OrganizationArgs{ +// _, err := auth0.NewOrganization(ctx, "my_organization", &auth0.OrganizationArgs{ +// Name: pulumi.String("auth0-inc"), +// DisplayName: pulumi.String("Auth0 Inc."), // Branding: &auth0.OrganizationBrandingArgs{ +// LogoUrl: pulumi.String("https://example.com/assets/icons/icon.png"), // Colors: pulumi.StringMap{ -// "pageBackground": pulumi.String("#e1e1e1"), -// "primary": pulumi.String("#f2f2f2"), +// "primary": pulumi.String("#f2f2f2"), +// "page_background": pulumi.String("#e1e1e1"), // }, -// LogoUrl: pulumi.String("https://example.com/assets/icons/icon.png"), // }, -// DisplayName: pulumi.String("Auth0 Inc."), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/organizationConnection.go b/sdk/go/auth0/organizationConnection.go index 96f1f30b..407aa009 100644 --- a/sdk/go/auth0/organizationConnection.go +++ b/sdk/go/auth0/organizationConnection.go @@ -34,19 +34,21 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// myConnection, err := auth0.NewConnection(ctx, "myConnection", &auth0.ConnectionArgs{ +// myConnection, err := auth0.NewConnection(ctx, "my_connection", &auth0.ConnectionArgs{ +// Name: pulumi.String("My Connection"), // Strategy: pulumi.String("auth0"), // }) // if err != nil { // return err // } -// myOrganization, err := auth0.NewOrganization(ctx, "myOrganization", &auth0.OrganizationArgs{ +// myOrganization, err := auth0.NewOrganization(ctx, "my_organization", &auth0.OrganizationArgs{ +// Name: pulumi.String("my-organization"), // DisplayName: pulumi.String("My Organization"), // }) // if err != nil { // return err // } -// _, err = auth0.NewOrganizationConnection(ctx, "myOrgConn", &auth0.OrganizationConnectionArgs{ +// _, err = auth0.NewOrganizationConnection(ctx, "my_org_conn", &auth0.OrganizationConnectionArgs{ // OrganizationId: myOrganization.ID(), // ConnectionId: myConnection.ID(), // AssignMembershipOnLogin: pulumi.Bool(true), diff --git a/sdk/go/auth0/organizationConnections.go b/sdk/go/auth0/organizationConnections.go index 5e5f8509..ef74fd7f 100644 --- a/sdk/go/auth0/organizationConnections.go +++ b/sdk/go/auth0/organizationConnections.go @@ -34,19 +34,22 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewConnection(ctx, "myConnection-1", &auth0.ConnectionArgs{ +// _, err := auth0.NewConnection(ctx, "my_connection-1", &auth0.ConnectionArgs{ +// Name: pulumi.String("My Connection 1"), // Strategy: pulumi.String("auth0"), // }) // if err != nil { // return err // } -// _, err = auth0.NewConnection(ctx, "myConnection-2", &auth0.ConnectionArgs{ +// _, err = auth0.NewConnection(ctx, "my_connection-2", &auth0.ConnectionArgs{ +// Name: pulumi.String("My Connection 2"), // Strategy: pulumi.String("auth0"), // }) // if err != nil { // return err // } -// myOrganization, err := auth0.NewOrganization(ctx, "myOrganization", &auth0.OrganizationArgs{ +// myOrganization, err := auth0.NewOrganization(ctx, "my_organization", &auth0.OrganizationArgs{ +// Name: pulumi.String("my-organization"), // DisplayName: pulumi.String("My Organization"), // }) // if err != nil { diff --git a/sdk/go/auth0/organizationMember.go b/sdk/go/auth0/organizationMember.go index b27c7458..1bdaa3ba 100644 --- a/sdk/go/auth0/organizationMember.go +++ b/sdk/go/auth0/organizationMember.go @@ -42,13 +42,14 @@ import ( // if err != nil { // return err // } -// myOrg, err := auth0.NewOrganization(ctx, "myOrg", &auth0.OrganizationArgs{ +// myOrg, err := auth0.NewOrganization(ctx, "my_org", &auth0.OrganizationArgs{ +// Name: pulumi.String("org-admin"), // DisplayName: pulumi.String("Admin"), // }) // if err != nil { // return err // } -// _, err = auth0.NewOrganizationMember(ctx, "myOrgMember", &auth0.OrganizationMemberArgs{ +// _, err = auth0.NewOrganizationMember(ctx, "my_org_member", &auth0.OrganizationMemberArgs{ // OrganizationId: myOrg.ID(), // UserId: user.ID(), // }) diff --git a/sdk/go/auth0/organizationMemberRole.go b/sdk/go/auth0/organizationMemberRole.go index 138b3c63..c527f9bc 100644 --- a/sdk/go/auth0/organizationMemberRole.go +++ b/sdk/go/auth0/organizationMemberRole.go @@ -29,11 +29,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// reader, err := auth0.NewRole(ctx, "reader", nil) +// reader, err := auth0.NewRole(ctx, "reader", &auth0.RoleArgs{ +// Name: pulumi.String("Reader"), +// }) // if err != nil { // return err // } -// writer, err := auth0.NewRole(ctx, "writer", nil) +// writer, err := auth0.NewRole(ctx, "writer", &auth0.RoleArgs{ +// Name: pulumi.String("Writer"), +// }) // if err != nil { // return err // } @@ -45,13 +49,14 @@ import ( // if err != nil { // return err // } -// myOrg, err := auth0.NewOrganization(ctx, "myOrg", &auth0.OrganizationArgs{ +// myOrg, err := auth0.NewOrganization(ctx, "my_org", &auth0.OrganizationArgs{ +// Name: pulumi.String("some-org"), // DisplayName: pulumi.String("Some Org"), // }) // if err != nil { // return err // } -// _, err = auth0.NewOrganizationMember(ctx, "myOrgMember", &auth0.OrganizationMemberArgs{ +// _, err = auth0.NewOrganizationMember(ctx, "my_org_member", &auth0.OrganizationMemberArgs{ // OrganizationId: myOrg.ID(), // UserId: user.ID(), // }) diff --git a/sdk/go/auth0/organizationMemberRoles.go b/sdk/go/auth0/organizationMemberRoles.go index d3d72631..84bc4047 100644 --- a/sdk/go/auth0/organizationMemberRoles.go +++ b/sdk/go/auth0/organizationMemberRoles.go @@ -29,11 +29,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// reader, err := auth0.NewRole(ctx, "reader", nil) +// reader, err := auth0.NewRole(ctx, "reader", &auth0.RoleArgs{ +// Name: pulumi.String("Reader"), +// }) // if err != nil { // return err // } -// writer, err := auth0.NewRole(ctx, "writer", nil) +// writer, err := auth0.NewRole(ctx, "writer", &auth0.RoleArgs{ +// Name: pulumi.String("Writer"), +// }) // if err != nil { // return err // } @@ -45,20 +49,21 @@ import ( // if err != nil { // return err // } -// myOrg, err := auth0.NewOrganization(ctx, "myOrg", &auth0.OrganizationArgs{ +// myOrg, err := auth0.NewOrganization(ctx, "my_org", &auth0.OrganizationArgs{ +// Name: pulumi.String("some-org"), // DisplayName: pulumi.String("Some Org"), // }) // if err != nil { // return err // } -// _, err = auth0.NewOrganizationMember(ctx, "myOrgMember", &auth0.OrganizationMemberArgs{ +// _, err = auth0.NewOrganizationMember(ctx, "my_org_member", &auth0.OrganizationMemberArgs{ // OrganizationId: myOrg.ID(), // UserId: user.ID(), // }) // if err != nil { // return err // } -// _, err = auth0.NewOrganizationMemberRoles(ctx, "myOrgMemberRoles", &auth0.OrganizationMemberRolesArgs{ +// _, err = auth0.NewOrganizationMemberRoles(ctx, "my_org_member_roles", &auth0.OrganizationMemberRolesArgs{ // OrganizationId: myOrg.ID(), // UserId: user.ID(), // Roles: pulumi.StringArray{ diff --git a/sdk/go/auth0/organizationMembers.go b/sdk/go/auth0/organizationMembers.go index da39e584..0f26d0a3 100644 --- a/sdk/go/auth0/organizationMembers.go +++ b/sdk/go/auth0/organizationMembers.go @@ -34,7 +34,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// user1, err := auth0.NewUser(ctx, "user1", &auth0.UserArgs{ +// user1, err := auth0.NewUser(ctx, "user_1", &auth0.UserArgs{ // ConnectionName: pulumi.String("Username-Password-Authentication"), // Email: pulumi.String("myuser1@auth0.com"), // Password: pulumi.String("MyPass123$"), @@ -42,7 +42,7 @@ import ( // if err != nil { // return err // } -// user2, err := auth0.NewUser(ctx, "user2", &auth0.UserArgs{ +// user2, err := auth0.NewUser(ctx, "user_2", &auth0.UserArgs{ // ConnectionName: pulumi.String("Username-Password-Authentication"), // Email: pulumi.String("myuser2@auth0.com"), // Password: pulumi.String("MyPass123$"), @@ -50,13 +50,14 @@ import ( // if err != nil { // return err // } -// myOrg, err := auth0.NewOrganization(ctx, "myOrg", &auth0.OrganizationArgs{ +// myOrg, err := auth0.NewOrganization(ctx, "my_org", &auth0.OrganizationArgs{ +// Name: pulumi.String("some-org"), // DisplayName: pulumi.String("Some Organization"), // }) // if err != nil { // return err // } -// _, err = auth0.NewOrganizationMembers(ctx, "myMembers", &auth0.OrganizationMembersArgs{ +// _, err = auth0.NewOrganizationMembers(ctx, "my_members", &auth0.OrganizationMembersArgs{ // OrganizationId: myOrg.ID(), // Members: pulumi.StringArray{ // user1.ID(), diff --git a/sdk/go/auth0/pages.go b/sdk/go/auth0/pages.go index a5063eaa..4ae4256b 100644 --- a/sdk/go/auth0/pages.go +++ b/sdk/go/auth0/pages.go @@ -28,23 +28,23 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewPages(ctx, "myPages", &auth0.PagesArgs{ +// _, err := auth0.NewPages(ctx, "my_pages", &auth0.PagesArgs{ +// Login: &auth0.PagesLoginArgs{ +// Enabled: pulumi.Bool(true), +// Html: pulumi.String("My Custom Login Page"), +// }, // ChangePassword: &auth0.PagesChangePasswordArgs{ // Enabled: pulumi.Bool(true), // Html: pulumi.String("My Custom Reset Password Page"), // }, -// Error: &auth0.PagesErrorArgs{ -// Html: pulumi.String("My Custom Error Page"), -// ShowLogLink: pulumi.Bool(true), -// Url: pulumi.String("https://example.com"), -// }, // GuardianMfa: &auth0.PagesGuardianMfaArgs{ // Enabled: pulumi.Bool(true), // Html: pulumi.String("My Custom MFA Page"), // }, -// Login: &auth0.PagesLoginArgs{ -// Enabled: pulumi.Bool(true), -// Html: pulumi.String("My Custom Login Page"), +// Error: &auth0.PagesErrorArgs{ +// ShowLogLink: pulumi.Bool(true), +// Html: pulumi.String("My Custom Error Page"), +// Url: pulumi.String("https://example.com"), // }, // }) // if err != nil { diff --git a/sdk/go/auth0/prompt.go b/sdk/go/auth0/prompt.go index a0802005..770c09d1 100644 --- a/sdk/go/auth0/prompt.go +++ b/sdk/go/auth0/prompt.go @@ -28,9 +28,9 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewPrompt(ctx, "myPrompt", &auth0.PromptArgs{ -// IdentifierFirst: pulumi.Bool(false), +// _, err := auth0.NewPrompt(ctx, "my_prompt", &auth0.PromptArgs{ // UniversalLoginExperience: pulumi.String("new"), +// IdentifierFirst: pulumi.Bool(false), // WebauthnPlatformFirstFactor: pulumi.Bool(true), // }) // if err != nil { diff --git a/sdk/go/auth0/promptPartials.go b/sdk/go/auth0/promptPartials.go index 19fff085..ce858dc6 100644 --- a/sdk/go/auth0/promptPartials.go +++ b/sdk/go/auth0/promptPartials.go @@ -29,14 +29,14 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewPromptPartials(ctx, "myLoginPromptPartials", &auth0.PromptPartialsArgs{ -// FormContentEnd: pulumi.String("
Updated Form Content End
"), +// _, err := auth0.NewPromptPartials(ctx, "my_login_prompt_partials", &auth0.PromptPartialsArgs{ +// Prompt: pulumi.String("login"), // FormContentStart: pulumi.String("
Updated Form Content Start
"), -// FormFooterEnd: pulumi.String("
Updated Footer End
"), +// FormContentEnd: pulumi.String("
Updated Form Content End
"), // FormFooterStart: pulumi.String("
Updated Footer Start
"), -// Prompt: pulumi.String("login"), -// SecondaryActionsEnd: pulumi.String("
Updated Secondary Actions End
"), +// FormFooterEnd: pulumi.String("
Updated Footer End
"), // SecondaryActionsStart: pulumi.String("
Updated Secondary Actions Start
"), +// SecondaryActionsEnd: pulumi.String("
Updated Secondary Actions End
"), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/resourceServer.go b/sdk/go/auth0/resourceServer.go index 50d2f38c..62bfe86c 100644 --- a/sdk/go/auth0/resourceServer.go +++ b/sdk/go/auth0/resourceServer.go @@ -29,12 +29,13 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewResourceServer(ctx, "myResourceServer", &auth0.ResourceServerArgs{ -// AllowOfflineAccess: pulumi.Bool(true), +// _, err := auth0.NewResourceServer(ctx, "my_resource_server", &auth0.ResourceServerArgs{ +// Name: pulumi.String("Example Resource Server (Managed by Terraform)"), // Identifier: pulumi.String("https://api.example.com"), // SigningAlg: pulumi.String("RS256"), +// AllowOfflineAccess: pulumi.Bool(true), +// TokenLifetime: pulumi.Int(8600), // SkipConsentForVerifiableFirstPartyClients: pulumi.Bool(true), -// TokenLifetime: pulumi.Int(8600), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/resourceServerScope.go b/sdk/go/auth0/resourceServerScope.go index dd810cb2..bcb42ab3 100644 --- a/sdk/go/auth0/resourceServerScope.go +++ b/sdk/go/auth0/resourceServerScope.go @@ -33,20 +33,21 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// resourceServer, err := auth0.NewResourceServer(ctx, "resourceServer", &auth0.ResourceServerArgs{ +// resourceServer, err := auth0.NewResourceServer(ctx, "resource_server", &auth0.ResourceServerArgs{ +// Name: pulumi.String("Example Resource Server (Managed by Terraform)"), // Identifier: pulumi.String("https://api.example.com"), // }) // if err != nil { // return err // } -// _, err = auth0.NewResourceServerScope(ctx, "readPosts", &auth0.ResourceServerScopeArgs{ +// _, err = auth0.NewResourceServerScope(ctx, "read_posts", &auth0.ResourceServerScopeArgs{ // ResourceServerIdentifier: resourceServer.Identifier, // Scope: pulumi.String("read:posts"), // }) // if err != nil { // return err // } -// _, err = auth0.NewResourceServerScope(ctx, "writePosts", &auth0.ResourceServerScopeArgs{ +// _, err = auth0.NewResourceServerScope(ctx, "write_posts", &auth0.ResourceServerScopeArgs{ // ResourceServerIdentifier: resourceServer.Identifier, // Scope: pulumi.String("write:posts"), // }) diff --git a/sdk/go/auth0/resourceServerScopes.go b/sdk/go/auth0/resourceServerScopes.go index b8df6890..cf3e4510 100644 --- a/sdk/go/auth0/resourceServerScopes.go +++ b/sdk/go/auth0/resourceServerScopes.go @@ -34,13 +34,14 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// myApi, err := auth0.NewResourceServer(ctx, "myApi", &auth0.ResourceServerArgs{ +// myApi, err := auth0.NewResourceServer(ctx, "my_api", &auth0.ResourceServerArgs{ +// Name: pulumi.String("Example Resource Server (Managed by Terraform)"), // Identifier: pulumi.String("https://api.example.com"), // }) // if err != nil { // return err // } -// _, err = auth0.NewResourceServerScopes(ctx, "myApiScopes", &auth0.ResourceServerScopesArgs{ +// _, err = auth0.NewResourceServerScopes(ctx, "my_api_scopes", &auth0.ResourceServerScopesArgs{ // ResourceServerIdentifier: myApi.Identifier, // Scopes: auth0.ResourceServerScopesScopeArray{ // &auth0.ResourceServerScopesScopeArgs{ diff --git a/sdk/go/auth0/role.go b/sdk/go/auth0/role.go index 49f8b678..f7532ea9 100644 --- a/sdk/go/auth0/role.go +++ b/sdk/go/auth0/role.go @@ -28,7 +28,8 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewRole(ctx, "myRole", &auth0.RoleArgs{ +// _, err := auth0.NewRole(ctx, "my_role", &auth0.RoleArgs{ +// Name: pulumi.String("My Role - (Managed by Terraform)"), // Description: pulumi.String("Role Description..."), // }) // if err != nil { diff --git a/sdk/go/auth0/rule.go b/sdk/go/auth0/rule.go index 31ef1775..75c71d66 100644 --- a/sdk/go/auth0/rule.go +++ b/sdk/go/auth0/rule.go @@ -31,9 +31,10 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewRule(ctx, "myRule", &auth0.RuleArgs{ +// _, err := auth0.NewRule(ctx, "my_rule", &auth0.RuleArgs{ +// Name: pulumi.String("empty-rule"), +// Script: pulumi.String(" function (user, context, callback) {\n callback(null, user, context);\n }\n"), // Enabled: pulumi.Bool(true), -// Script: pulumi.String(" function (user, context, callback) {\n callback(null, user, context);\n }\n \n"), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/ruleConfig.go b/sdk/go/auth0/ruleConfig.go index bdf55b24..9fad84ff 100644 --- a/sdk/go/auth0/ruleConfig.go +++ b/sdk/go/auth0/ruleConfig.go @@ -29,14 +29,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewRule(ctx, "myRule", &auth0.RuleArgs{ +// _, err := auth0.NewRule(ctx, "my_rule", &auth0.RuleArgs{ +// Name: pulumi.String("empty-rule"), +// Script: pulumi.String(" function (user, context, callback) {\n callback(null, user, context);\n }\n"), // Enabled: pulumi.Bool(true), -// Script: pulumi.String(" function (user, context, callback) {\n callback(null, user, context);\n }\n \n"), // }) // if err != nil { // return err // } -// _, err = auth0.NewRuleConfig(ctx, "myRuleConfig", &auth0.RuleConfigArgs{ +// _, err = auth0.NewRuleConfig(ctx, "my_rule_config", &auth0.RuleConfigArgs{ // Key: pulumi.String("foo"), // Value: pulumi.String("bar"), // }) diff --git a/sdk/go/auth0/tenant.go b/sdk/go/auth0/tenant.go index 7e0d71bb..d9899f57 100644 --- a/sdk/go/auth0/tenant.go +++ b/sdk/go/auth0/tenant.go @@ -31,34 +31,34 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := auth0.NewTenant(ctx, "myTenant", &auth0.TenantArgs{ +// _, err := auth0.NewTenant(ctx, "my_tenant", &auth0.TenantArgs{ +// FriendlyName: pulumi.String("Tenant Name"), +// PictureUrl: pulumi.String("http://example.com/logo.png"), +// SupportEmail: pulumi.String("support@example.com"), +// SupportUrl: pulumi.String("http://example.com/support"), // AllowedLogoutUrls: pulumi.StringArray{ // pulumi.String("http://example.com/logout"), // }, -// DefaultRedirectionUri: pulumi.String("https://example.com/login"), +// SessionLifetime: pulumi.Float64(8760), +// SandboxVersion: pulumi.String("12"), // EnabledLocales: pulumi.StringArray{ // pulumi.String("en"), // }, +// DefaultRedirectionUri: pulumi.String("https://example.com/login"), // Flags: &auth0.TenantFlagsArgs{ // DisableClickjackProtectionHeaders: pulumi.Bool(true), -// DisableFieldsMapFix: pulumi.Bool(false), -// DisableManagementApiSmsObfuscation: pulumi.Bool(false), // EnablePublicSignupUserExistsError: pulumi.Bool(true), -// NoDiscloseEnterpriseConnections: pulumi.Bool(false), // UseScopeDescriptionsForConsent: pulumi.Bool(true), +// NoDiscloseEnterpriseConnections: pulumi.Bool(false), +// DisableManagementApiSmsObfuscation: pulumi.Bool(false), +// DisableFieldsMapFix: pulumi.Bool(false), // }, -// FriendlyName: pulumi.String("Tenant Name"), -// PictureUrl: pulumi.String("http://example.com/logo.png"), -// SandboxVersion: pulumi.String("12"), // SessionCookie: &auth0.TenantSessionCookieArgs{ // Mode: pulumi.String("non-persistent"), // }, -// SessionLifetime: pulumi.Float64(8760), // Sessions: &auth0.TenantSessionsArgs{ // OidcLogoutPromptEnabled: pulumi.Bool(false), // }, -// SupportEmail: pulumi.String("support@example.com"), -// SupportUrl: pulumi.String("http://example.com/support"), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/triggerAction.go b/sdk/go/auth0/triggerAction.go index 9e436f47..5ca915ef 100644 --- a/sdk/go/auth0/triggerAction.go +++ b/sdk/go/auth0/triggerAction.go @@ -35,7 +35,8 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// loginAlert, err := auth0.NewAction(ctx, "loginAlert", &auth0.ActionArgs{ +// loginAlert, err := auth0.NewAction(ctx, "login_alert", &auth0.ActionArgs{ +// Name: pulumi.String("Alert after login"), // Code: pulumi.String("exports.onContinuePostLogin = async (event, api) => {\n console.log(\"foo\");\n};\"\n"), // Deploy: pulumi.Bool(true), // SupportedTriggers: &auth0.ActionSupportedTriggersArgs{ @@ -46,7 +47,7 @@ import ( // if err != nil { // return err // } -// _, err = auth0.NewTriggerAction(ctx, "postLoginAlertAction", &auth0.TriggerActionArgs{ +// _, err = auth0.NewTriggerAction(ctx, "post_login_alert_action", &auth0.TriggerActionArgs{ // Trigger: pulumi.String("post-login"), // ActionId: loginAlert.ID(), // }) diff --git a/sdk/go/auth0/triggerActions.go b/sdk/go/auth0/triggerActions.go index 7059e7b6..3389f25f 100644 --- a/sdk/go/auth0/triggerActions.go +++ b/sdk/go/auth0/triggerActions.go @@ -33,7 +33,8 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// actionFoo, err := auth0.NewAction(ctx, "actionFoo", &auth0.ActionArgs{ +// actionFoo, err := auth0.NewAction(ctx, "action_foo", &auth0.ActionArgs{ +// Name: pulumi.String("Test Trigger Binding Foo"), // Code: pulumi.String("exports.onContinuePostLogin = async (event, api) => {\n console.log(\"foo\");\n};\"\n"), // Deploy: pulumi.Bool(true), // SupportedTriggers: &auth0.ActionSupportedTriggersArgs{ @@ -44,7 +45,8 @@ import ( // if err != nil { // return err // } -// actionBar, err := auth0.NewAction(ctx, "actionBar", &auth0.ActionArgs{ +// actionBar, err := auth0.NewAction(ctx, "action_bar", &auth0.ActionArgs{ +// Name: pulumi.String("Test Trigger Binding Bar"), // Code: pulumi.String("exports.onContinuePostLogin = async (event, api) => {\n console.log(\"bar\");\n};\"\n"), // Deploy: pulumi.Bool(true), // SupportedTriggers: &auth0.ActionSupportedTriggersArgs{ @@ -55,7 +57,7 @@ import ( // if err != nil { // return err // } -// _, err = auth0.NewTriggerActions(ctx, "loginFlow", &auth0.TriggerActionsArgs{ +// _, err = auth0.NewTriggerActions(ctx, "login_flow", &auth0.TriggerActionsArgs{ // Trigger: pulumi.String("post-login"), // Actions: auth0.TriggerActionsActionArray{ // &auth0.TriggerActionsActionArgs{ diff --git a/sdk/go/auth0/user.go b/sdk/go/auth0/user.go index b30e0492..2e66180c 100644 --- a/sdk/go/auth0/user.go +++ b/sdk/go/auth0/user.go @@ -31,13 +31,14 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := auth0.NewUser(ctx, "user", &auth0.UserArgs{ // ConnectionName: pulumi.String("Username-Password-Authentication"), +// UserId: pulumi.String("12345"), +// Username: pulumi.String("unique_username"), +// Name: pulumi.String("Firstname Lastname"), +// Nickname: pulumi.String("some.nickname"), // Email: pulumi.String("test@test.com"), // EmailVerified: pulumi.Bool(true), -// Nickname: pulumi.String("some.nickname"), // Password: pulumi.String("passpass$12$12"), // Picture: pulumi.String("https://www.example.com/a-valid-picture-url.jpg"), -// UserId: pulumi.String("12345"), -// Username: pulumi.String("unique_username"), // }) // if err != nil { // return err diff --git a/sdk/go/auth0/userRole.go b/sdk/go/auth0/userRole.go index 8a772843..f8caefbd 100644 --- a/sdk/go/auth0/userRole.go +++ b/sdk/go/auth0/userRole.go @@ -35,6 +35,7 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // // Example: // admin, err := auth0.NewRole(ctx, "admin", &auth0.RoleArgs{ +// Name: pulumi.String("admin"), // Description: pulumi.String("Administrator"), // }) // if err != nil { @@ -43,13 +44,14 @@ import ( // user, err := auth0.NewUser(ctx, "user", &auth0.UserArgs{ // ConnectionName: pulumi.String("Username-Password-Authentication"), // Username: pulumi.String("unique_username"), +// Name: pulumi.String("Firstname Lastname"), // Email: pulumi.String("test@test.com"), // Password: pulumi.String("passpass$12$12"), // }) // if err != nil { // return err // } -// _, err = auth0.NewUserRole(ctx, "userRoles", &auth0.UserRoleArgs{ +// _, err = auth0.NewUserRole(ctx, "user_roles", &auth0.UserRoleArgs{ // UserId: user.ID(), // RoleId: admin.ID(), // }) diff --git a/sdk/go/auth0/userRoles.go b/sdk/go/auth0/userRoles.go index 0a9ae297..1f610e40 100644 --- a/sdk/go/auth0/userRoles.go +++ b/sdk/go/auth0/userRoles.go @@ -35,6 +35,7 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // // Example: // admin, err := auth0.NewRole(ctx, "admin", &auth0.RoleArgs{ +// Name: pulumi.String("admin"), // Description: pulumi.String("Administrator"), // }) // if err != nil { @@ -43,13 +44,14 @@ import ( // user, err := auth0.NewUser(ctx, "user", &auth0.UserArgs{ // ConnectionName: pulumi.String("Username-Password-Authentication"), // Username: pulumi.String("unique_username"), +// Name: pulumi.String("Firstname Lastname"), // Email: pulumi.String("test@test.com"), // Password: pulumi.String("passpass$12$12"), // }) // if err != nil { // return err // } -// _, err = auth0.NewUserRoles(ctx, "userRoles", &auth0.UserRolesArgs{ +// _, err = auth0.NewUserRoles(ctx, "user_roles", &auth0.UserRolesArgs{ // UserId: user.ID(), // Roles: pulumi.StringArray{ // admin.ID(), diff --git a/sdk/java/src/main/java/com/pulumi/auth0/AttackProtection.java b/sdk/java/src/main/java/com/pulumi/auth0/AttackProtection.java index 58e13696..b8e7fd6f 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/AttackProtection.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/AttackProtection.java @@ -29,12 +29,12 @@ * import com.pulumi.core.Output; * import com.pulumi.auth0.AttackProtection; * import com.pulumi.auth0.AttackProtectionArgs; - * import com.pulumi.auth0.inputs.AttackProtectionBreachedPasswordDetectionArgs; - * import com.pulumi.auth0.inputs.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs; - * import com.pulumi.auth0.inputs.AttackProtectionBruteForceProtectionArgs; * import com.pulumi.auth0.inputs.AttackProtectionSuspiciousIpThrottlingArgs; * import com.pulumi.auth0.inputs.AttackProtectionSuspiciousIpThrottlingPreLoginArgs; * import com.pulumi.auth0.inputs.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs; + * import com.pulumi.auth0.inputs.AttackProtectionBruteForceProtectionArgs; + * import com.pulumi.auth0.inputs.AttackProtectionBreachedPasswordDetectionArgs; + * import com.pulumi.auth0.inputs.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -49,16 +49,20 @@ * * public static void stack(Context ctx) { * var myProtection = new AttackProtection("myProtection", AttackProtectionArgs.builder() - * .breachedPasswordDetection(AttackProtectionBreachedPasswordDetectionArgs.builder() - * .adminNotificationFrequencies("daily") + * .suspiciousIpThrottling(AttackProtectionSuspiciousIpThrottlingArgs.builder() * .enabled(true) - * .method("standard") - * .preUserRegistration(AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs.builder() - * .shields("block") - * .build()) * .shields( * "admin_notification", * "block") + * .allowlists("192.168.1.1") + * .preLogin(AttackProtectionSuspiciousIpThrottlingPreLoginArgs.builder() + * .maxAttempts(100) + * .rate(864000) + * .build()) + * .preUserRegistration(AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs.builder() + * .maxAttempts(50) + * .rate(1200) + * .build()) * .build()) * .bruteForceProtection(AttackProtectionBruteForceProtectionArgs.builder() * .allowlists("127.0.0.1") @@ -69,20 +73,16 @@ * "block", * "user_notification") * .build()) - * .suspiciousIpThrottling(AttackProtectionSuspiciousIpThrottlingArgs.builder() - * .allowlists("192.168.1.1") + * .breachedPasswordDetection(AttackProtectionBreachedPasswordDetectionArgs.builder() + * .adminNotificationFrequencies("daily") * .enabled(true) - * .preLogin(AttackProtectionSuspiciousIpThrottlingPreLoginArgs.builder() - * .maxAttempts(100) - * .rate(864000) - * .build()) - * .preUserRegistration(AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs.builder() - * .maxAttempts(50) - * .rate(1200) - * .build()) + * .method("standard") * .shields( * "admin_notification", * "block") + * .preUserRegistration(AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs.builder() + * .shields("block") + * .build()) * .build()) * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Auth0Functions.java b/sdk/java/src/main/java/com/pulumi/auth0/Auth0Functions.java index 3de682bc..4fc39c69 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Auth0Functions.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Auth0Functions.java @@ -730,10 +730,12 @@ public static CompletableFuture getBrandingThemePlain(In * } * * public static void stack(Context ctx) { + * // An Auth0 Client loaded using its name. * final var some-client-by-name = Auth0Functions.getClient(GetClientArgs.builder() * .name("Name of my Application") * .build()); * + * // An Auth0 Client loaded using its ID. * final var some-client-by-id = Auth0Functions.getClient(GetClientArgs.builder() * .clientId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -774,10 +776,12 @@ public static Output getClient() { * } * * public static void stack(Context ctx) { + * // An Auth0 Client loaded using its name. * final var some-client-by-name = Auth0Functions.getClient(GetClientArgs.builder() * .name("Name of my Application") * .build()); * + * // An Auth0 Client loaded using its ID. * final var some-client-by-id = Auth0Functions.getClient(GetClientArgs.builder() * .clientId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -818,10 +822,12 @@ public static CompletableFuture getClientPlain() { * } * * public static void stack(Context ctx) { + * // An Auth0 Client loaded using its name. * final var some-client-by-name = Auth0Functions.getClient(GetClientArgs.builder() * .name("Name of my Application") * .build()); * + * // An Auth0 Client loaded using its ID. * final var some-client-by-id = Auth0Functions.getClient(GetClientArgs.builder() * .clientId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -862,10 +868,12 @@ public static Output getClient(GetClientArgs args) { * } * * public static void stack(Context ctx) { + * // An Auth0 Client loaded using its name. * final var some-client-by-name = Auth0Functions.getClient(GetClientArgs.builder() * .name("Name of my Application") * .build()); * + * // An Auth0 Client loaded using its ID. * final var some-client-by-id = Auth0Functions.getClient(GetClientArgs.builder() * .clientId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -906,10 +914,12 @@ public static CompletableFuture getClientPlain(GetClientPlainAr * } * * public static void stack(Context ctx) { + * // An Auth0 Client loaded using its name. * final var some-client-by-name = Auth0Functions.getClient(GetClientArgs.builder() * .name("Name of my Application") * .build()); * + * // An Auth0 Client loaded using its ID. * final var some-client-by-id = Auth0Functions.getClient(GetClientArgs.builder() * .clientId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -950,10 +960,12 @@ public static Output getClient(GetClientArgs args, InvokeOption * } * * public static void stack(Context ctx) { + * // An Auth0 Client loaded using its name. * final var some-client-by-name = Auth0Functions.getClient(GetClientArgs.builder() * .name("Name of my Application") * .build()); * + * // An Auth0 Client loaded using its ID. * final var some-client-by-id = Auth0Functions.getClient(GetClientArgs.builder() * .clientId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -994,10 +1006,12 @@ public static CompletableFuture getClientPlain(GetClientPlainAr * } * * public static void stack(Context ctx) { + * // An Auth0 Connection loaded using its name. * final var some-connection-by-name = Auth0Functions.getConnection(GetConnectionArgs.builder() * .name("Acceptance-Test-Connection-{{.testName}}") * .build()); * + * // An Auth0 Connection loaded using its ID. * final var some-connection-by-id = Auth0Functions.getConnection(GetConnectionArgs.builder() * .connectionId("con_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1038,10 +1052,12 @@ public static Output getConnection() { * } * * public static void stack(Context ctx) { + * // An Auth0 Connection loaded using its name. * final var some-connection-by-name = Auth0Functions.getConnection(GetConnectionArgs.builder() * .name("Acceptance-Test-Connection-{{.testName}}") * .build()); * + * // An Auth0 Connection loaded using its ID. * final var some-connection-by-id = Auth0Functions.getConnection(GetConnectionArgs.builder() * .connectionId("con_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1082,10 +1098,12 @@ public static CompletableFuture getConnectionPlain() { * } * * public static void stack(Context ctx) { + * // An Auth0 Connection loaded using its name. * final var some-connection-by-name = Auth0Functions.getConnection(GetConnectionArgs.builder() * .name("Acceptance-Test-Connection-{{.testName}}") * .build()); * + * // An Auth0 Connection loaded using its ID. * final var some-connection-by-id = Auth0Functions.getConnection(GetConnectionArgs.builder() * .connectionId("con_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1126,10 +1144,12 @@ public static Output getConnection(GetConnectionArgs args) * } * * public static void stack(Context ctx) { + * // An Auth0 Connection loaded using its name. * final var some-connection-by-name = Auth0Functions.getConnection(GetConnectionArgs.builder() * .name("Acceptance-Test-Connection-{{.testName}}") * .build()); * + * // An Auth0 Connection loaded using its ID. * final var some-connection-by-id = Auth0Functions.getConnection(GetConnectionArgs.builder() * .connectionId("con_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1170,10 +1190,12 @@ public static CompletableFuture getConnectionPlain(GetConne * } * * public static void stack(Context ctx) { + * // An Auth0 Connection loaded using its name. * final var some-connection-by-name = Auth0Functions.getConnection(GetConnectionArgs.builder() * .name("Acceptance-Test-Connection-{{.testName}}") * .build()); * + * // An Auth0 Connection loaded using its ID. * final var some-connection-by-id = Auth0Functions.getConnection(GetConnectionArgs.builder() * .connectionId("con_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1214,10 +1236,12 @@ public static Output getConnection(GetConnectionArgs args, * } * * public static void stack(Context ctx) { + * // An Auth0 Connection loaded using its name. * final var some-connection-by-name = Auth0Functions.getConnection(GetConnectionArgs.builder() * .name("Acceptance-Test-Connection-{{.testName}}") * .build()); * + * // An Auth0 Connection loaded using its ID. * final var some-connection-by-id = Auth0Functions.getConnection(GetConnectionArgs.builder() * .connectionId("con_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1300,10 +1324,12 @@ public static CompletableFuture getCustomDomainPlain(Invo * } * * public static void stack(Context ctx) { + * // An Auth0 Organization loaded using its name. * final var some-organization-by-name = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .name("my-org") * .build()); * + * // An Auth0 Organization loaded using its ID. * final var some-organization-by-id = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .organizationId("org_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1344,10 +1370,12 @@ public static Output getOrganization() { * } * * public static void stack(Context ctx) { + * // An Auth0 Organization loaded using its name. * final var some-organization-by-name = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .name("my-org") * .build()); * + * // An Auth0 Organization loaded using its ID. * final var some-organization-by-id = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .organizationId("org_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1388,10 +1416,12 @@ public static CompletableFuture getOrganizationPlain() { * } * * public static void stack(Context ctx) { + * // An Auth0 Organization loaded using its name. * final var some-organization-by-name = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .name("my-org") * .build()); * + * // An Auth0 Organization loaded using its ID. * final var some-organization-by-id = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .organizationId("org_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1432,10 +1462,12 @@ public static Output getOrganization(GetOrganizationArgs * } * * public static void stack(Context ctx) { + * // An Auth0 Organization loaded using its name. * final var some-organization-by-name = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .name("my-org") * .build()); * + * // An Auth0 Organization loaded using its ID. * final var some-organization-by-id = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .organizationId("org_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1476,10 +1508,12 @@ public static CompletableFuture getOrganizationPlain(GetO * } * * public static void stack(Context ctx) { + * // An Auth0 Organization loaded using its name. * final var some-organization-by-name = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .name("my-org") * .build()); * + * // An Auth0 Organization loaded using its ID. * final var some-organization-by-id = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .organizationId("org_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1520,10 +1554,12 @@ public static Output getOrganization(GetOrganizationArgs * } * * public static void stack(Context ctx) { + * // An Auth0 Organization loaded using its name. * final var some-organization-by-name = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .name("my-org") * .build()); * + * // An Auth0 Organization loaded using its ID. * final var some-organization-by-id = Auth0Functions.getOrganization(GetOrganizationArgs.builder() * .organizationId("org_abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1786,10 +1822,12 @@ public static CompletableFuture getPagesPlain(InvokeArgs args, I * } * * public static void stack(Context ctx) { + * // An Auth0 Resource Server loaded using its identifier. * final var some-resource-server-by-identifier = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .identifier("https://my-api.com/v1") * .build()); * + * // An Auth0 Resource Server loaded using its ID. * final var some-resource-server-by-id = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .resourceServerId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1830,10 +1868,12 @@ public static Output getResourceServer() { * } * * public static void stack(Context ctx) { + * // An Auth0 Resource Server loaded using its identifier. * final var some-resource-server-by-identifier = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .identifier("https://my-api.com/v1") * .build()); * + * // An Auth0 Resource Server loaded using its ID. * final var some-resource-server-by-id = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .resourceServerId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1874,10 +1914,12 @@ public static CompletableFuture getResourceServerPlain( * } * * public static void stack(Context ctx) { + * // An Auth0 Resource Server loaded using its identifier. * final var some-resource-server-by-identifier = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .identifier("https://my-api.com/v1") * .build()); * + * // An Auth0 Resource Server loaded using its ID. * final var some-resource-server-by-id = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .resourceServerId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1918,10 +1960,12 @@ public static Output getResourceServer(GetResourceServe * } * * public static void stack(Context ctx) { + * // An Auth0 Resource Server loaded using its identifier. * final var some-resource-server-by-identifier = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .identifier("https://my-api.com/v1") * .build()); * + * // An Auth0 Resource Server loaded using its ID. * final var some-resource-server-by-id = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .resourceServerId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -1962,10 +2006,12 @@ public static CompletableFuture getResourceServerPlain( * } * * public static void stack(Context ctx) { + * // An Auth0 Resource Server loaded using its identifier. * final var some-resource-server-by-identifier = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .identifier("https://my-api.com/v1") * .build()); * + * // An Auth0 Resource Server loaded using its ID. * final var some-resource-server-by-id = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .resourceServerId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2006,10 +2052,12 @@ public static Output getResourceServer(GetResourceServe * } * * public static void stack(Context ctx) { + * // An Auth0 Resource Server loaded using its identifier. * final var some-resource-server-by-identifier = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .identifier("https://my-api.com/v1") * .build()); * + * // An Auth0 Resource Server loaded using its ID. * final var some-resource-server-by-id = Auth0Functions.getResourceServer(GetResourceServerArgs.builder() * .resourceServerId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2050,10 +2098,12 @@ public static CompletableFuture getResourceServerPlain( * } * * public static void stack(Context ctx) { + * // An Auth0 Role loaded using its name. * final var some-role-by-name = Auth0Functions.getRole(GetRoleArgs.builder() * .name("my-role") * .build()); * + * // An Auth0 Role loaded using its ID. * final var some-role-by-id = Auth0Functions.getRole(GetRoleArgs.builder() * .roleId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2094,10 +2144,12 @@ public static Output getRole() { * } * * public static void stack(Context ctx) { + * // An Auth0 Role loaded using its name. * final var some-role-by-name = Auth0Functions.getRole(GetRoleArgs.builder() * .name("my-role") * .build()); * + * // An Auth0 Role loaded using its ID. * final var some-role-by-id = Auth0Functions.getRole(GetRoleArgs.builder() * .roleId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2138,10 +2190,12 @@ public static CompletableFuture getRolePlain() { * } * * public static void stack(Context ctx) { + * // An Auth0 Role loaded using its name. * final var some-role-by-name = Auth0Functions.getRole(GetRoleArgs.builder() * .name("my-role") * .build()); * + * // An Auth0 Role loaded using its ID. * final var some-role-by-id = Auth0Functions.getRole(GetRoleArgs.builder() * .roleId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2182,10 +2236,12 @@ public static Output getRole(GetRoleArgs args) { * } * * public static void stack(Context ctx) { + * // An Auth0 Role loaded using its name. * final var some-role-by-name = Auth0Functions.getRole(GetRoleArgs.builder() * .name("my-role") * .build()); * + * // An Auth0 Role loaded using its ID. * final var some-role-by-id = Auth0Functions.getRole(GetRoleArgs.builder() * .roleId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2226,10 +2282,12 @@ public static CompletableFuture getRolePlain(GetRolePlainArgs arg * } * * public static void stack(Context ctx) { + * // An Auth0 Role loaded using its name. * final var some-role-by-name = Auth0Functions.getRole(GetRoleArgs.builder() * .name("my-role") * .build()); * + * // An Auth0 Role loaded using its ID. * final var some-role-by-id = Auth0Functions.getRole(GetRoleArgs.builder() * .roleId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2270,10 +2328,12 @@ public static Output getRole(GetRoleArgs args, InvokeOptions opti * } * * public static void stack(Context ctx) { + * // An Auth0 Role loaded using its name. * final var some-role-by-name = Auth0Functions.getRole(GetRoleArgs.builder() * .name("my-role") * .build()); * + * // An Auth0 Role loaded using its ID. * final var some-role-by-id = Auth0Functions.getRole(GetRoleArgs.builder() * .roleId("abcdefghkijklmnopqrstuvwxyz0123456789") * .build()); @@ -2578,6 +2638,7 @@ public static CompletableFuture getTenantPlain(InvokeArgs args, * } * * public static void stack(Context ctx) { + * // An Auth0 User loaded using its ID. * final var myUser = Auth0Functions.getUser(GetUserArgs.builder() * .userId("auth0|34fdr23fdsfdfsf") * .build()); @@ -2618,6 +2679,7 @@ public static Output getUser(GetUserArgs args) { * } * * public static void stack(Context ctx) { + * // An Auth0 User loaded using its ID. * final var myUser = Auth0Functions.getUser(GetUserArgs.builder() * .userId("auth0|34fdr23fdsfdfsf") * .build()); @@ -2658,6 +2720,7 @@ public static CompletableFuture getUserPlain(GetUserPlainArgs arg * } * * public static void stack(Context ctx) { + * // An Auth0 User loaded using its ID. * final var myUser = Auth0Functions.getUser(GetUserArgs.builder() * .userId("auth0|34fdr23fdsfdfsf") * .build()); @@ -2698,6 +2761,7 @@ public static Output getUser(GetUserArgs args, InvokeOptions opti * } * * public static void stack(Context ctx) { + * // An Auth0 User loaded using its ID. * final var myUser = Auth0Functions.getUser(GetUserArgs.builder() * .userId("auth0|34fdr23fdsfdfsf") * .build()); diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Branding.java b/sdk/java/src/main/java/com/pulumi/auth0/Branding.java index f4c2c63e..2587c09c 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Branding.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Branding.java @@ -20,48 +20,6 @@ /** * This resource allows you to manage branding within your Auth0 tenant. Auth0 can be customized with a look and feel that aligns with your organization's brand requirements and user expectations. * - * ## Example Usage - * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.auth0.Branding; - * import com.pulumi.auth0.BrandingArgs; - * import com.pulumi.auth0.inputs.BrandingColorsArgs; - * import com.pulumi.auth0.inputs.BrandingUniversalLoginArgs; - * import java.util.List; - * import java.util.ArrayList; - * import java.util.Map; - * import java.io.File; - * import java.nio.file.Files; - * import java.nio.file.Paths; - * - * public class App { - * public static void main(String[] args) { - * Pulumi.run(App::stack); - * } - * - * public static void stack(Context ctx) { - * var myBrand = new Branding("myBrand", BrandingArgs.builder() - * .logoUrl("https://mycompany.org/logo.png") - * .colors(BrandingColorsArgs.builder() - * .primary("#0059d6") - * .pageBackground("#000000") - * .build()) - * .universalLogin(BrandingUniversalLoginArgs.builder() - * .body(Files.readString(Paths.get("universal_login_body.html"))) - * .build()) - * .build()); - * - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * ## Import * * As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/java/src/main/java/com/pulumi/auth0/BrandingTheme.java b/sdk/java/src/main/java/com/pulumi/auth0/BrandingTheme.java index cbd88393..9390a68e 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/BrandingTheme.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/BrandingTheme.java @@ -22,120 +22,6 @@ /** * This resource allows you to manage branding themes for your Universal Login page within your Auth0 tenant. * - * ## Example Usage - * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.auth0.BrandingTheme; - * import com.pulumi.auth0.BrandingThemeArgs; - * import com.pulumi.auth0.inputs.BrandingThemeBordersArgs; - * import com.pulumi.auth0.inputs.BrandingThemeColorsArgs; - * import com.pulumi.auth0.inputs.BrandingThemeFontsArgs; - * import com.pulumi.auth0.inputs.BrandingThemeFontsBodyTextArgs; - * import com.pulumi.auth0.inputs.BrandingThemeFontsButtonsTextArgs; - * import com.pulumi.auth0.inputs.BrandingThemeFontsInputLabelsArgs; - * import com.pulumi.auth0.inputs.BrandingThemeFontsLinksArgs; - * import com.pulumi.auth0.inputs.BrandingThemeFontsSubtitleArgs; - * import com.pulumi.auth0.inputs.BrandingThemeFontsTitleArgs; - * import com.pulumi.auth0.inputs.BrandingThemePageBackgroundArgs; - * import com.pulumi.auth0.inputs.BrandingThemeWidgetArgs; - * import java.util.List; - * import java.util.ArrayList; - * import java.util.Map; - * import java.io.File; - * import java.nio.file.Files; - * import java.nio.file.Paths; - * - * public class App { - * public static void main(String[] args) { - * Pulumi.run(App::stack); - * } - * - * public static void stack(Context ctx) { - * // An example of a fully configured auth0_branding_theme. - * var myTheme = new BrandingTheme("myTheme", BrandingThemeArgs.builder() - * .borders(BrandingThemeBordersArgs.builder() - * .buttonBorderRadius(1) - * .buttonBorderWeight(1) - * .buttonsStyle("pill") - * .inputBorderRadius(3) - * .inputBorderWeight(1) - * .inputsStyle("pill") - * .showWidgetShadow(false) - * .widgetBorderWeight(1) - * .widgetCornerRadius(3) - * .build()) - * .colors(BrandingThemeColorsArgs.builder() - * .bodyText("#FF00CC") - * .error("#FF00CC") - * .header("#FF00CC") - * .icons("#FF00CC") - * .inputBackground("#FF00CC") - * .inputBorder("#FF00CC") - * .inputFilledText("#FF00CC") - * .inputLabelsPlaceholders("#FF00CC") - * .linksFocusedComponents("#FF00CC") - * .primaryButton("#FF00CC") - * .primaryButtonLabel("#FF00CC") - * .secondaryButtonBorder("#FF00CC") - * .secondaryButtonLabel("#FF00CC") - * .success("#FF00CC") - * .widgetBackground("#FF00CC") - * .widgetBorder("#FF00CC") - * .build()) - * .fonts(BrandingThemeFontsArgs.builder() - * .bodyText(BrandingThemeFontsBodyTextArgs.builder() - * .bold(false) - * .size(100) - * .build()) - * .buttonsText(BrandingThemeFontsButtonsTextArgs.builder() - * .bold(false) - * .size(100) - * .build()) - * .fontUrl("https://google.com/font.woff") - * .inputLabels(BrandingThemeFontsInputLabelsArgs.builder() - * .bold(false) - * .size(100) - * .build()) - * .links(BrandingThemeFontsLinksArgs.builder() - * .bold(false) - * .size(100) - * .build()) - * .linksStyle("normal") - * .referenceTextSize(12) - * .subtitle(BrandingThemeFontsSubtitleArgs.builder() - * .bold(false) - * .size(100) - * .build()) - * .title(BrandingThemeFontsTitleArgs.builder() - * .bold(false) - * .size(100) - * .build()) - * .build()) - * .pageBackground(BrandingThemePageBackgroundArgs.builder() - * .backgroundColor("#000000") - * .backgroundImageUrl("https://google.com/background.png") - * .pageLayout("center") - * .build()) - * .widget(BrandingThemeWidgetArgs.builder() - * .headerTextAlignment("center") - * .logoHeight(55) - * .logoPosition("center") - * .logoUrl("https://google.com/logo.png") - * .socialButtonsLayout("top") - * .build()) - * .build()); - * - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * ## Import * * This resource can be imported by specifying the Branding Theme ID. diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Client.java b/sdk/java/src/main/java/com/pulumi/auth0/Client.java index ea547546..20a5fc52 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Client.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Client.java @@ -37,12 +37,12 @@ * import com.pulumi.core.Output; * import com.pulumi.auth0.Client; * import com.pulumi.auth0.ClientArgs; - * import com.pulumi.auth0.inputs.ClientAddonsArgs; - * import com.pulumi.auth0.inputs.ClientAddonsSamlpArgs; * import com.pulumi.auth0.inputs.ClientJwtConfigurationArgs; + * import com.pulumi.auth0.inputs.ClientRefreshTokenArgs; * import com.pulumi.auth0.inputs.ClientMobileArgs; * import com.pulumi.auth0.inputs.ClientMobileIosArgs; - * import com.pulumi.auth0.inputs.ClientRefreshTokenArgs; + * import com.pulumi.auth0.inputs.ClientAddonsArgs; + * import com.pulumi.auth0.inputs.ClientAddonsSamlpArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -57,64 +57,64 @@ * * public static void stack(Context ctx) { * var myClient = new Client("myClient", ClientArgs.builder() - * .addons(ClientAddonsArgs.builder() - * .samlp(ClientAddonsSamlpArgs.builder() - * .audience("https://example.com/saml") - * .createUpnClaim(false) - * .issuer("https://example.com") - * .mapIdentities(false) - * .mapUnknownClaimsAsIs(false) - * .mappings(Map.ofEntries( - * Map.entry("email", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), - * Map.entry("name", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name") - * )) - * .nameIdentifierFormat("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent") - * .nameIdentifierProbes("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress") - * .passthroughClaimsWithNoMapping(false) - * .signingCert(""" - * -----BEGIN PUBLIC KEY----- - * MIGf...bpP/t3 - * +JGNGIRMj1hF1rnb6QIDAQAB - * -----END PUBLIC KEY----- - * - * """) - * .build()) - * .build()) - * .allowedLogoutUrls("https://example.com") - * .allowedOrigins("https://example.com") + * .name("Application - Acceptance Test") + * .description("Test Applications Long Description") * .appType("non_interactive") - * .callbacks("https://example.com/callback") - * .clientMetadata(Map.of("foo", "zoo")) * .customLoginPageOn(true) - * .description("Test Applications Long Description") + * .isFirstParty(true) + * .isTokenEndpointIpHeaderTrusted(true) + * .oidcConformant(false) + * .callbacks("https://example.com/callback") + * .allowedOrigins("https://example.com") + * .allowedLogoutUrls("https://example.com") + * .webOrigins("https://example.com") * .grantTypes( * "authorization_code", * "http://auth0.com/oauth/grant-type/password-realm", * "implicit", * "password", * "refresh_token") - * .isFirstParty(true) - * .isTokenEndpointIpHeaderTrusted(true) + * .clientMetadata(Map.of("foo", "zoo")) * .jwtConfiguration(ClientJwtConfigurationArgs.builder() - * .alg("RS256") * .lifetimeInSeconds(300) - * .scopes(Map.of("foo", "bar")) * .secretEncoded(true) + * .alg("RS256") + * .scopes(Map.of("foo", "bar")) + * .build()) + * .refreshToken(ClientRefreshTokenArgs.builder() + * .leeway(0) + * .tokenLifetime(2592000) + * .rotationType("rotating") + * .expirationType("expiring") * .build()) * .mobile(ClientMobileArgs.builder() * .ios(ClientMobileIosArgs.builder() - * .appBundleIdentifier("com.my.bundle.id") * .teamId("9JA89QQLNQ") + * .appBundleIdentifier("com.my.bundle.id") * .build()) * .build()) - * .oidcConformant(false) - * .refreshToken(ClientRefreshTokenArgs.builder() - * .expirationType("expiring") - * .leeway(0) - * .rotationType("rotating") - * .tokenLifetime(2592000) + * .addons(ClientAddonsArgs.builder() + * .samlp(ClientAddonsSamlpArgs.builder() + * .audience("https://example.com/saml") + * .issuer("https://example.com") + * .mappings(Map.ofEntries( + * Map.entry("email", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"), + * Map.entry("name", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name") + * )) + * .createUpnClaim(false) + * .passthroughClaimsWithNoMapping(false) + * .mapUnknownClaimsAsIs(false) + * .mapIdentities(false) + * .nameIdentifierFormat("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent") + * .nameIdentifierProbes("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress") + * .signingCert(""" + * -----BEGIN PUBLIC KEY----- + * MIGf...bpP/t3 + * +JGNGIRMj1hF1rnb6QIDAQAB + * -----END PUBLIC KEY----- + * """) + * .build()) * .build()) - * .webOrigins("https://example.com") * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/ClientCredentials.java b/sdk/java/src/main/java/com/pulumi/auth0/ClientCredentials.java index cc24e621..1f8e5c98 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/ClientCredentials.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/ClientCredentials.java @@ -22,90 +22,6 @@ * > Refer to the client secret rotation guide * for instructions on how to rotate client secrets with zero downtime. * - * ## Example Usage - * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.auth0.Client; - * import com.pulumi.auth0.ClientArgs; - * import com.pulumi.auth0.inputs.ClientJwtConfigurationArgs; - * import com.pulumi.auth0.ClientCredentials; - * import com.pulumi.auth0.ClientCredentialsArgs; - * import com.pulumi.auth0.inputs.ClientCredentialsPrivateKeyJwtArgs; - * import java.util.List; - * import java.util.ArrayList; - * import java.util.Map; - * import java.io.File; - * import java.nio.file.Files; - * import java.nio.file.Paths; - * - * public class App { - * public static void main(String[] args) { - * Pulumi.run(App::stack); - * } - * - * public static void stack(Context ctx) { - * var myClient = new Client("myClient", ClientArgs.builder() - * .appType("non_interactive") - * .jwtConfiguration(ClientJwtConfigurationArgs.builder() - * .alg("RS256") - * .build()) - * .build()); - * - * // Configuring client_secret_post as an authentication method. - * var testClientCredentials = new ClientCredentials("testClientCredentials", ClientCredentialsArgs.builder() - * .clientId(myClient.id()) - * .authenticationMethod("client_secret_post") - * .build()); - * - * // Configuring client_secret_basic as an authentication method. - * var testIndex_clientCredentialsClientCredentials = new ClientCredentials("testIndex/clientCredentialsClientCredentials", ClientCredentialsArgs.builder() - * .clientId(myClient.id()) - * .authenticationMethod("client_secret_basic") - * .build()); - * - * // Configuring none as an authentication method. - * var testAuth0Index_clientCredentialsClientCredentials = new ClientCredentials("testAuth0Index/clientCredentialsClientCredentials", ClientCredentialsArgs.builder() - * .clientId(myClient.id()) - * .authenticationMethod("none") - * .build()); - * - * // Configuring private_key_jwt as an authentication method. - * var testAuth0Index_clientCredentialsClientCredentials1 = new ClientCredentials("testAuth0Index/clientCredentialsClientCredentials1", ClientCredentialsArgs.builder() - * .clientId(myClient.id()) - * .authenticationMethod("private_key_jwt") - * .privateKeyJwt(ClientCredentialsPrivateKeyJwtArgs.builder() - * .credentials(ClientCredentialsPrivateKeyJwtCredentialArgs.builder() - * .name("Testing Credentials 1") - * .credentialType("public_key") - * .algorithm("RS256") - * .parseExpiryFromCert(true) - * .pem(""" - * -----BEGIN CERTIFICATE----- - * MIIFWDCCA0ACCQDXqpBo3R...G9w0BAQsFADBuMQswCQYDVQQGEwJl - * -----END CERTIFICATE----- - * """) - * .build()) - * .build()) - * .build()); - * - * // Configuring the client_secret. - * var testAuth0Index_clientCredentialsClientCredentials2 = new ClientCredentials("testAuth0Index/clientCredentialsClientCredentials2", ClientCredentialsArgs.builder() - * .clientId(myClient.id()) - * .authenticationMethod("client_secret_basic") - * .clientSecret("LUFqPx+sRLjbL7peYRPFmFu-bbvE7u7og4YUNe_C345=683341") - * .build()); - * - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * ## Import * * This resource can be imported by specifying the client ID. diff --git a/sdk/java/src/main/java/com/pulumi/auth0/ClientGrant.java b/sdk/java/src/main/java/com/pulumi/auth0/ClientGrant.java index 0b727c00..a38e1f25 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/ClientGrant.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/ClientGrant.java @@ -27,6 +27,7 @@ * import com.pulumi.Pulumi; * import com.pulumi.core.Output; * import com.pulumi.auth0.Client; + * import com.pulumi.auth0.ClientArgs; * import com.pulumi.auth0.ResourceServer; * import com.pulumi.auth0.ResourceServerArgs; * import com.pulumi.auth0.ClientGrant; @@ -45,9 +46,12 @@ * * public static void stack(Context ctx) { * // The following example grants a client the "create:foo" and "create:bar" permissions (scopes). - * var myClient = new Client("myClient"); + * var myClient = new Client("myClient", ClientArgs.builder() + * .name("Example Application - Client Grant (Managed by Terraform)") + * .build()); * * var myResourceServer = new ResourceServer("myResourceServer", ResourceServerArgs.builder() + * .name("Example Resource Server - Client Grant (Managed by Terraform)") * .identifier("https://api.example.com/client-grant") * .scopes( * %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference), diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Connection.java b/sdk/java/src/main/java/com/pulumi/auth0/Connection.java index 3513ddd2..fb525cbe 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Connection.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Connection.java @@ -26,6 +26,104 @@ * * ## Example Usage * + * ### Auth0 Connection + * + * <!--Start PulumiCodeChooser --> + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.auth0.Connection; + * import com.pulumi.auth0.ConnectionArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsPasswordNoPersonalInfoArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsPasswordDictionaryArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsPasswordComplexityOptionsArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsValidationArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsValidationUsernameArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsMfaArgs; + * import static com.pulumi.codegen.internal.Serialization.*; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * // This is an example of an Auth0 connection. + * var myConnection = new Connection("myConnection", ConnectionArgs.builder() + * .name("Example-Connection") + * .isDomainConnection(true) + * .strategy("auth0") + * .metadata(Map.ofEntries( + * Map.entry("key1", "foo"), + * Map.entry("key2", "bar") + * )) + * .options(ConnectionOptionsArgs.builder() + * .passwordPolicy("excellent") + * .bruteForceProtection(true) + * .enabledDatabaseCustomization(true) + * .importMode(false) + * .requiresUsername(true) + * .disableSignup(false) + * .customScripts(Map.of("get_user", """ + * function getByEmail(email, callback) { + * return callback(new Error("Whoops!")); + * } + * """)) + * .configuration(Map.ofEntries( + * Map.entry("foo", "bar"), + * Map.entry("bar", "baz") + * )) + * .upstreamParams(serializeJson( + * jsonObject( + * jsonProperty("screen_name", jsonObject( + * jsonProperty("alias", "login_hint") + * )) + * ))) + * .passwordHistories(ConnectionOptionsPasswordHistoryArgs.builder() + * .enable(true) + * .size(3) + * .build()) + * .passwordNoPersonalInfo(ConnectionOptionsPasswordNoPersonalInfoArgs.builder() + * .enable(true) + * .build()) + * .passwordDictionary(ConnectionOptionsPasswordDictionaryArgs.builder() + * .enable(true) + * .dictionaries( + * "password", + * "admin", + * "1234") + * .build()) + * .passwordComplexityOptions(ConnectionOptionsPasswordComplexityOptionsArgs.builder() + * .minLength(12) + * .build()) + * .validation(ConnectionOptionsValidationArgs.builder() + * .username(ConnectionOptionsValidationUsernameArgs.builder() + * .min(10) + * .max(40) + * .build()) + * .build()) + * .mfa(ConnectionOptionsMfaArgs.builder() + * .active(true) + * .returnEnrollSettings(true) + * .build()) + * .build()) + * .build()); + * + * } + * } + * ``` + * <!--End PulumiCodeChooser --> + * * ### Google OAuth2 Connection * * > Your Auth0 account may be pre-configured with a `google-oauth2` connection. @@ -53,24 +151,88 @@ * } * * public static void stack(Context ctx) { + * // This is an example of a Google OAuth2 connection. * var googleOauth2 = new Connection("googleOauth2", ConnectionArgs.builder() + * .name("Google-OAuth2-Connection") + * .strategy("google-oauth2") * .options(ConnectionOptionsArgs.builder() + * .clientId("<client-id>") + * .clientSecret("<client-secret>") * .allowedAudiences( * "example.com", * "api.example.com") - * .clientId("<client-id>") - * .clientSecret("<client-secret>") - * .nonPersistentAttrs( - * "ethnicity", - * "gender") * .scopes( * "email", * "profile", * "gmail", * "youtube") * .setUserRootAttributes("on_each_login") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") + * .build()) + * .build()); + * + * } + * } + * ``` + * <!--End PulumiCodeChooser --> + * + * ### Google Apps + * + * <!--Start PulumiCodeChooser --> + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.auth0.Connection; + * import com.pulumi.auth0.ConnectionArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsArgs; + * import static com.pulumi.codegen.internal.Serialization.*; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var googleApps = new Connection("googleApps", ConnectionArgs.builder() + * .name("connection-google-apps") + * .isDomainConnection(false) + * .strategy("google-apps") + * .showAsButton(false) + * .options(ConnectionOptionsArgs.builder() + * .clientId("") + * .clientSecret("") + * .domain("example.com") + * .tenantDomain("example.com") + * .domainAliases( + * "example.com", + * "api.example.com") + * .apiEnableUsers(true) + * .scopes( + * "ext_profile", + * "ext_groups") + * .iconUrl("https://example.com/assets/logo.png") + * .upstreamParams(serializeJson( + * jsonObject( + * jsonProperty("screen_name", jsonObject( + * jsonProperty("alias", "login_hint") + * )) + * ))) + * .setUserRootAttributes("on_each_login") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("google-oauth2") * .build()); * * } @@ -103,21 +265,23 @@ * } * * public static void stack(Context ctx) { + * // This is an example of a Facebook connection. * var facebook = new Connection("facebook", ConnectionArgs.builder() + * .name("Facebook-Connection") + * .strategy("facebook") * .options(ConnectionOptionsArgs.builder() * .clientId("<client-id>") * .clientSecret("<client-secret>") - * .nonPersistentAttrs( - * "ethnicity", - * "gender") * .scopes( * "public_profile", * "email", * "groups_access_member_info", * "user_birthday") * .setUserRootAttributes("on_each_login") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("facebook") * .build()); * * } @@ -150,25 +314,26 @@ * } * * public static void stack(Context ctx) { + * // This is an example of an Apple connection. * var apple = new Connection("apple", ConnectionArgs.builder() + * .name("Apple-Connection") + * .strategy("apple") * .options(ConnectionOptionsArgs.builder() * .clientId("<client-id>") * .clientSecret(""" * -----BEGIN PRIVATE KEY----- * MIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA - * -----END PRIVATE KEY----- - * """) + * -----END PRIVATE KEY----- """) + * .teamId("<team-id>") * .keyId("<key-id>") - * .nonPersistentAttrs( - * "ethnicity", - * "gender") * .scopes( * "email", * "name") * .setUserRootAttributes("on_first_login") - * .teamId("<team-id>") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("apple") * .build()); * * } @@ -201,21 +366,23 @@ * } * * public static void stack(Context ctx) { + * // This is an example of an LinkedIn connection. * var linkedin = new Connection("linkedin", ConnectionArgs.builder() + * .name("Linkedin-Connection") + * .strategy("linkedin") * .options(ConnectionOptionsArgs.builder() * .clientId("<client-id>") * .clientSecret("<client-secret>") - * .nonPersistentAttrs( - * "ethnicity", - * "gender") + * .strategyVersion(2) * .scopes( * "basic_profile", * "profile", * "email") * .setUserRootAttributes("on_each_login") - * .strategyVersion(2) + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("linkedin") * .build()); * * } @@ -248,21 +415,23 @@ * } * * public static void stack(Context ctx) { + * // This is an example of an GitHub connection. * var github = new Connection("github", ConnectionArgs.builder() + * .name("GitHub-Connection") + * .strategy("github") * .options(ConnectionOptionsArgs.builder() * .clientId("<client-id>") * .clientSecret("<client-secret>") - * .nonPersistentAttrs( - * "ethnicity", - * "gender") * .scopes( * "email", * "profile", * "public_repo", * "repo") * .setUserRootAttributes("on_each_login") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("github") * .build()); * * } @@ -295,20 +464,22 @@ * } * * public static void stack(Context ctx) { + * // This is an example of an SalesForce connection. * var salesforce = new Connection("salesforce", ConnectionArgs.builder() + * .name("Salesforce-Connection") + * .strategy("salesforce") * .options(ConnectionOptionsArgs.builder() * .clientId("<client-id>") * .clientSecret("<client-secret>") * .communityBaseUrl("https://salesforce.example.com") - * .nonPersistentAttrs( - * "ethnicity", - * "gender") * .scopes( * "openid", * "email") * .setUserRootAttributes("on_first_login") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("salesforce") * .build()); * * } @@ -343,30 +514,31 @@ * } * * public static void stack(Context ctx) { + * // This is an example of an OAuth2 connection. * var oauth2 = new Connection("oauth2", ConnectionArgs.builder() + * .name("OAuth2-Connection") + * .strategy("oauth2") * .options(ConnectionOptionsArgs.builder() - * .authorizationEndpoint("https://auth.example.com/oauth2/authorize") * .clientId("<client-id>") * .clientSecret("<client-secret>") - * .iconUrl("https://auth.example.com/assets/logo.png") - * .nonPersistentAttrs( - * "ethnicity", - * "gender") - * .pkceEnabled(true) * .scopes( * "basic_profile", * "profile", * "email") + * .tokenEndpoint("https://auth.example.com/oauth2/token") + * .authorizationEndpoint("https://auth.example.com/oauth2/authorize") + * .pkceEnabled(true) + * .iconUrl("https://auth.example.com/assets/logo.png") * .scripts(Map.of("fetchUserProfile", """ * function fetchUserProfile(accessToken, context, callback) { * return callback(new Error("Whoops!")); * } - * * """)) * .setUserRootAttributes("on_each_login") - * .tokenEndpoint("https://auth.example.com/oauth2/token") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("oauth2") * .build()); * * } @@ -374,9 +546,7 @@ * ``` * <!--End PulumiCodeChooser --> * - * ### SMS Connection - * - * > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms". + * ### Active Directory (AD) * * <!--Start PulumiCodeChooser --> * ```java @@ -388,8 +558,7 @@ * import com.pulumi.auth0.Connection; * import com.pulumi.auth0.ConnectionArgs; * import com.pulumi.auth0.inputs.ConnectionOptionsArgs; - * import com.pulumi.auth0.inputs.ConnectionOptionsGatewayAuthenticationArgs; - * import com.pulumi.auth0.inputs.ConnectionOptionsTotpArgs; + * import static com.pulumi.codegen.internal.Serialization.*; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -403,31 +572,105 @@ * } * * public static void stack(Context ctx) { - * var sms = new Connection("sms", ConnectionArgs.builder() - * .isDomainConnection(false) + * var ad = new Connection("ad", ConnectionArgs.builder() + * .name("connection-active-directory") + * .displayName("Active Directory Connection") + * .strategy("ad") + * .showAsButton(true) * .options(ConnectionOptionsArgs.builder() + * .disableSelfServiceChangePassword(true) * .bruteForceProtection(true) - * .disableSignup(false) - * .forwardRequestInfo(true) - * .from("+15555555555") - * .gatewayAuthentication(ConnectionOptionsGatewayAuthenticationArgs.builder() - * .audience("https://somewhere.com/sms-gateway") - * .method("bearer") - * .secret("4e2680bb74ec2ae24736476dd37ed6c2") - * .secretBase64Encoded(false) - * .subject("test.us.auth0.com:sms") - * .build()) - * .gatewayUrl("https://somewhere.com/sms-gateway") - * .name("sms") - * .provider("sms_gateway") - * .syntax("md_with_macros") - * .template("@@password@@") - * .totp(ConnectionOptionsTotpArgs.builder() - * .length(6) - * .timeStep(300) - * .build()) + * .tenantDomain("example.com") + * .iconUrl("https://example.com/assets/logo.png") + * .domainAliases( + * "example.com", + * "api.example.com") + * .ips( + * "192.168.1.1", + * "192.168.1.2") + * .setUserRootAttributes("on_each_login") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") + * .upstreamParams(serializeJson( + * jsonObject( + * jsonProperty("screen_name", jsonObject( + * jsonProperty("alias", "login_hint") + * )) + * ))) + * .useCertAuth(false) + * .useKerberos(false) + * .disableCache(false) + * .build()) + * .build()); + * + * } + * } + * ``` + * <!--End PulumiCodeChooser --> + * + * ### Azure AD Connection + * + * <!--Start PulumiCodeChooser --> + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.auth0.Connection; + * import com.pulumi.auth0.ConnectionArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsArgs; + * import static com.pulumi.codegen.internal.Serialization.*; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var azureAd = new Connection("azureAd", ConnectionArgs.builder() + * .name("connection-azure-ad") + * .strategy("waad") + * .showAsButton(true) + * .options(ConnectionOptionsArgs.builder() + * .identityApi("azure-active-directory-v1.0") + * .clientId("123456") + * .clientSecret("123456") + * .appId("app-id-123") + * .tenantDomain("example.onmicrosoft.com") + * .domain("example.onmicrosoft.com") + * .domainAliases( + * "example.com", + * "api.example.com") + * .iconUrl("https://example.onmicrosoft.com/assets/logo.png") + * .useWsfed(false) + * .waadProtocol("openid-connect") + * .waadCommonEndpoint(false) + * .maxGroupsToRetrieve(250) + * .apiEnableUsers(true) + * .scopes( + * "basic_profile", + * "ext_groups", + * "ext_profile") + * .setUserRootAttributes("on_each_login") + * .shouldTrustEmailVerifiedConnection("never_set_emails_as_verified") + * .upstreamParams(serializeJson( + * jsonObject( + * jsonProperty("screen_name", jsonObject( + * jsonProperty("alias", "login_hint") + * )) + * ))) + * .nonPersistentAttrs( + * "ethnicity", + * "gender") * .build()) - * .strategy("sms") * .build()); * * } @@ -463,27 +706,141 @@ * } * * public static void stack(Context ctx) { + * // This is an example of an Email connection. * var passwordlessEmail = new Connection("passwordlessEmail", ConnectionArgs.builder() + * .strategy("email") + * .name("email") * .options(ConnectionOptionsArgs.builder() - * .authParams(Map.ofEntries( - * Map.entry("responseType", "code"), - * Map.entry("scope", "openid email profile offline_access") - * )) - * .bruteForceProtection(true) - * .disableSignup(false) - * .from("{{ application.name }} <root@auth0.com>") * .name("email") - * .nonPersistentAttrs() - * .setUserRootAttributes("on_each_login") + * .from("{{ application.name }} <root@auth0.com>") * .subject("Welcome to {{ application.name }}") * .syntax("liquid") * .template("<html>This is the body of the email</html>") + * .disableSignup(false) + * .bruteForceProtection(true) + * .setUserRootAttributes("on_each_login") + * .nonPersistentAttrs() + * .authParams(Map.ofEntries( + * Map.entry("scope", "openid email profile offline_access"), + * Map.entry("response_type", "code") + * )) * .totp(ConnectionOptionsTotpArgs.builder() - * .length(6) * .timeStep(300) + * .length(6) + * .build()) + * .build()) + * .build()); + * + * } + * } + * ``` + * <!--End PulumiCodeChooser --> + * + * ### SAML Connection + * + * <!--Start PulumiCodeChooser --> + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.auth0.Connection; + * import com.pulumi.auth0.ConnectionArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsSigningKeyArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsDecryptionKeyArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsIdpInitiatedArgs; + * import static com.pulumi.codegen.internal.Serialization.*; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * // This is an example of a SAML connection. + * var samlp = new Connection("samlp", ConnectionArgs.builder() + * .name("SAML-Connection") + * .strategy("samlp") + * .options(ConnectionOptionsArgs.builder() + * .debug(false) + * .signingCert("<signing-certificate>") + * .signInEndpoint("https://saml.provider/sign_in") + * .signOutEndpoint("https://saml.provider/sign_out") + * .disableSignOut(true) + * .tenantDomain("example.com") + * .domainAliases( + * "example.com", + * "alias.example.com") + * .protocolBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST") + * .requestTemplate(""" + * <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" + * @@AssertServiceURLAndDestination@@ + * ID="@@ID@@" + * IssueInstant="@@IssueInstant@@" + * ProtocolBinding="@@ProtocolBinding@@" Version="2.0"> + * <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">@@Issuer@@</saml:Issuer> + * </samlp:AuthnRequest> """) + * .userIdAttribute("https://saml.provider/imi/ns/identity-200810") + * .signatureAlgorithm("rsa-sha256") + * .digestAlgorithm("sha256") + * .iconUrl("https://saml.provider/assets/logo.png") + * .entityId("<entity_id>") + * .metadataXml(""" + * <?xml version="1.0"?> + * <md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="https://example.com"> + * <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> + * <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://saml.provider/sign_out"/> + * <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://saml.provider/sign_in"/> + * </md:IDPSSODescriptor> + * </md:EntityDescriptor> + * """) + * .metadataUrl("https://saml.provider/imi/ns/FederationMetadata.xml") + * .fieldsMap(serializeJson( + * jsonObject( + * jsonProperty("name", jsonArray( + * "name", + * "nameidentifier" + * )), + * jsonProperty("email", jsonArray( + * "emailaddress", + * "nameidentifier" + * )), + * jsonProperty("family_name", "surname") + * ))) + * .signingKey(ConnectionOptionsSigningKeyArgs.builder() + * .key(""" + * -----BEGIN PRIVATE KEY----- + * ...{your private key here}... + * -----END PRIVATE KEY----- """) + * .cert(""" + * -----BEGIN CERTIFICATE----- + * ...{your public key cert here}... + * -----END CERTIFICATE----- """) + * .build()) + * .decryptionKey(ConnectionOptionsDecryptionKeyArgs.builder() + * .key(""" + * -----BEGIN PRIVATE KEY----- + * ...{your private key here}... + * -----END PRIVATE KEY----- """) + * .cert(""" + * -----BEGIN CERTIFICATE----- + * ...{your public key cert here}... + * -----END CERTIFICATE----- """) + * .build()) + * .idpInitiated(ConnectionOptionsIdpInitiatedArgs.builder() + * .clientId("client_id") + * .clientProtocol("samlp") + * .clientAuthorizeQuery("type=code&timeout=30") * .build()) * .build()) - * .strategy("email") * .build()); * * } @@ -516,20 +873,183 @@ * } * * public static void stack(Context ctx) { + * // This is an example of a WindowsLive connection. * var windowslive = new Connection("windowslive", ConnectionArgs.builder() + * .name("Windowslive-Connection") + * .strategy("windowslive") * .options(ConnectionOptionsArgs.builder() * .clientId("<client-id>") * .clientSecret("<client-secret>") + * .strategyVersion(2) + * .scopes( + * "signin", + * "graph_user") + * .setUserRootAttributes("on_first_login") * .nonPersistentAttrs( * "ethnicity", * "gender") + * .build()) + * .build()); + * + * } + * } + * ``` + * <!--End PulumiCodeChooser --> + * + * ### OIDC Connection + * + * <!--Start PulumiCodeChooser --> + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.auth0.Connection; + * import com.pulumi.auth0.ConnectionArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsConnectionSettingsArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsAttributeMapArgs; + * import static com.pulumi.codegen.internal.Serialization.*; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * // This is an example of an OIDC connection. + * var oidc = new Connection("oidc", ConnectionArgs.builder() + * .name("oidc-connection") + * .displayName("OIDC Connection") + * .strategy("oidc") + * .showAsButton(false) + * .options(ConnectionOptionsArgs.builder() + * .clientId("1234567") + * .clientSecret("1234567") + * .domainAliases("example.com") + * .tenantDomain("") + * .iconUrl("https://example.com/assets/logo.png") + * .type("back_channel") + * .issuer("https://www.paypalobjects.com") + * .jwksUri("https://api.paypal.com/v1/oauth2/certs") + * .discoveryUrl("https://www.paypalobjects.com/.well-known/openid-configuration") + * .tokenEndpoint("https://api.paypal.com/v1/oauth2/token") + * .userinfoEndpoint("https://api.paypal.com/v1/oauth2/token/userinfo") + * .authorizationEndpoint("https://www.paypal.com/signin/authorize") * .scopes( - * "signin", - * "graph_user") + * "openid", + * "email") * .setUserRootAttributes("on_first_login") - * .strategyVersion(2) + * .nonPersistentAttrs( + * "ethnicity", + * "gender") + * .connectionSettings(ConnectionOptionsConnectionSettingsArgs.builder() + * .pkce("auto") + * .build()) + * .attributeMap(ConnectionOptionsAttributeMapArgs.builder() + * .mappingMode("use_map") + * .userinfoScope("openid email profile groups") + * .attributes(serializeJson( + * jsonObject( + * jsonProperty("name", "${context.tokenset.name}"), + * jsonProperty("email", "${context.tokenset.email}"), + * jsonProperty("email_verified", "${context.tokenset.email_verified}"), + * jsonProperty("nickname", "${context.tokenset.nickname}"), + * jsonProperty("picture", "${context.tokenset.picture}"), + * jsonProperty("given_name", "${context.tokenset.given_name}"), + * jsonProperty("family_name", "${context.tokenset.family_name}") + * ))) + * .build()) + * .build()) + * .build()); + * + * } + * } + * ``` + * <!--End PulumiCodeChooser --> + * + * ### Okta Connection + * + * <!--Start PulumiCodeChooser --> + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.auth0.Connection; + * import com.pulumi.auth0.ConnectionArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsConnectionSettingsArgs; + * import com.pulumi.auth0.inputs.ConnectionOptionsAttributeMapArgs; + * import static com.pulumi.codegen.internal.Serialization.*; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * // This is an example of an Okta Workforce connection. + * var okta = new Connection("okta", ConnectionArgs.builder() + * .name("okta-connection") + * .displayName("Okta Workforce Connection") + * .strategy("okta") + * .showAsButton(false) + * .options(ConnectionOptionsArgs.builder() + * .clientId("1234567") + * .clientSecret("1234567") + * .domain("example.okta.com") + * .domainAliases("example.com") + * .issuer("https://example.okta.com") + * .jwksUri("https://example.okta.com/oauth2/v1/keys") + * .tokenEndpoint("https://example.okta.com/oauth2/v1/token") + * .userinfoEndpoint("https://example.okta.com/oauth2/v1/userinfo") + * .authorizationEndpoint("https://example.okta.com/oauth2/v1/authorize") + * .scopes( + * "openid", + * "email") + * .setUserRootAttributes("on_first_login") + * .nonPersistentAttrs( + * "ethnicity", + * "gender") + * .upstreamParams(serializeJson( + * jsonObject( + * jsonProperty("screen_name", jsonObject( + * jsonProperty("alias", "login_hint") + * )) + * ))) + * .connectionSettings(ConnectionOptionsConnectionSettingsArgs.builder() + * .pkce("auto") + * .build()) + * .attributeMap(ConnectionOptionsAttributeMapArgs.builder() + * .mappingMode("basic_profile") + * .userinfoScope("openid email profile groups") + * .attributes(serializeJson( + * jsonObject( + * jsonProperty("name", "${context.tokenset.name}"), + * jsonProperty("email", "${context.tokenset.email}"), + * jsonProperty("email_verified", "${context.tokenset.email_verified}"), + * jsonProperty("nickname", "${context.tokenset.nickname}"), + * jsonProperty("picture", "${context.tokenset.picture}"), + * jsonProperty("given_name", "${context.tokenset.given_name}"), + * jsonProperty("family_name", "${context.tokenset.family_name}") + * ))) + * .build()) * .build()) - * .strategy("windowslive") * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClient.java b/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClient.java index 508e257a..f8d5d369 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClient.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClient.java @@ -33,6 +33,7 @@ * import com.pulumi.auth0.Connection; * import com.pulumi.auth0.ConnectionArgs; * import com.pulumi.auth0.Client; + * import com.pulumi.auth0.ClientArgs; * import com.pulumi.auth0.ConnectionClient; * import com.pulumi.auth0.ConnectionClientArgs; * import java.util.List; @@ -49,10 +50,13 @@ * * public static void stack(Context ctx) { * var myConn = new Connection("myConn", ConnectionArgs.builder() + * .name("My-Auth0-Connection") * .strategy("auth0") * .build()); * - * var myClient = new Client("myClient"); + * var myClient = new Client("myClient", ClientArgs.builder() + * .name("My-Auth0-Client") + * .build()); * * // One connection to one client association. * // To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. diff --git a/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClients.java b/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClients.java index 77b9b260..097c46e8 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClients.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/ConnectionClients.java @@ -34,6 +34,7 @@ * import com.pulumi.auth0.Connection; * import com.pulumi.auth0.ConnectionArgs; * import com.pulumi.auth0.Client; + * import com.pulumi.auth0.ClientArgs; * import com.pulumi.auth0.ConnectionClients; * import com.pulumi.auth0.ConnectionClientsArgs; * import java.util.List; @@ -50,12 +51,17 @@ * * public static void stack(Context ctx) { * var myConn = new Connection("myConn", ConnectionArgs.builder() + * .name("My-Auth0-Connection") * .strategy("auth0") * .build()); * - * var myFirstClient = new Client("myFirstClient"); + * var myFirstClient = new Client("myFirstClient", ClientArgs.builder() + * .name("My-First-Auth0-Client") + * .build()); * - * var mySecondClient = new Client("mySecondClient"); + * var mySecondClient = new Client("mySecondClient", ClientArgs.builder() + * .name("My-Second-Auth0-Client") + * .build()); * * // One connection to many clients association. * // To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. diff --git a/sdk/java/src/main/java/com/pulumi/auth0/EmailProvider.java b/sdk/java/src/main/java/com/pulumi/auth0/EmailProvider.java index fbde661c..88a732b1 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/EmailProvider.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/EmailProvider.java @@ -20,67 +20,6 @@ /** * With Auth0, you can have standard welcome, password reset, and account verification email-based workflows built right into Auth0. This resource allows you to configure email providers, so you can route all emails that are part of Auth0's authentication workflows through the supported high-volume email service of your choice. * - * ## Example Usage - * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.auth0.EmailProvider; - * import com.pulumi.auth0.EmailProviderArgs; - * import com.pulumi.auth0.inputs.EmailProviderCredentialsArgs; - * import java.util.List; - * import java.util.ArrayList; - * import java.util.Map; - * import java.io.File; - * import java.nio.file.Files; - * import java.nio.file.Paths; - * - * public class App { - * public static void main(String[] args) { - * Pulumi.run(App::stack); - * } - * - * public static void stack(Context ctx) { - * // This is an example on how to set up the email provider with Amazon SES. - * var amazonSesEmailProvider = new EmailProvider("amazonSesEmailProvider", EmailProviderArgs.builder() - * .credentials(EmailProviderCredentialsArgs.builder() - * .accessKeyId("AKIAXXXXXXXXXXXXXXXX") - * .region("us-east-1") - * .secretAccessKey("7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") - * .build()) - * .defaultFromAddress("accounts@example.com") - * .enabled(true) - * .build()); - * - * // This is an example on how to set up the email provider with Sendgrid. - * var sendgridEmailProvider = new EmailProvider("sendgridEmailProvider", EmailProviderArgs.builder() - * .credentials(EmailProviderCredentialsArgs.builder() - * .apiKey("secretAPIKey") - * .build()) - * .defaultFromAddress("accounts@example.com") - * .enabled(true) - * .build()); - * - * // This is an example on how to set up the email provider with MS365. - * var smtpEmailProvider = new EmailProvider("smtpEmailProvider", EmailProviderArgs.builder() - * .credentials(EmailProviderCredentialsArgs.builder() - * .ms365ClientId("ms365_client_id") - * .ms365ClientSecret("ms365_client_secret") - * .ms365TenantId("ms365_tenant_id") - * .build()) - * .defaultFromAddress("accounts@example.com") - * .enabled(true) - * .build()); - * - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * ## Import * * As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/java/src/main/java/com/pulumi/auth0/EmailTemplate.java b/sdk/java/src/main/java/com/pulumi/auth0/EmailTemplate.java index 1c084d83..7e4c90fa 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/EmailTemplate.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/EmailTemplate.java @@ -48,6 +48,7 @@ * * public static void stack(Context ctx) { * var myEmailProvider = new EmailProvider("myEmailProvider", EmailProviderArgs.builder() + * .name("ses") * .enabled(true) * .defaultFromAddress("accounts@example.com") * .credentials(EmailProviderCredentialsArgs.builder() diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Guardian.java b/sdk/java/src/main/java/com/pulumi/auth0/Guardian.java index b074fce3..b907504d 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Guardian.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Guardian.java @@ -34,14 +34,14 @@ * import com.pulumi.core.Output; * import com.pulumi.auth0.Guardian; * import com.pulumi.auth0.GuardianArgs; - * import com.pulumi.auth0.inputs.GuardianDuoArgs; + * import com.pulumi.auth0.inputs.GuardianWebauthnPlatformArgs; + * import com.pulumi.auth0.inputs.GuardianWebauthnRoamingArgs; * import com.pulumi.auth0.inputs.GuardianPhoneArgs; * import com.pulumi.auth0.inputs.GuardianPhoneOptionsArgs; * import com.pulumi.auth0.inputs.GuardianPushArgs; * import com.pulumi.auth0.inputs.GuardianPushAmazonSnsArgs; * import com.pulumi.auth0.inputs.GuardianPushCustomAppArgs; - * import com.pulumi.auth0.inputs.GuardianWebauthnPlatformArgs; - * import com.pulumi.auth0.inputs.GuardianWebauthnRoamingArgs; + * import com.pulumi.auth0.inputs.GuardianDuoArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -56,16 +56,20 @@ * * public static void stack(Context ctx) { * var myGuardian = new Guardian("myGuardian", GuardianArgs.builder() - * .duo(GuardianDuoArgs.builder() - * .enabled(true) - * .hostname("api-hostname") - * .integrationKey("someKey") - * .secretKey("someSecret") - * .build()) + * .policy("all-applications") * .email(true) * .otp(true) + * .recoveryCode(true) + * .webauthnPlatform(GuardianWebauthnPlatformArgs.builder() + * .enabled(true) + * .build()) + * .webauthnRoaming(GuardianWebauthnRoamingArgs.builder() + * .enabled(true) + * .userVerification("required") + * .build()) * .phone(GuardianPhoneArgs.builder() * .enabled(true) + * .provider("auth0") * .messageTypes( * "sms", * "voice") @@ -73,10 +77,10 @@ * .enrollmentMessage("{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.") * .verificationMessage("{{code}} is your verification code for {{tenant.friendly_name}}.") * .build()) - * .provider("auth0") * .build()) - * .policy("all-applications") * .push(GuardianPushArgs.builder() + * .enabled(true) + * .provider("sns") * .amazonSns(GuardianPushAmazonSnsArgs.builder() * .awsAccessKeyId("test1") * .awsRegion("us-west-1") @@ -89,16 +93,12 @@ * .appleAppLink("https://itunes.apple.com/us/app/my-app/id123121") * .googleAppLink("https://play.google.com/store/apps/details?id=com.my.app") * .build()) - * .enabled(true) - * .provider("sns") * .build()) - * .recoveryCode(true) - * .webauthnPlatform(GuardianWebauthnPlatformArgs.builder() - * .enabled(true) - * .build()) - * .webauthnRoaming(GuardianWebauthnRoamingArgs.builder() + * .duo(GuardianDuoArgs.builder() * .enabled(true) - * .userVerification("required") + * .integrationKey("someKey") + * .secretKey("someSecret") + * .hostname("api-hostname") * .build()) * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Hook.java b/sdk/java/src/main/java/com/pulumi/auth0/Hook.java index b0215de6..cfa57890 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Hook.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Hook.java @@ -48,16 +48,16 @@ * * public static void stack(Context ctx) { * var myHook = new Hook("myHook", HookArgs.builder() - * .dependencies(Map.of("auth0", "2.30.0")) - * .enabled(true) + * .name("My Pre User Registration Hook") * .script(""" * function (user, context, callback) { * callback(null, { user }); * } - * * """) - * .secrets(Map.of("foo", "bar")) * .triggerId("pre-user-registration") + * .enabled(true) + * .secrets(Map.of("foo", "bar")) + * .dependencies(Map.of("auth0", "2.30.0")) * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/LogStream.java b/sdk/java/src/main/java/com/pulumi/auth0/LogStream.java index d14417d5..12b40350 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/LogStream.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/LogStream.java @@ -47,36 +47,38 @@ * public static void stack(Context ctx) { * // This is an example of an http log stream. * var myWebhook = new LogStream("myWebhook", LogStreamArgs.builder() + * .name("HTTP log stream") + * .type("http") * .filters( * Map.ofEntries( - * Map.entry("name", "auth.login.fail"), - * Map.entry("type", "category") + * Map.entry("type", "category"), + * Map.entry("name", "auth.login.fail") * ), * Map.ofEntries( - * Map.entry("name", "auth.signup.fail"), - * Map.entry("type", "category") + * Map.entry("type", "category"), + * Map.entry("name", "auth.signup.fail") * )) * .sink(LogStreamSinkArgs.builder() - * .httpAuthorization("AKIAXXXXXXXXXXXXXXXX") - * .httpContentFormat("JSONOBJECT") + * .httpEndpoint("https://example.com/logs") * .httpContentType("application/json") + * .httpContentFormat("JSONOBJECT") + * .httpAuthorization("AKIAXXXXXXXXXXXXXXXX") * .httpCustomHeaders(Map.ofEntries( * Map.entry("header", "foo"), * Map.entry("value", "bar") * )) - * .httpEndpoint("https://example.com/logs") * .build()) - * .type("http") * .build()); * * // This is an example of an Amazon EventBridge log stream. * var exampleAws = new LogStream("exampleAws", LogStreamArgs.builder() + * .name("AWS Eventbridge") + * .type("eventbridge") + * .status("active") * .sink(LogStreamSinkArgs.builder() * .awsAccountId("my_account_id") * .awsRegion("us-east-2") * .build()) - * .status("active") - * .type("eventbridge") * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Organization.java b/sdk/java/src/main/java/com/pulumi/auth0/Organization.java index 65b0debe..d5b56084 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Organization.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Organization.java @@ -51,14 +51,15 @@ * * public static void stack(Context ctx) { * var myOrganization = new Organization("myOrganization", OrganizationArgs.builder() + * .name("auth0-inc") + * .displayName("Auth0 Inc.") * .branding(OrganizationBrandingArgs.builder() + * .logoUrl("https://example.com/assets/icons/icon.png") * .colors(Map.ofEntries( - * Map.entry("pageBackground", "#e1e1e1"), - * Map.entry("primary", "#f2f2f2") + * Map.entry("primary", "#f2f2f2"), + * Map.entry("page_background", "#e1e1e1") * )) - * .logoUrl("https://example.com/assets/icons/icon.png") * .build()) - * .displayName("Auth0 Inc.") * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnection.java b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnection.java index b70845f8..4c42ce2e 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnection.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnection.java @@ -52,10 +52,12 @@ * * public static void stack(Context ctx) { * var myConnection = new Connection("myConnection", ConnectionArgs.builder() + * .name("My Connection") * .strategy("auth0") * .build()); * * var myOrganization = new Organization("myOrganization", OrganizationArgs.builder() + * .name("my-organization") * .displayName("My Organization") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnections.java b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnections.java index b8d0035e..d8cbdb7f 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnections.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationConnections.java @@ -53,14 +53,17 @@ * * public static void stack(Context ctx) { * var myConnection_1 = new Connection("myConnection-1", ConnectionArgs.builder() + * .name("My Connection 1") * .strategy("auth0") * .build()); * * var myConnection_2 = new Connection("myConnection-2", ConnectionArgs.builder() + * .name("My Connection 2") * .strategy("auth0") * .build()); * * var myOrganization = new Organization("myOrganization", OrganizationArgs.builder() + * .name("my-organization") * .displayName("My Organization") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMember.java b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMember.java index 9b5ba4c9..56917bd9 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMember.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMember.java @@ -56,6 +56,7 @@ * .build()); * * var myOrg = new Organization("myOrg", OrganizationArgs.builder() + * .name("org-admin") * .displayName("Admin") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRole.java b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRole.java index 88c7a140..8b0ccb64 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRole.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRole.java @@ -26,6 +26,7 @@ * import com.pulumi.Pulumi; * import com.pulumi.core.Output; * import com.pulumi.auth0.Role; + * import com.pulumi.auth0.RoleArgs; * import com.pulumi.auth0.User; * import com.pulumi.auth0.UserArgs; * import com.pulumi.auth0.Organization; @@ -47,9 +48,13 @@ * } * * public static void stack(Context ctx) { - * var reader = new Role("reader"); + * var reader = new Role("reader", RoleArgs.builder() + * .name("Reader") + * .build()); * - * var writer = new Role("writer"); + * var writer = new Role("writer", RoleArgs.builder() + * .name("Writer") + * .build()); * * var user = new User("user", UserArgs.builder() * .connectionName("Username-Password-Authentication") @@ -58,6 +63,7 @@ * .build()); * * var myOrg = new Organization("myOrg", OrganizationArgs.builder() + * .name("some-org") * .displayName("Some Org") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRoles.java b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRoles.java index 878b5b9b..537eb961 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRoles.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMemberRoles.java @@ -27,6 +27,7 @@ * import com.pulumi.Pulumi; * import com.pulumi.core.Output; * import com.pulumi.auth0.Role; + * import com.pulumi.auth0.RoleArgs; * import com.pulumi.auth0.User; * import com.pulumi.auth0.UserArgs; * import com.pulumi.auth0.Organization; @@ -48,9 +49,13 @@ * } * * public static void stack(Context ctx) { - * var reader = new Role("reader"); + * var reader = new Role("reader", RoleArgs.builder() + * .name("Reader") + * .build()); * - * var writer = new Role("writer"); + * var writer = new Role("writer", RoleArgs.builder() + * .name("Writer") + * .build()); * * var user = new User("user", UserArgs.builder() * .connectionName("Username-Password-Authentication") @@ -59,6 +64,7 @@ * .build()); * * var myOrg = new Organization("myOrg", OrganizationArgs.builder() + * .name("some-org") * .displayName("Some Org") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMembers.java b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMembers.java index 142a2c1c..834d43cb 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMembers.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/OrganizationMembers.java @@ -63,6 +63,7 @@ * .build()); * * var myOrg = new Organization("myOrg", OrganizationArgs.builder() + * .name("some-org") * .displayName("Some Organization") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Pages.java b/sdk/java/src/main/java/com/pulumi/auth0/Pages.java index 6ee9881d..69a7bb2c 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Pages.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Pages.java @@ -30,10 +30,10 @@ * import com.pulumi.core.Output; * import com.pulumi.auth0.Pages; * import com.pulumi.auth0.PagesArgs; + * import com.pulumi.auth0.inputs.PagesLoginArgs; * import com.pulumi.auth0.inputs.PagesChangePasswordArgs; - * import com.pulumi.auth0.inputs.PagesErrorArgs; * import com.pulumi.auth0.inputs.PagesGuardianMfaArgs; - * import com.pulumi.auth0.inputs.PagesLoginArgs; + * import com.pulumi.auth0.inputs.PagesErrorArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -48,22 +48,22 @@ * * public static void stack(Context ctx) { * var myPages = new Pages("myPages", PagesArgs.builder() + * .login(PagesLoginArgs.builder() + * .enabled(true) + * .html("<html><body>My Custom Login Page</body></html>") + * .build()) * .changePassword(PagesChangePasswordArgs.builder() * .enabled(true) * .html("<html><body>My Custom Reset Password Page</body></html>") * .build()) - * .error(PagesErrorArgs.builder() - * .html("<html><body>My Custom Error Page</body></html>") - * .showLogLink(true) - * .url("https://example.com") - * .build()) * .guardianMfa(PagesGuardianMfaArgs.builder() * .enabled(true) * .html("<html><body>My Custom MFA Page</body></html>") * .build()) - * .login(PagesLoginArgs.builder() - * .enabled(true) - * .html("<html><body>My Custom Login Page</body></html>") + * .error(PagesErrorArgs.builder() + * .showLogLink(true) + * .html("<html><body>My Custom Error Page</body></html>") + * .url("https://example.com") * .build()) * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Prompt.java b/sdk/java/src/main/java/com/pulumi/auth0/Prompt.java index 9f06b989..bdf1681e 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Prompt.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Prompt.java @@ -42,8 +42,8 @@ * * public static void stack(Context ctx) { * var myPrompt = new Prompt("myPrompt", PromptArgs.builder() - * .identifierFirst(false) * .universalLoginExperience("new") + * .identifierFirst(false) * .webauthnPlatformFirstFactor(true) * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/PromptPartials.java b/sdk/java/src/main/java/com/pulumi/auth0/PromptPartials.java index f4e3e311..10d72f41 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/PromptPartials.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/PromptPartials.java @@ -42,13 +42,13 @@ * * public static void stack(Context ctx) { * var myLoginPromptPartials = new PromptPartials("myLoginPromptPartials", PromptPartialsArgs.builder() - * .formContentEnd("<div>Updated Form Content End</div>") + * .prompt("login") * .formContentStart("<div>Updated Form Content Start</div>") - * .formFooterEnd("<div>Updated Footer End</div>") + * .formContentEnd("<div>Updated Form Content End</div>") * .formFooterStart("<div>Updated Footer Start</div>") - * .prompt("login") - * .secondaryActionsEnd("<div>Updated Secondary Actions End</div>") + * .formFooterEnd("<div>Updated Footer End</div>") * .secondaryActionsStart("<div>Updated Secondary Actions Start</div>") + * .secondaryActionsEnd("<div>Updated Secondary Actions End</div>") * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/ResourceServer.java b/sdk/java/src/main/java/com/pulumi/auth0/ResourceServer.java index f4682013..60527fdd 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/ResourceServer.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/ResourceServer.java @@ -44,11 +44,12 @@ * * public static void stack(Context ctx) { * var myResourceServer = new ResourceServer("myResourceServer", ResourceServerArgs.builder() - * .allowOfflineAccess(true) + * .name("Example Resource Server (Managed by Terraform)") * .identifier("https://api.example.com") * .signingAlg("RS256") - * .skipConsentForVerifiableFirstPartyClients(true) + * .allowOfflineAccess(true) * .tokenLifetime(8600) + * .skipConsentForVerifiableFirstPartyClients(true) * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScope.java b/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScope.java index 4c252adc..f6dbef71 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScope.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScope.java @@ -48,6 +48,7 @@ * * public static void stack(Context ctx) { * var resourceServer = new ResourceServer("resourceServer", ResourceServerArgs.builder() + * .name("Example Resource Server (Managed by Terraform)") * .identifier("https://api.example.com") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScopes.java b/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScopes.java index 8115a041..f4fac8c3 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScopes.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/ResourceServerScopes.java @@ -51,6 +51,7 @@ * * public static void stack(Context ctx) { * var myApi = new ResourceServer("myApi", ResourceServerArgs.builder() + * .name("Example Resource Server (Managed by Terraform)") * .identifier("https://api.example.com") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Role.java b/sdk/java/src/main/java/com/pulumi/auth0/Role.java index baac1e1f..1a48195a 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Role.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Role.java @@ -41,6 +41,7 @@ * * public static void stack(Context ctx) { * var myRole = new Role("myRole", RoleArgs.builder() + * .name("My Role - (Managed by Terraform)") * .description("Role Description...") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Rule.java b/sdk/java/src/main/java/com/pulumi/auth0/Rule.java index ba7ccb9a..2baa64b5 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Rule.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Rule.java @@ -45,13 +45,13 @@ * * public static void stack(Context ctx) { * var myRule = new Rule("myRule", RuleArgs.builder() - * .enabled(true) + * .name("empty-rule") * .script(""" * function (user, context, callback) { * callback(null, user, context); * } - * * """) + * .enabled(true) * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/RuleConfig.java b/sdk/java/src/main/java/com/pulumi/auth0/RuleConfig.java index 80e1ffd4..f3a143ee 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/RuleConfig.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/RuleConfig.java @@ -44,13 +44,13 @@ * * public static void stack(Context ctx) { * var myRule = new Rule("myRule", RuleArgs.builder() - * .enabled(true) + * .name("empty-rule") * .script(""" * function (user, context, callback) { * callback(null, user, context); * } - * * """) + * .enabled(true) * .build()); * * var myRuleConfig = new RuleConfig("myRuleConfig", RuleConfigArgs.builder() diff --git a/sdk/java/src/main/java/com/pulumi/auth0/Tenant.java b/sdk/java/src/main/java/com/pulumi/auth0/Tenant.java index 7efd726c..64c4e450 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/Tenant.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/Tenant.java @@ -54,29 +54,29 @@ * * public static void stack(Context ctx) { * var myTenant = new Tenant("myTenant", TenantArgs.builder() + * .friendlyName("Tenant Name") + * .pictureUrl("http://example.com/logo.png") + * .supportEmail("support@example.com") + * .supportUrl("http://example.com/support") * .allowedLogoutUrls("http://example.com/logout") - * .defaultRedirectionUri("https://example.com/login") + * .sessionLifetime(8760) + * .sandboxVersion("12") * .enabledLocales("en") + * .defaultRedirectionUri("https://example.com/login") * .flags(TenantFlagsArgs.builder() * .disableClickjackProtectionHeaders(true) - * .disableFieldsMapFix(false) - * .disableManagementApiSmsObfuscation(false) * .enablePublicSignupUserExistsError(true) - * .noDiscloseEnterpriseConnections(false) * .useScopeDescriptionsForConsent(true) + * .noDiscloseEnterpriseConnections(false) + * .disableManagementApiSmsObfuscation(false) + * .disableFieldsMapFix(false) * .build()) - * .friendlyName("Tenant Name") - * .pictureUrl("http://example.com/logo.png") - * .sandboxVersion("12") * .sessionCookie(TenantSessionCookieArgs.builder() * .mode("non-persistent") * .build()) - * .sessionLifetime(8760) * .sessions(TenantSessionsArgs.builder() * .oidcLogoutPromptEnabled(false) * .build()) - * .supportEmail("support@example.com") - * .supportUrl("http://example.com/support") * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/TriggerAction.java b/sdk/java/src/main/java/com/pulumi/auth0/TriggerAction.java index 3e251c80..576a4053 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/TriggerAction.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/TriggerAction.java @@ -50,6 +50,7 @@ * * public static void stack(Context ctx) { * var loginAlert = new Action("loginAlert", ActionArgs.builder() + * .name("Alert after login") * .code(""" * exports.onContinuePostLogin = async (event, api) => { * console.log("foo"); diff --git a/sdk/java/src/main/java/com/pulumi/auth0/TriggerActions.java b/sdk/java/src/main/java/com/pulumi/auth0/TriggerActions.java index 588b042a..5f5fc15e 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/TriggerActions.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/TriggerActions.java @@ -51,6 +51,7 @@ * * public static void stack(Context ctx) { * var actionFoo = new Action("actionFoo", ActionArgs.builder() + * .name("Test Trigger Binding Foo") * .code(""" * exports.onContinuePostLogin = async (event, api) => { * console.log("foo"); @@ -64,6 +65,7 @@ * .build()); * * var actionBar = new Action("actionBar", ActionArgs.builder() + * .name("Test Trigger Binding Bar") * .code(""" * exports.onContinuePostLogin = async (event, api) => { * console.log("bar"); diff --git a/sdk/java/src/main/java/com/pulumi/auth0/User.java b/sdk/java/src/main/java/com/pulumi/auth0/User.java index 3361c676..369e6ea9 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/User.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/User.java @@ -45,13 +45,14 @@ * public static void stack(Context ctx) { * var user = new User("user", UserArgs.builder() * .connectionName("Username-Password-Authentication") + * .userId("12345") + * .username("unique_username") + * .name("Firstname Lastname") + * .nickname("some.nickname") * .email("test@test.com") * .emailVerified(true) - * .nickname("some.nickname") * .password("passpass$12$12") * .picture("https://www.example.com/a-valid-picture-url.jpg") - * .userId("12345") - * .username("unique_username") * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/auth0/UserRole.java b/sdk/java/src/main/java/com/pulumi/auth0/UserRole.java index b80954d6..cde22714 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/UserRole.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/UserRole.java @@ -50,12 +50,14 @@ * public static void stack(Context ctx) { * // Example: * var admin = new Role("admin", RoleArgs.builder() + * .name("admin") * .description("Administrator") * .build()); * * var user = new User("user", UserArgs.builder() * .connectionName("Username-Password-Authentication") * .username("unique_username") + * .name("Firstname Lastname") * .email("test@test.com") * .password("passpass$12$12") * .build()); diff --git a/sdk/java/src/main/java/com/pulumi/auth0/UserRoles.java b/sdk/java/src/main/java/com/pulumi/auth0/UserRoles.java index a3b6ac8e..f55c6320 100644 --- a/sdk/java/src/main/java/com/pulumi/auth0/UserRoles.java +++ b/sdk/java/src/main/java/com/pulumi/auth0/UserRoles.java @@ -51,12 +51,14 @@ * public static void stack(Context ctx) { * // Example: * var admin = new Role("admin", RoleArgs.builder() + * .name("admin") * .description("Administrator") * .build()); * * var user = new User("user", UserArgs.builder() * .connectionName("Username-Password-Authentication") * .username("unique_username") + * .name("Firstname Lastname") * .email("test@test.com") * .password("passpass$12$12") * .build()); diff --git a/sdk/nodejs/attackProtection.ts b/sdk/nodejs/attackProtection.ts index 21093d45..615ac014 100644 --- a/sdk/nodejs/attackProtection.ts +++ b/sdk/nodejs/attackProtection.ts @@ -16,18 +16,22 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myProtection = new auth0.AttackProtection("myProtection", { - * breachedPasswordDetection: { - * adminNotificationFrequencies: ["daily"], + * const myProtection = new auth0.AttackProtection("my_protection", { + * suspiciousIpThrottling: { * enabled: true, - * method: "standard", - * preUserRegistration: { - * shields: ["block"], - * }, * shields: [ * "admin_notification", * "block", * ], + * allowlists: ["192.168.1.1"], + * preLogin: { + * maxAttempts: 100, + * rate: 864000, + * }, + * preUserRegistration: { + * maxAttempts: 50, + * rate: 1200, + * }, * }, * bruteForceProtection: { * allowlists: ["127.0.0.1"], @@ -39,21 +43,17 @@ import * as utilities from "./utilities"; * "user_notification", * ], * }, - * suspiciousIpThrottling: { - * allowlists: ["192.168.1.1"], + * breachedPasswordDetection: { + * adminNotificationFrequencies: ["daily"], * enabled: true, - * preLogin: { - * maxAttempts: 100, - * rate: 864000, - * }, - * preUserRegistration: { - * maxAttempts: 50, - * rate: 1200, - * }, + * method: "standard", * shields: [ * "admin_notification", * "block", * ], + * preUserRegistration: { + * shields: ["block"], + * }, * }, * }); * ``` diff --git a/sdk/nodejs/branding.ts b/sdk/nodejs/branding.ts index b8d1d78c..15d7505e 100644 --- a/sdk/nodejs/branding.ts +++ b/sdk/nodejs/branding.ts @@ -9,27 +9,6 @@ import * as utilities from "./utilities"; /** * This resource allows you to manage branding within your Auth0 tenant. Auth0 can be customized with a look and feel that aligns with your organization's brand requirements and user expectations. * - * ## Example Usage - * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as auth0 from "@pulumi/auth0"; - * import * as fs from "fs"; - * - * const myBrand = new auth0.Branding("myBrand", { - * logoUrl: "https://mycompany.org/logo.png", - * colors: { - * primary: "#0059d6", - * pageBackground: "#000000", - * }, - * universalLogin: { - * body: fs.readFileSync("universal_login_body.html", "utf8"), - * }, - * }); - * ``` - * - * * ## Import * * As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/nodejs/brandingTheme.ts b/sdk/nodejs/brandingTheme.ts index b214d6bf..3f677b2e 100644 --- a/sdk/nodejs/brandingTheme.ts +++ b/sdk/nodejs/brandingTheme.ts @@ -9,89 +9,6 @@ import * as utilities from "./utilities"; /** * This resource allows you to manage branding themes for your Universal Login page within your Auth0 tenant. * - * ## Example Usage - * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as auth0 from "@pulumi/auth0"; - * - * // An example of a fully configured auth0_branding_theme. - * const myTheme = new auth0.BrandingTheme("myTheme", { - * borders: { - * buttonBorderRadius: 1, - * buttonBorderWeight: 1, - * buttonsStyle: "pill", - * inputBorderRadius: 3, - * inputBorderWeight: 1, - * inputsStyle: "pill", - * showWidgetShadow: false, - * widgetBorderWeight: 1, - * widgetCornerRadius: 3, - * }, - * colors: { - * bodyText: "#FF00CC", - * error: "#FF00CC", - * header: "#FF00CC", - * icons: "#FF00CC", - * inputBackground: "#FF00CC", - * inputBorder: "#FF00CC", - * inputFilledText: "#FF00CC", - * inputLabelsPlaceholders: "#FF00CC", - * linksFocusedComponents: "#FF00CC", - * primaryButton: "#FF00CC", - * primaryButtonLabel: "#FF00CC", - * secondaryButtonBorder: "#FF00CC", - * secondaryButtonLabel: "#FF00CC", - * success: "#FF00CC", - * widgetBackground: "#FF00CC", - * widgetBorder: "#FF00CC", - * }, - * fonts: { - * bodyText: { - * bold: false, - * size: 100, - * }, - * buttonsText: { - * bold: false, - * size: 100, - * }, - * fontUrl: "https://google.com/font.woff", - * inputLabels: { - * bold: false, - * size: 100, - * }, - * links: { - * bold: false, - * size: 100, - * }, - * linksStyle: "normal", - * referenceTextSize: 12, - * subtitle: { - * bold: false, - * size: 100, - * }, - * title: { - * bold: false, - * size: 100, - * }, - * }, - * pageBackground: { - * backgroundColor: "#000000", - * backgroundImageUrl: "https://google.com/background.png", - * pageLayout: "center", - * }, - * widget: { - * headerTextAlignment: "center", - * logoHeight: 55, - * logoPosition: "center", - * logoUrl: "https://google.com/logo.png", - * socialButtonsLayout: "top", - * }, - * }); - * ``` - * - * * ## Import * * This resource can be imported by specifying the Branding Theme ID. diff --git a/sdk/nodejs/client.ts b/sdk/nodejs/client.ts index bdda59e8..0403aeda 100644 --- a/sdk/nodejs/client.ts +++ b/sdk/nodejs/client.ts @@ -16,38 +16,18 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myClient = new auth0.Client("myClient", { - * addons: { - * samlp: { - * audience: "https://example.com/saml", - * createUpnClaim: false, - * issuer: "https://example.com", - * mapIdentities: false, - * mapUnknownClaimsAsIs: false, - * mappings: { - * email: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", - * name: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", - * }, - * nameIdentifierFormat: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", - * nameIdentifierProbes: ["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"], - * passthroughClaimsWithNoMapping: false, - * signingCert: `-----BEGIN PUBLIC KEY----- - * MIGf...bpP/t3 - * +JGNGIRMj1hF1rnb6QIDAQAB - * -----END PUBLIC KEY----- - * - * `, - * }, - * }, - * allowedLogoutUrls: ["https://example.com"], - * allowedOrigins: ["https://example.com"], + * const myClient = new auth0.Client("my_client", { + * name: "Application - Acceptance Test", + * description: "Test Applications Long Description", * appType: "non_interactive", - * callbacks: ["https://example.com/callback"], - * clientMetadata: { - * foo: "zoo", - * }, * customLoginPageOn: true, - * description: "Test Applications Long Description", + * isFirstParty: true, + * isTokenEndpointIpHeaderTrusted: true, + * oidcConformant: false, + * callbacks: ["https://example.com/callback"], + * allowedOrigins: ["https://example.com"], + * allowedLogoutUrls: ["https://example.com"], + * webOrigins: ["https://example.com"], * grantTypes: [ * "authorization_code", * "http://auth0.com/oauth/grant-type/password-realm", @@ -55,30 +35,50 @@ import * as utilities from "./utilities"; * "password", * "refresh_token", * ], - * isFirstParty: true, - * isTokenEndpointIpHeaderTrusted: true, + * clientMetadata: { + * foo: "zoo", + * }, * jwtConfiguration: { - * alg: "RS256", * lifetimeInSeconds: 300, + * secretEncoded: true, + * alg: "RS256", * scopes: { * foo: "bar", * }, - * secretEncoded: true, + * }, + * refreshToken: { + * leeway: 0, + * tokenLifetime: 2592000, + * rotationType: "rotating", + * expirationType: "expiring", * }, * mobile: { * ios: { - * appBundleIdentifier: "com.my.bundle.id", * teamId: "9JA89QQLNQ", + * appBundleIdentifier: "com.my.bundle.id", * }, * }, - * oidcConformant: false, - * refreshToken: { - * expirationType: "expiring", - * leeway: 0, - * rotationType: "rotating", - * tokenLifetime: 2592000, + * addons: { + * samlp: { + * audience: "https://example.com/saml", + * issuer: "https://example.com", + * mappings: { + * email: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", + * name: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", + * }, + * createUpnClaim: false, + * passthroughClaimsWithNoMapping: false, + * mapUnknownClaimsAsIs: false, + * mapIdentities: false, + * nameIdentifierFormat: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + * nameIdentifierProbes: ["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"], + * signingCert: `-----BEGIN PUBLIC KEY----- + * MIGf...bpP/t3 + * +JGNGIRMj1hF1rnb6QIDAQAB + * -----END PUBLIC KEY----- + * `, + * }, * }, - * webOrigins: ["https://example.com"], * }); * ``` * diff --git a/sdk/nodejs/clientCredentials.ts b/sdk/nodejs/clientCredentials.ts index 697b8226..5058956c 100644 --- a/sdk/nodejs/clientCredentials.ts +++ b/sdk/nodejs/clientCredentials.ts @@ -12,60 +12,6 @@ import * as utilities from "./utilities"; * > Refer to the client secret rotation guide * for instructions on how to rotate client secrets with zero downtime. * - * ## Example Usage - * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as auth0 from "@pulumi/auth0"; - * - * const myClient = new auth0.Client("myClient", { - * appType: "non_interactive", - * jwtConfiguration: { - * alg: "RS256", - * }, - * }); - * // Configuring client_secret_post as an authentication method. - * const testClientCredentials = new auth0.ClientCredentials("testClientCredentials", { - * clientId: myClient.id, - * authenticationMethod: "client_secret_post", - * }); - * // Configuring client_secret_basic as an authentication method. - * const testIndex_clientCredentialsClientCredentials = new auth0.ClientCredentials("testIndex/clientCredentialsClientCredentials", { - * clientId: myClient.id, - * authenticationMethod: "client_secret_basic", - * }); - * // Configuring none as an authentication method. - * const testAuth0Index_clientCredentialsClientCredentials = new auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials", { - * clientId: myClient.id, - * authenticationMethod: "none", - * }); - * // Configuring private_key_jwt as an authentication method. - * const testAuth0Index_clientCredentialsClientCredentials1 = new auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials1", { - * clientId: myClient.id, - * authenticationMethod: "private_key_jwt", - * privateKeyJwt: { - * credentials: [{ - * name: "Testing Credentials 1", - * credentialType: "public_key", - * algorithm: "RS256", - * parseExpiryFromCert: true, - * pem: `-----BEGIN CERTIFICATE----- - * MIIFWDCCA0ACCQDXqpBo3R...G9w0BAQsFADBuMQswCQYDVQQGEwJl - * -----END CERTIFICATE----- - * `, - * }], - * }, - * }); - * // Configuring the client_secret. - * const testAuth0Index_clientCredentialsClientCredentials2 = new auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials2", { - * clientId: myClient.id, - * authenticationMethod: "client_secret_basic", - * clientSecret: "LUFqPx+sRLjbL7peYRPFmFu-bbvE7u7og4YUNe_C345=683341", - * }); - * ``` - * - * * ## Import * * This resource can be imported by specifying the client ID. diff --git a/sdk/nodejs/connection.ts b/sdk/nodejs/connection.ts index 8fc6dd80..46d5a650 100644 --- a/sdk/nodejs/connection.ts +++ b/sdk/nodejs/connection.ts @@ -14,6 +14,77 @@ import * as utilities from "./utilities"; * * ## Example Usage * + * ### Auth0 Connection + * + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as auth0 from "@pulumi/auth0"; + * + * // This is an example of an Auth0 connection. + * const myConnection = new auth0.Connection("my_connection", { + * name: "Example-Connection", + * isDomainConnection: true, + * strategy: "auth0", + * metadata: { + * key1: "foo", + * key2: "bar", + * }, + * options: { + * passwordPolicy: "excellent", + * bruteForceProtection: true, + * enabledDatabaseCustomization: true, + * importMode: false, + * requiresUsername: true, + * disableSignup: false, + * customScripts: { + * get_user: ` function getByEmail(email, callback) { + * return callback(new Error("Whoops!")); + * } + * `, + * }, + * configuration: { + * foo: "bar", + * bar: "baz", + * }, + * upstreamParams: JSON.stringify({ + * screen_name: { + * alias: "login_hint", + * }, + * }), + * passwordHistories: [{ + * enable: true, + * size: 3, + * }], + * passwordNoPersonalInfo: { + * enable: true, + * }, + * passwordDictionary: { + * enable: true, + * dictionaries: [ + * "password", + * "admin", + * "1234", + * ], + * }, + * passwordComplexityOptions: { + * minLength: 12, + * }, + * validation: { + * username: { + * min: 10, + * max: 40, + * }, + * }, + * mfa: { + * active: true, + * returnEnrollSettings: true, + * }, + * }, + * }); + * ``` + * + * * ### Google OAuth2 Connection * * > Your Auth0 account may be pre-configured with a `google-oauth2` connection. @@ -23,18 +94,17 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const googleOauth2 = new auth0.Connection("googleOauth2", { + * // This is an example of a Google OAuth2 connection. + * const googleOauth2 = new auth0.Connection("google_oauth2", { + * name: "Google-OAuth2-Connection", + * strategy: "google-oauth2", * options: { + * clientId: "", + * clientSecret: "", * allowedAudiences: [ * "example.com", * "api.example.com", * ], - * clientId: "", - * clientSecret: "", - * nonPersistentAttrs: [ - * "ethnicity", - * "gender", - * ], * scopes: [ * "email", * "profile", @@ -42,27 +112,71 @@ import * as utilities from "./utilities"; * "youtube", * ], * setUserRootAttributes: "on_each_login", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "google-oauth2", * }); * ``` * * - * ### Facebook Connection + * ### Google Apps * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const facebook = new auth0.Connection("facebook", { + * const googleApps = new auth0.Connection("google_apps", { + * name: "connection-google-apps", + * isDomainConnection: false, + * strategy: "google-apps", + * showAsButton: false, * options: { - * clientId: "", - * clientSecret: "", + * clientId: "", + * clientSecret: "", + * domain: "example.com", + * tenantDomain: "example.com", + * domainAliases: [ + * "example.com", + * "api.example.com", + * ], + * apiEnableUsers: true, + * scopes: [ + * "ext_profile", + * "ext_groups", + * ], + * iconUrl: "https://example.com/assets/logo.png", + * upstreamParams: JSON.stringify({ + * screen_name: { + * alias: "login_hint", + * }, + * }), + * setUserRootAttributes: "on_each_login", * nonPersistentAttrs: [ * "ethnicity", * "gender", * ], + * }, + * }); + * ``` + * + * + * ### Facebook Connection + * + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as auth0 from "@pulumi/auth0"; + * + * // This is an example of a Facebook connection. + * const facebook = new auth0.Connection("facebook", { + * name: "Facebook-Connection", + * strategy: "facebook", + * options: { + * clientId: "", + * clientSecret: "", * scopes: [ * "public_profile", * "email", @@ -70,8 +184,11 @@ import * as utilities from "./utilities"; * "user_birthday", * ], * setUserRootAttributes: "on_each_login", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "facebook", * }); * ``` * @@ -83,26 +200,27 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // This is an example of an Apple connection. * const apple = new auth0.Connection("apple", { + * name: "Apple-Connection", + * strategy: "apple", * options: { * clientId: "", * clientSecret: `-----BEGIN PRIVATE KEY----- * MIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA - * -----END PRIVATE KEY----- - * `, + * -----END PRIVATE KEY-----`, + * teamId: "", * keyId: "", - * nonPersistentAttrs: [ - * "ethnicity", - * "gender", - * ], * scopes: [ * "email", * "name", * ], * setUserRootAttributes: "on_first_login", - * teamId: "", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "apple", * }); * ``` * @@ -114,23 +232,25 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // This is an example of an LinkedIn connection. * const linkedin = new auth0.Connection("linkedin", { + * name: "Linkedin-Connection", + * strategy: "linkedin", * options: { * clientId: "", * clientSecret: "", - * nonPersistentAttrs: [ - * "ethnicity", - * "gender", - * ], + * strategyVersion: 2, * scopes: [ * "basic_profile", * "profile", * "email", * ], * setUserRootAttributes: "on_each_login", - * strategyVersion: 2, + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "linkedin", * }); * ``` * @@ -142,14 +262,13 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // This is an example of an GitHub connection. * const github = new auth0.Connection("github", { + * name: "GitHub-Connection", + * strategy: "github", * options: { * clientId: "", * clientSecret: "", - * nonPersistentAttrs: [ - * "ethnicity", - * "gender", - * ], * scopes: [ * "email", * "profile", @@ -157,8 +276,11 @@ import * as utilities from "./utilities"; * "repo", * ], * setUserRootAttributes: "on_each_login", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "github", * }); * ``` * @@ -170,22 +292,24 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // This is an example of an SalesForce connection. * const salesforce = new auth0.Connection("salesforce", { + * name: "Salesforce-Connection", + * strategy: "salesforce", * options: { * clientId: "", * clientSecret: "", * communityBaseUrl: "https://salesforce.example.com", - * nonPersistentAttrs: [ - * "ethnicity", - * "gender", - * ], * scopes: [ * "openid", * "email", * ], * setUserRootAttributes: "on_first_login", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "salesforce", * }); * ``` * @@ -199,71 +323,126 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // This is an example of an OAuth2 connection. * const oauth2 = new auth0.Connection("oauth2", { + * name: "OAuth2-Connection", + * strategy: "oauth2", * options: { - * authorizationEndpoint: "https://auth.example.com/oauth2/authorize", * clientId: "", * clientSecret: "", - * iconUrl: "https://auth.example.com/assets/logo.png", - * nonPersistentAttrs: [ - * "ethnicity", - * "gender", - * ], - * pkceEnabled: true, * scopes: [ * "basic_profile", * "profile", * "email", * ], + * tokenEndpoint: "https://auth.example.com/oauth2/token", + * authorizationEndpoint: "https://auth.example.com/oauth2/authorize", + * pkceEnabled: true, + * iconUrl: "https://auth.example.com/assets/logo.png", * scripts: { * fetchUserProfile: ` function fetchUserProfile(accessToken, context, callback) { * return callback(new Error("Whoops!")); * } - * * `, * }, * setUserRootAttributes: "on_each_login", - * tokenEndpoint: "https://auth.example.com/oauth2/token", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "oauth2", * }); * ``` * * - * ### SMS Connection - * - * > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms". + * ### Active Directory (AD) * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const sms = new auth0.Connection("sms", { - * isDomainConnection: false, + * const ad = new auth0.Connection("ad", { + * name: "connection-active-directory", + * displayName: "Active Directory Connection", + * strategy: "ad", + * showAsButton: true, * options: { + * disableSelfServiceChangePassword: true, * bruteForceProtection: true, - * disableSignup: false, - * forwardRequestInfo: true, - * from: "+15555555555", - * gatewayAuthentication: { - * audience: "https://somewhere.com/sms-gateway", - * method: "bearer", - * secret: "4e2680bb74ec2ae24736476dd37ed6c2", - * secretBase64Encoded: false, - * subject: "test.us.auth0.com:sms", - * }, - * gatewayUrl: "https://somewhere.com/sms-gateway", - * name: "sms", - * provider: "sms_gateway", - * syntax: "md_with_macros", - * template: "@@password@@", - * totp: { - * length: 6, - * timeStep: 300, - * }, + * tenantDomain: "example.com", + * iconUrl: "https://example.com/assets/logo.png", + * domainAliases: [ + * "example.com", + * "api.example.com", + * ], + * ips: [ + * "192.168.1.1", + * "192.168.1.2", + * ], + * setUserRootAttributes: "on_each_login", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], + * upstreamParams: JSON.stringify({ + * screen_name: { + * alias: "login_hint", + * }, + * }), + * useCertAuth: false, + * useKerberos: false, + * disableCache: false, + * }, + * }); + * ``` + * + * + * ### Azure AD Connection + * + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as auth0 from "@pulumi/auth0"; + * + * const azureAd = new auth0.Connection("azure_ad", { + * name: "connection-azure-ad", + * strategy: "waad", + * showAsButton: true, + * options: { + * identityApi: "azure-active-directory-v1.0", + * clientId: "123456", + * clientSecret: "123456", + * appId: "app-id-123", + * tenantDomain: "example.onmicrosoft.com", + * domain: "example.onmicrosoft.com", + * domainAliases: [ + * "example.com", + * "api.example.com", + * ], + * iconUrl: "https://example.onmicrosoft.com/assets/logo.png", + * useWsfed: false, + * waadProtocol: "openid-connect", + * waadCommonEndpoint: false, + * maxGroupsToRetrieve: "250", + * apiEnableUsers: true, + * scopes: [ + * "basic_profile", + * "ext_groups", + * "ext_profile", + * ], + * setUserRootAttributes: "on_each_login", + * shouldTrustEmailVerifiedConnection: "never_set_emails_as_verified", + * upstreamParams: JSON.stringify({ + * screen_name: { + * alias: "login_hint", + * }, + * }), + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], * }, - * strategy: "sms", * }); * ``` * @@ -277,27 +456,110 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const passwordlessEmail = new auth0.Connection("passwordlessEmail", { + * // This is an example of an Email connection. + * const passwordlessEmail = new auth0.Connection("passwordless_email", { + * strategy: "email", + * name: "email", * options: { - * authParams: { - * responseType: "code", - * scope: "openid email profile offline_access", - * }, - * bruteForceProtection: true, - * disableSignup: false, - * from: "{{ application.name }} ", * name: "email", - * nonPersistentAttrs: [], - * setUserRootAttributes: "on_each_login", + * from: "{{ application.name }} ", * subject: "Welcome to {{ application.name }}", * syntax: "liquid", * template: "This is the body of the email", + * disableSignup: false, + * bruteForceProtection: true, + * setUserRootAttributes: "on_each_login", + * nonPersistentAttrs: [], + * authParams: { + * scope: "openid email profile offline_access", + * response_type: "code", + * }, * totp: { - * length: 6, * timeStep: 300, + * length: 6, + * }, + * }, + * }); + * ``` + * + * + * ### SAML Connection + * + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as auth0 from "@pulumi/auth0"; + * + * // This is an example of a SAML connection. + * const samlp = new auth0.Connection("samlp", { + * name: "SAML-Connection", + * strategy: "samlp", + * options: { + * debug: false, + * signingCert: "", + * signInEndpoint: "https://saml.provider/sign_in", + * signOutEndpoint: "https://saml.provider/sign_out", + * disableSignOut: true, + * tenantDomain: "example.com", + * domainAliases: [ + * "example.com", + * "alias.example.com", + * ], + * protocolBinding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + * requestTemplate: ` + * @@Issuer@@ + * `, + * userIdAttribute: "https://saml.provider/imi/ns/identity-200810", + * signatureAlgorithm: "rsa-sha256", + * digestAlgorithm: "sha256", + * iconUrl: "https://saml.provider/assets/logo.png", + * entityId: "", + * metadataXml: ` + * + * + * + * + * + * + * `, + * metadataUrl: "https://saml.provider/imi/ns/FederationMetadata.xml", + * fieldsMap: JSON.stringify({ + * name: [ + * "name", + * "nameidentifier", + * ], + * email: [ + * "emailaddress", + * "nameidentifier", + * ], + * family_name: "surname", + * }), + * signingKey: { + * key: `-----BEGIN PRIVATE KEY----- + * ...{your private key here}... + * -----END PRIVATE KEY-----`, + * cert: `-----BEGIN CERTIFICATE----- + * ...{your public key cert here}... + * -----END CERTIFICATE-----`, + * }, + * decryptionKey: { + * key: `-----BEGIN PRIVATE KEY----- + * ...{your private key here}... + * -----END PRIVATE KEY-----`, + * cert: `-----BEGIN CERTIFICATE----- + * ...{your public key cert here}... + * -----END CERTIFICATE-----`, + * }, + * idpInitiated: { + * clientId: "client_id", + * clientProtocol: "samlp", + * clientAuthorizeQuery: "type=code&timeout=30", * }, * }, - * strategy: "email", * }); * ``` * @@ -309,22 +571,138 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // This is an example of a WindowsLive connection. * const windowslive = new auth0.Connection("windowslive", { + * name: "Windowslive-Connection", + * strategy: "windowslive", * options: { * clientId: "", * clientSecret: "", + * strategyVersion: 2, + * scopes: [ + * "signin", + * "graph_user", + * ], + * setUserRootAttributes: "on_first_login", * nonPersistentAttrs: [ * "ethnicity", * "gender", * ], + * }, + * }); + * ``` + * + * + * ### OIDC Connection + * + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as auth0 from "@pulumi/auth0"; + * + * // This is an example of an OIDC connection. + * const oidc = new auth0.Connection("oidc", { + * name: "oidc-connection", + * displayName: "OIDC Connection", + * strategy: "oidc", + * showAsButton: false, + * options: { + * clientId: "1234567", + * clientSecret: "1234567", + * domainAliases: ["example.com"], + * tenantDomain: "", + * iconUrl: "https://example.com/assets/logo.png", + * type: "back_channel", + * issuer: "https://www.paypalobjects.com", + * jwksUri: "https://api.paypal.com/v1/oauth2/certs", + * discoveryUrl: "https://www.paypalobjects.com/.well-known/openid-configuration", + * tokenEndpoint: "https://api.paypal.com/v1/oauth2/token", + * userinfoEndpoint: "https://api.paypal.com/v1/oauth2/token/userinfo", + * authorizationEndpoint: "https://www.paypal.com/signin/authorize", * scopes: [ - * "signin", - * "graph_user", + * "openid", + * "email", * ], * setUserRootAttributes: "on_first_login", - * strategyVersion: 2, + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], + * connectionSettings: { + * pkce: "auto", + * }, + * attributeMap: { + * mappingMode: "use_map", + * userinfoScope: "openid email profile groups", + * attributes: JSON.stringify({ + * name: "${context.tokenset.name}", + * email: "${context.tokenset.email}", + * email_verified: "${context.tokenset.email_verified}", + * nickname: "${context.tokenset.nickname}", + * picture: "${context.tokenset.picture}", + * given_name: "${context.tokenset.given_name}", + * family_name: "${context.tokenset.family_name}", + * }), + * }, + * }, + * }); + * ``` + * + * + * ### Okta Connection + * + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as auth0 from "@pulumi/auth0"; + * + * // This is an example of an Okta Workforce connection. + * const okta = new auth0.Connection("okta", { + * name: "okta-connection", + * displayName: "Okta Workforce Connection", + * strategy: "okta", + * showAsButton: false, + * options: { + * clientId: "1234567", + * clientSecret: "1234567", + * domain: "example.okta.com", + * domainAliases: ["example.com"], + * issuer: "https://example.okta.com", + * jwksUri: "https://example.okta.com/oauth2/v1/keys", + * tokenEndpoint: "https://example.okta.com/oauth2/v1/token", + * userinfoEndpoint: "https://example.okta.com/oauth2/v1/userinfo", + * authorizationEndpoint: "https://example.okta.com/oauth2/v1/authorize", + * scopes: [ + * "openid", + * "email", + * ], + * setUserRootAttributes: "on_first_login", + * nonPersistentAttrs: [ + * "ethnicity", + * "gender", + * ], + * upstreamParams: JSON.stringify({ + * screen_name: { + * alias: "login_hint", + * }, + * }), + * connectionSettings: { + * pkce: "auto", + * }, + * attributeMap: { + * mappingMode: "basic_profile", + * userinfoScope: "openid email profile groups", + * attributes: JSON.stringify({ + * name: "${context.tokenset.name}", + * email: "${context.tokenset.email}", + * email_verified: "${context.tokenset.email_verified}", + * nickname: "${context.tokenset.nickname}", + * picture: "${context.tokenset.picture}", + * given_name: "${context.tokenset.given_name}", + * family_name: "${context.tokenset.family_name}", + * }), + * }, * }, - * strategy: "windowslive", * }); * ``` * diff --git a/sdk/nodejs/connectionClient.ts b/sdk/nodejs/connectionClient.ts index 143b54f2..70257ab6 100644 --- a/sdk/nodejs/connectionClient.ts +++ b/sdk/nodejs/connectionClient.ts @@ -19,11 +19,14 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myConn = new auth0.Connection("myConn", {strategy: "auth0"}); - * const myClient = new auth0.Client("myClient", {}); + * const myConn = new auth0.Connection("my_conn", { + * name: "My-Auth0-Connection", + * strategy: "auth0", + * }); + * const myClient = new auth0.Client("my_client", {name: "My-Auth0-Client"}); * // One connection to one client association. * // To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. - * const myConnClientAssoc = new auth0.ConnectionClient("myConnClientAssoc", { + * const myConnClientAssoc = new auth0.ConnectionClient("my_conn_client_assoc", { * connectionId: myConn.id, * clientId: myClient.id, * }); diff --git a/sdk/nodejs/connectionClients.ts b/sdk/nodejs/connectionClients.ts index 6e57e7d7..fe0395a4 100644 --- a/sdk/nodejs/connectionClients.ts +++ b/sdk/nodejs/connectionClients.ts @@ -19,12 +19,15 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myConn = new auth0.Connection("myConn", {strategy: "auth0"}); - * const myFirstClient = new auth0.Client("myFirstClient", {}); - * const mySecondClient = new auth0.Client("mySecondClient", {}); + * const myConn = new auth0.Connection("my_conn", { + * name: "My-Auth0-Connection", + * strategy: "auth0", + * }); + * const myFirstClient = new auth0.Client("my_first_client", {name: "My-First-Auth0-Client"}); + * const mySecondClient = new auth0.Client("my_second_client", {name: "My-Second-Auth0-Client"}); * // One connection to many clients association. * // To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. - * const myConnClientsAssoc = new auth0.ConnectionClients("myConnClientsAssoc", { + * const myConnClientsAssoc = new auth0.ConnectionClients("my_conn_clients_assoc", { * connectionId: myConn.id, * enabledClients: [ * myFirstClient.id, diff --git a/sdk/nodejs/customDomain.ts b/sdk/nodejs/customDomain.ts index 1d1d64fd..91655e08 100644 --- a/sdk/nodejs/customDomain.ts +++ b/sdk/nodejs/customDomain.ts @@ -16,7 +16,7 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myCustomDomain = new auth0.CustomDomain("myCustomDomain", { + * const myCustomDomain = new auth0.CustomDomain("my_custom_domain", { * domain: "auth.example.com", * type: "auth0_managed_certs", * }); diff --git a/sdk/nodejs/emailProvider.ts b/sdk/nodejs/emailProvider.ts index 18b0e421..2009c8cd 100644 --- a/sdk/nodejs/emailProvider.ts +++ b/sdk/nodejs/emailProvider.ts @@ -9,44 +9,6 @@ import * as utilities from "./utilities"; /** * With Auth0, you can have standard welcome, password reset, and account verification email-based workflows built right into Auth0. This resource allows you to configure email providers, so you can route all emails that are part of Auth0's authentication workflows through the supported high-volume email service of your choice. * - * ## Example Usage - * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as auth0 from "@pulumi/auth0"; - * - * // This is an example on how to set up the email provider with Amazon SES. - * const amazonSesEmailProvider = new auth0.EmailProvider("amazonSesEmailProvider", { - * credentials: { - * accessKeyId: "AKIAXXXXXXXXXXXXXXXX", - * region: "us-east-1", - * secretAccessKey: "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - * }, - * defaultFromAddress: "accounts@example.com", - * enabled: true, - * }); - * // This is an example on how to set up the email provider with Sendgrid. - * const sendgridEmailProvider = new auth0.EmailProvider("sendgridEmailProvider", { - * credentials: { - * apiKey: "secretAPIKey", - * }, - * defaultFromAddress: "accounts@example.com", - * enabled: true, - * }); - * // This is an example on how to set up the email provider with MS365. - * const smtpEmailProvider = new auth0.EmailProvider("smtpEmailProvider", { - * credentials: { - * ms365ClientId: "ms365_client_id", - * ms365ClientSecret: "ms365_client_secret", - * ms365TenantId: "ms365_tenant_id", - * }, - * defaultFromAddress: "accounts@example.com", - * enabled: true, - * }); - * ``` - * - * * ## Import * * As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/nodejs/emailTemplate.ts b/sdk/nodejs/emailTemplate.ts index 84b2a815..e3e9d832 100644 --- a/sdk/nodejs/emailTemplate.ts +++ b/sdk/nodejs/emailTemplate.ts @@ -14,7 +14,8 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myEmailProvider = new auth0.EmailProvider("myEmailProvider", { + * const myEmailProvider = new auth0.EmailProvider("my_email_provider", { + * name: "ses", * enabled: true, * defaultFromAddress: "accounts@example.com", * credentials: { @@ -23,7 +24,7 @@ import * as utilities from "./utilities"; * region: "us-east-1", * }, * }); - * const myEmailTemplate = new auth0.EmailTemplate("myEmailTemplate", { + * const myEmailTemplate = new auth0.EmailTemplate("my_email_template", { * template: "welcome_email", * body: "

Welcome!

", * from: "welcome@example.com", diff --git a/sdk/nodejs/getClient.ts b/sdk/nodejs/getClient.ts index 4ddb3de2..86313cf8 100644 --- a/sdk/nodejs/getClient.ts +++ b/sdk/nodejs/getClient.ts @@ -16,9 +16,11 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Client loaded using its name. * const some-client-by-name = auth0.getClient({ * name: "Name of my Application", * }); + * // An Auth0 Client loaded using its ID. * const some-client-by-id = auth0.getClient({ * clientId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); @@ -207,9 +209,11 @@ export interface GetClientResult { * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Client loaded using its name. * const some-client-by-name = auth0.getClient({ * name: "Name of my Application", * }); + * // An Auth0 Client loaded using its ID. * const some-client-by-id = auth0.getClient({ * clientId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); diff --git a/sdk/nodejs/getConnection.ts b/sdk/nodejs/getConnection.ts index 8bf46f9e..16527352 100644 --- a/sdk/nodejs/getConnection.ts +++ b/sdk/nodejs/getConnection.ts @@ -16,9 +16,11 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Connection loaded using its name. * const some-connection-by-name = auth0.getConnection({ * name: "Acceptance-Test-Connection-{{.testName}}", * }); + * // An Auth0 Connection loaded using its ID. * const some-connection-by-id = auth0.getConnection({ * connectionId: "con_abcdefghkijklmnopqrstuvwxyz0123456789", * }); @@ -105,9 +107,11 @@ export interface GetConnectionResult { * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Connection loaded using its name. * const some-connection-by-name = auth0.getConnection({ * name: "Acceptance-Test-Connection-{{.testName}}", * }); + * // An Auth0 Connection loaded using its ID. * const some-connection-by-id = auth0.getConnection({ * connectionId: "con_abcdefghkijklmnopqrstuvwxyz0123456789", * }); diff --git a/sdk/nodejs/getOrganization.ts b/sdk/nodejs/getOrganization.ts index b8f08401..03c58bb8 100644 --- a/sdk/nodejs/getOrganization.ts +++ b/sdk/nodejs/getOrganization.ts @@ -16,9 +16,11 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Organization loaded using its name. * const some-organization-by-name = auth0.getOrganization({ * name: "my-org", * }); + * // An Auth0 Organization loaded using its ID. * const some-organization-by-id = auth0.getOrganization({ * organizationId: "org_abcdefghkijklmnopqrstuvwxyz0123456789", * }); @@ -93,9 +95,11 @@ export interface GetOrganizationResult { * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Organization loaded using its name. * const some-organization-by-name = auth0.getOrganization({ * name: "my-org", * }); + * // An Auth0 Organization loaded using its ID. * const some-organization-by-id = auth0.getOrganization({ * organizationId: "org_abcdefghkijklmnopqrstuvwxyz0123456789", * }); diff --git a/sdk/nodejs/getResourceServer.ts b/sdk/nodejs/getResourceServer.ts index a5ecc5c4..d463e60e 100644 --- a/sdk/nodejs/getResourceServer.ts +++ b/sdk/nodejs/getResourceServer.ts @@ -16,9 +16,11 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Resource Server loaded using its identifier. * const some-resource-server-by-identifier = auth0.getResourceServer({ * identifier: "https://my-api.com/v1", * }); + * // An Auth0 Resource Server loaded using its ID. * const some-resource-server-by-id = auth0.getResourceServer({ * resourceServerId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); @@ -120,9 +122,11 @@ export interface GetResourceServerResult { * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Resource Server loaded using its identifier. * const some-resource-server-by-identifier = auth0.getResourceServer({ * identifier: "https://my-api.com/v1", * }); + * // An Auth0 Resource Server loaded using its ID. * const some-resource-server-by-id = auth0.getResourceServer({ * resourceServerId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); diff --git a/sdk/nodejs/getRole.ts b/sdk/nodejs/getRole.ts index 1ec63955..128c4f22 100644 --- a/sdk/nodejs/getRole.ts +++ b/sdk/nodejs/getRole.ts @@ -16,9 +16,11 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Role loaded using its name. * const some-role-by-name = auth0.getRole({ * name: "my-role", * }); + * // An Auth0 Role loaded using its ID. * const some-role-by-id = auth0.getRole({ * roleId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); @@ -85,9 +87,11 @@ export interface GetRoleResult { * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 Role loaded using its name. * const some-role-by-name = auth0.getRole({ * name: "my-role", * }); + * // An Auth0 Role loaded using its ID. * const some-role-by-id = auth0.getRole({ * roleId: "abcdefghkijklmnopqrstuvwxyz0123456789", * }); diff --git a/sdk/nodejs/getUser.ts b/sdk/nodejs/getUser.ts index ea79c4ca..095003e9 100644 --- a/sdk/nodejs/getUser.ts +++ b/sdk/nodejs/getUser.ts @@ -16,6 +16,7 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 User loaded using its ID. * const myUser = auth0.getUser({ * userId: "auth0|34fdr23fdsfdfsf", * }); @@ -135,6 +136,7 @@ export interface GetUserResult { * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * + * // An Auth0 User loaded using its ID. * const myUser = auth0.getUser({ * userId: "auth0|34fdr23fdsfdfsf", * }); diff --git a/sdk/nodejs/guardian.ts b/sdk/nodejs/guardian.ts index f884362a..80443b56 100644 --- a/sdk/nodejs/guardian.ts +++ b/sdk/nodejs/guardian.ts @@ -16,17 +16,21 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myGuardian = new auth0.Guardian("myGuardian", { - * duo: { - * enabled: true, - * hostname: "api-hostname", - * integrationKey: "someKey", - * secretKey: "someSecret", - * }, + * const myGuardian = new auth0.Guardian("my_guardian", { + * policy: "all-applications", * email: true, * otp: true, + * recoveryCode: true, + * webauthnPlatform: { + * enabled: true, + * }, + * webauthnRoaming: { + * enabled: true, + * userVerification: "required", + * }, * phone: { * enabled: true, + * provider: "auth0", * messageTypes: [ * "sms", * "voice", @@ -35,10 +39,10 @@ import * as utilities from "./utilities"; * enrollmentMessage: "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", * verificationMessage: "{{code}} is your verification code for {{tenant.friendly_name}}.", * }, - * provider: "auth0", * }, - * policy: "all-applications", * push: { + * enabled: true, + * provider: "sns", * amazonSns: { * awsAccessKeyId: "test1", * awsRegion: "us-west-1", @@ -51,16 +55,12 @@ import * as utilities from "./utilities"; * appleAppLink: "https://itunes.apple.com/us/app/my-app/id123121", * googleAppLink: "https://play.google.com/store/apps/details?id=com.my.app", * }, - * enabled: true, - * provider: "sns", - * }, - * recoveryCode: true, - * webauthnPlatform: { - * enabled: true, * }, - * webauthnRoaming: { + * duo: { * enabled: true, - * userVerification: "required", + * integrationKey: "someKey", + * secretKey: "someSecret", + * hostname: "api-hostname", * }, * }); * ``` diff --git a/sdk/nodejs/hook.ts b/sdk/nodejs/hook.ts index 38d953c0..f548269b 100644 --- a/sdk/nodejs/hook.ts +++ b/sdk/nodejs/hook.ts @@ -16,20 +16,20 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myHook = new auth0.Hook("myHook", { - * dependencies: { - * auth0: "2.30.0", - * }, - * enabled: true, + * const myHook = new auth0.Hook("my_hook", { + * name: "My Pre User Registration Hook", * script: ` function (user, context, callback) { * callback(null, { user }); * } - * * `, + * triggerId: "pre-user-registration", + * enabled: true, * secrets: { * foo: "bar", * }, - * triggerId: "pre-user-registration", + * dependencies: { + * auth0: "2.30.0", + * }, * }); * ``` * diff --git a/sdk/nodejs/logStream.ts b/sdk/nodejs/logStream.ts index d1fea349..5c973b82 100644 --- a/sdk/nodejs/logStream.ts +++ b/sdk/nodejs/logStream.ts @@ -17,37 +17,39 @@ import * as utilities from "./utilities"; * import * as auth0 from "@pulumi/auth0"; * * // This is an example of an http log stream. - * const myWebhook = new auth0.LogStream("myWebhook", { + * const myWebhook = new auth0.LogStream("my_webhook", { + * name: "HTTP log stream", + * type: "http", * filters: [ * { - * name: "auth.login.fail", * type: "category", + * name: "auth.login.fail", * }, * { - * name: "auth.signup.fail", * type: "category", + * name: "auth.signup.fail", * }, * ], * sink: { - * httpAuthorization: "AKIAXXXXXXXXXXXXXXXX", - * httpContentFormat: "JSONOBJECT", + * httpEndpoint: "https://example.com/logs", * httpContentType: "application/json", + * httpContentFormat: "JSONOBJECT", + * httpAuthorization: "AKIAXXXXXXXXXXXXXXXX", * httpCustomHeaders: [{ * header: "foo", * value: "bar", * }], - * httpEndpoint: "https://example.com/logs", * }, - * type: "http", * }); * // This is an example of an Amazon EventBridge log stream. - * const exampleAws = new auth0.LogStream("exampleAws", { + * const exampleAws = new auth0.LogStream("example_aws", { + * name: "AWS Eventbridge", + * type: "eventbridge", + * status: "active", * sink: { * awsAccountId: "my_account_id", * awsRegion: "us-east-2", * }, - * status: "active", - * type: "eventbridge", * }); * ``` * diff --git a/sdk/nodejs/organization.ts b/sdk/nodejs/organization.ts index e8af5590..d0b207cb 100644 --- a/sdk/nodejs/organization.ts +++ b/sdk/nodejs/organization.ts @@ -22,15 +22,16 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myOrganization = new auth0.Organization("myOrganization", { + * const myOrganization = new auth0.Organization("my_organization", { + * name: "auth0-inc", + * displayName: "Auth0 Inc.", * branding: { + * logoUrl: "https://example.com/assets/icons/icon.png", * colors: { - * pageBackground: "#e1e1e1", * primary: "#f2f2f2", + * page_background: "#e1e1e1", * }, - * logoUrl: "https://example.com/assets/icons/icon.png", * }, - * displayName: "Auth0 Inc.", * }); * ``` * diff --git a/sdk/nodejs/organizationConnection.ts b/sdk/nodejs/organizationConnection.ts index e9358d0c..19838648 100644 --- a/sdk/nodejs/organizationConnection.ts +++ b/sdk/nodejs/organizationConnection.ts @@ -19,9 +19,15 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myConnection = new auth0.Connection("myConnection", {strategy: "auth0"}); - * const myOrganization = new auth0.Organization("myOrganization", {displayName: "My Organization"}); - * const myOrgConn = new auth0.OrganizationConnection("myOrgConn", { + * const myConnection = new auth0.Connection("my_connection", { + * name: "My Connection", + * strategy: "auth0", + * }); + * const myOrganization = new auth0.Organization("my_organization", { + * name: "my-organization", + * displayName: "My Organization", + * }); + * const myOrgConn = new auth0.OrganizationConnection("my_org_conn", { * organizationId: myOrganization.id, * connectionId: myConnection.id, * assignMembershipOnLogin: true, diff --git a/sdk/nodejs/organizationConnections.ts b/sdk/nodejs/organizationConnections.ts index 1d7ac6fc..2f3ddc6a 100644 --- a/sdk/nodejs/organizationConnections.ts +++ b/sdk/nodejs/organizationConnections.ts @@ -21,9 +21,18 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myConnection_1 = new auth0.Connection("myConnection-1", {strategy: "auth0"}); - * const myConnection_2 = new auth0.Connection("myConnection-2", {strategy: "auth0"}); - * const myOrganization = new auth0.Organization("myOrganization", {displayName: "My Organization"}); + * const myConnection_1 = new auth0.Connection("my_connection-1", { + * name: "My Connection 1", + * strategy: "auth0", + * }); + * const myConnection_2 = new auth0.Connection("my_connection-2", { + * name: "My Connection 2", + * strategy: "auth0", + * }); + * const myOrganization = new auth0.Organization("my_organization", { + * name: "my-organization", + * displayName: "My Organization", + * }); * const one_to_many = new auth0.OrganizationConnections("one-to-many", { * organizationId: myOrganization.id, * enabledConnections: [ diff --git a/sdk/nodejs/organizationMember.ts b/sdk/nodejs/organizationMember.ts index 2cc13903..0b6faa61 100644 --- a/sdk/nodejs/organizationMember.ts +++ b/sdk/nodejs/organizationMember.ts @@ -24,8 +24,11 @@ import * as utilities from "./utilities"; * emailVerified: true, * password: "MyPass123$", * }); - * const myOrg = new auth0.Organization("myOrg", {displayName: "Admin"}); - * const myOrgMember = new auth0.OrganizationMember("myOrgMember", { + * const myOrg = new auth0.Organization("my_org", { + * name: "org-admin", + * displayName: "Admin", + * }); + * const myOrgMember = new auth0.OrganizationMember("my_org_member", { * organizationId: myOrg.id, * userId: user.id, * }); diff --git a/sdk/nodejs/organizationMemberRole.ts b/sdk/nodejs/organizationMemberRole.ts index 8f72d365..cf70df7e 100644 --- a/sdk/nodejs/organizationMemberRole.ts +++ b/sdk/nodejs/organizationMemberRole.ts @@ -14,15 +14,18 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const reader = new auth0.Role("reader", {}); - * const writer = new auth0.Role("writer", {}); + * const reader = new auth0.Role("reader", {name: "Reader"}); + * const writer = new auth0.Role("writer", {name: "Writer"}); * const user = new auth0.User("user", { * connectionName: "Username-Password-Authentication", * email: "test-user@auth0.com", * password: "MyPass123$", * }); - * const myOrg = new auth0.Organization("myOrg", {displayName: "Some Org"}); - * const myOrgMember = new auth0.OrganizationMember("myOrgMember", { + * const myOrg = new auth0.Organization("my_org", { + * name: "some-org", + * displayName: "Some Org", + * }); + * const myOrgMember = new auth0.OrganizationMember("my_org_member", { * organizationId: myOrg.id, * userId: user.id, * }); diff --git a/sdk/nodejs/organizationMemberRoles.ts b/sdk/nodejs/organizationMemberRoles.ts index afd549c9..ce207ac2 100644 --- a/sdk/nodejs/organizationMemberRoles.ts +++ b/sdk/nodejs/organizationMemberRoles.ts @@ -14,19 +14,22 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const reader = new auth0.Role("reader", {}); - * const writer = new auth0.Role("writer", {}); + * const reader = new auth0.Role("reader", {name: "Reader"}); + * const writer = new auth0.Role("writer", {name: "Writer"}); * const user = new auth0.User("user", { * connectionName: "Username-Password-Authentication", * email: "test-user@auth0.com", * password: "MyPass123$", * }); - * const myOrg = new auth0.Organization("myOrg", {displayName: "Some Org"}); - * const myOrgMember = new auth0.OrganizationMember("myOrgMember", { + * const myOrg = new auth0.Organization("my_org", { + * name: "some-org", + * displayName: "Some Org", + * }); + * const myOrgMember = new auth0.OrganizationMember("my_org_member", { * organizationId: myOrg.id, * userId: user.id, * }); - * const myOrgMemberRoles = new auth0.OrganizationMemberRoles("myOrgMemberRoles", { + * const myOrgMemberRoles = new auth0.OrganizationMemberRoles("my_org_member_roles", { * organizationId: myOrg.id, * userId: user.id, * roles: [ diff --git a/sdk/nodejs/organizationMembers.ts b/sdk/nodejs/organizationMembers.ts index 9ebf1ff9..8c1c45e5 100644 --- a/sdk/nodejs/organizationMembers.ts +++ b/sdk/nodejs/organizationMembers.ts @@ -19,18 +19,21 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const user1 = new auth0.User("user1", { + * const user1 = new auth0.User("user_1", { * connectionName: "Username-Password-Authentication", * email: "myuser1@auth0.com", * password: "MyPass123$", * }); - * const user2 = new auth0.User("user2", { + * const user2 = new auth0.User("user_2", { * connectionName: "Username-Password-Authentication", * email: "myuser2@auth0.com", * password: "MyPass123$", * }); - * const myOrg = new auth0.Organization("myOrg", {displayName: "Some Organization"}); - * const myMembers = new auth0.OrganizationMembers("myMembers", { + * const myOrg = new auth0.Organization("my_org", { + * name: "some-org", + * displayName: "Some Organization", + * }); + * const myMembers = new auth0.OrganizationMembers("my_members", { * organizationId: myOrg.id, * members: [ * user1.id, diff --git a/sdk/nodejs/pages.ts b/sdk/nodejs/pages.ts index 8409ef18..1b716308 100644 --- a/sdk/nodejs/pages.ts +++ b/sdk/nodejs/pages.ts @@ -16,23 +16,23 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myPages = new auth0.Pages("myPages", { + * const myPages = new auth0.Pages("my_pages", { + * login: { + * enabled: true, + * html: "My Custom Login Page", + * }, * changePassword: { * enabled: true, * html: "My Custom Reset Password Page", * }, - * error: { - * html: "My Custom Error Page", - * showLogLink: true, - * url: "https://example.com", - * }, * guardianMfa: { * enabled: true, * html: "My Custom MFA Page", * }, - * login: { - * enabled: true, - * html: "My Custom Login Page", + * error: { + * showLogLink: true, + * html: "My Custom Error Page", + * url: "https://example.com", * }, * }); * ``` diff --git a/sdk/nodejs/prompt.ts b/sdk/nodejs/prompt.ts index b433453e..c777fef7 100644 --- a/sdk/nodejs/prompt.ts +++ b/sdk/nodejs/prompt.ts @@ -14,9 +14,9 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myPrompt = new auth0.Prompt("myPrompt", { - * identifierFirst: false, + * const myPrompt = new auth0.Prompt("my_prompt", { * universalLoginExperience: "new", + * identifierFirst: false, * webauthnPlatformFirstFactor: true, * }); * ``` diff --git a/sdk/nodejs/promptPartials.ts b/sdk/nodejs/promptPartials.ts index c40faf2c..cea5e498 100644 --- a/sdk/nodejs/promptPartials.ts +++ b/sdk/nodejs/promptPartials.ts @@ -14,14 +14,14 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myLoginPromptPartials = new auth0.PromptPartials("myLoginPromptPartials", { - * formContentEnd: "
Updated Form Content End
", + * const myLoginPromptPartials = new auth0.PromptPartials("my_login_prompt_partials", { + * prompt: "login", * formContentStart: "
Updated Form Content Start
", - * formFooterEnd: "
Updated Footer End
", + * formContentEnd: "
Updated Form Content End
", * formFooterStart: "
Updated Footer Start
", - * prompt: "login", - * secondaryActionsEnd: "
Updated Secondary Actions End
", + * formFooterEnd: "
Updated Footer End
", * secondaryActionsStart: "
Updated Secondary Actions Start
", + * secondaryActionsEnd: "
Updated Secondary Actions End
", * }); * ``` * diff --git a/sdk/nodejs/resourceServer.ts b/sdk/nodejs/resourceServer.ts index 4b415a86..3a5d55d1 100644 --- a/sdk/nodejs/resourceServer.ts +++ b/sdk/nodejs/resourceServer.ts @@ -14,12 +14,13 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myResourceServer = new auth0.ResourceServer("myResourceServer", { - * allowOfflineAccess: true, + * const myResourceServer = new auth0.ResourceServer("my_resource_server", { + * name: "Example Resource Server (Managed by Terraform)", * identifier: "https://api.example.com", * signingAlg: "RS256", - * skipConsentForVerifiableFirstPartyClients: true, + * allowOfflineAccess: true, * tokenLifetime: 8600, + * skipConsentForVerifiableFirstPartyClients: true, * }); * ``` * diff --git a/sdk/nodejs/resourceServerScope.ts b/sdk/nodejs/resourceServerScope.ts index 6343dcbe..6dc029ce 100644 --- a/sdk/nodejs/resourceServerScope.ts +++ b/sdk/nodejs/resourceServerScope.ts @@ -18,12 +18,15 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const resourceServer = new auth0.ResourceServer("resourceServer", {identifier: "https://api.example.com"}); - * const readPosts = new auth0.ResourceServerScope("readPosts", { + * const resourceServer = new auth0.ResourceServer("resource_server", { + * name: "Example Resource Server (Managed by Terraform)", + * identifier: "https://api.example.com", + * }); + * const readPosts = new auth0.ResourceServerScope("read_posts", { * resourceServerIdentifier: resourceServer.identifier, * scope: "read:posts", * }); - * const writePosts = new auth0.ResourceServerScope("writePosts", { + * const writePosts = new auth0.ResourceServerScope("write_posts", { * resourceServerIdentifier: resourceServer.identifier, * scope: "write:posts", * }); diff --git a/sdk/nodejs/resourceServerScopes.ts b/sdk/nodejs/resourceServerScopes.ts index c60ada33..0b3055f3 100644 --- a/sdk/nodejs/resourceServerScopes.ts +++ b/sdk/nodejs/resourceServerScopes.ts @@ -21,8 +21,11 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myApi = new auth0.ResourceServer("myApi", {identifier: "https://api.example.com"}); - * const myApiScopes = new auth0.ResourceServerScopes("myApiScopes", { + * const myApi = new auth0.ResourceServer("my_api", { + * name: "Example Resource Server (Managed by Terraform)", + * identifier: "https://api.example.com", + * }); + * const myApiScopes = new auth0.ResourceServerScopes("my_api_scopes", { * resourceServerIdentifier: myApi.identifier, * scopes: [ * { diff --git a/sdk/nodejs/role.ts b/sdk/nodejs/role.ts index acdc9040..f9b05ef8 100644 --- a/sdk/nodejs/role.ts +++ b/sdk/nodejs/role.ts @@ -14,7 +14,10 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myRole = new auth0.Role("myRole", {description: "Role Description..."}); + * const myRole = new auth0.Role("my_role", { + * name: "My Role - (Managed by Terraform)", + * description: "Role Description...", + * }); * ``` * * diff --git a/sdk/nodejs/rule.ts b/sdk/nodejs/rule.ts index 039fd029..23ea2221 100644 --- a/sdk/nodejs/rule.ts +++ b/sdk/nodejs/rule.ts @@ -16,13 +16,13 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myRule = new auth0.Rule("myRule", { - * enabled: true, + * const myRule = new auth0.Rule("my_rule", { + * name: "empty-rule", * script: ` function (user, context, callback) { * callback(null, user, context); * } - * * `, + * enabled: true, * }); * ``` * diff --git a/sdk/nodejs/ruleConfig.ts b/sdk/nodejs/ruleConfig.ts index a3adbed0..6b84de9c 100644 --- a/sdk/nodejs/ruleConfig.ts +++ b/sdk/nodejs/ruleConfig.ts @@ -14,15 +14,15 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myRule = new auth0.Rule("myRule", { - * enabled: true, + * const myRule = new auth0.Rule("my_rule", { + * name: "empty-rule", * script: ` function (user, context, callback) { * callback(null, user, context); * } - * * `, + * enabled: true, * }); - * const myRuleConfig = new auth0.RuleConfig("myRuleConfig", { + * const myRuleConfig = new auth0.RuleConfig("my_rule_config", { * key: "foo", * value: "bar", * }); diff --git a/sdk/nodejs/tenant.ts b/sdk/nodejs/tenant.ts index d15c6d86..e4b4134f 100644 --- a/sdk/nodejs/tenant.ts +++ b/sdk/nodejs/tenant.ts @@ -19,30 +19,30 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const myTenant = new auth0.Tenant("myTenant", { + * const myTenant = new auth0.Tenant("my_tenant", { + * friendlyName: "Tenant Name", + * pictureUrl: "http://example.com/logo.png", + * supportEmail: "support@example.com", + * supportUrl: "http://example.com/support", * allowedLogoutUrls: ["http://example.com/logout"], - * defaultRedirectionUri: "https://example.com/login", + * sessionLifetime: 8760, + * sandboxVersion: "12", * enabledLocales: ["en"], + * defaultRedirectionUri: "https://example.com/login", * flags: { * disableClickjackProtectionHeaders: true, - * disableFieldsMapFix: false, - * disableManagementApiSmsObfuscation: false, * enablePublicSignupUserExistsError: true, - * noDiscloseEnterpriseConnections: false, * useScopeDescriptionsForConsent: true, + * noDiscloseEnterpriseConnections: false, + * disableManagementApiSmsObfuscation: false, + * disableFieldsMapFix: false, * }, - * friendlyName: "Tenant Name", - * pictureUrl: "http://example.com/logo.png", - * sandboxVersion: "12", * sessionCookie: { * mode: "non-persistent", * }, - * sessionLifetime: 8760, * sessions: { * oidcLogoutPromptEnabled: false, * }, - * supportEmail: "support@example.com", - * supportUrl: "http://example.com/support", * }); * ``` * diff --git a/sdk/nodejs/triggerAction.ts b/sdk/nodejs/triggerAction.ts index cc89c293..e31c2260 100644 --- a/sdk/nodejs/triggerAction.ts +++ b/sdk/nodejs/triggerAction.ts @@ -20,7 +20,8 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const loginAlert = new auth0.Action("loginAlert", { + * const loginAlert = new auth0.Action("login_alert", { + * name: "Alert after login", * code: `exports.onContinuePostLogin = async (event, api) => { * console.log("foo"); * };" @@ -31,7 +32,7 @@ import * as utilities from "./utilities"; * version: "v3", * }, * }); - * const postLoginAlertAction = new auth0.TriggerAction("postLoginAlertAction", { + * const postLoginAlertAction = new auth0.TriggerAction("post_login_alert_action", { * trigger: "post-login", * actionId: loginAlert.id, * }); diff --git a/sdk/nodejs/triggerActions.ts b/sdk/nodejs/triggerActions.ts index c4c0f46a..1f566ad1 100644 --- a/sdk/nodejs/triggerActions.ts +++ b/sdk/nodejs/triggerActions.ts @@ -20,7 +20,8 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * - * const actionFoo = new auth0.Action("actionFoo", { + * const actionFoo = new auth0.Action("action_foo", { + * name: "Test Trigger Binding Foo", * code: `exports.onContinuePostLogin = async (event, api) => { * console.log("foo"); * };" @@ -31,7 +32,8 @@ import * as utilities from "./utilities"; * version: "v3", * }, * }); - * const actionBar = new auth0.Action("actionBar", { + * const actionBar = new auth0.Action("action_bar", { + * name: "Test Trigger Binding Bar", * code: `exports.onContinuePostLogin = async (event, api) => { * console.log("bar"); * };" @@ -42,7 +44,7 @@ import * as utilities from "./utilities"; * version: "v3", * }, * }); - * const loginFlow = new auth0.TriggerActions("loginFlow", { + * const loginFlow = new auth0.TriggerActions("login_flow", { * trigger: "post-login", * actions: [ * { diff --git a/sdk/nodejs/user.ts b/sdk/nodejs/user.ts index a3d9093d..89e2d78f 100644 --- a/sdk/nodejs/user.ts +++ b/sdk/nodejs/user.ts @@ -16,13 +16,14 @@ import * as utilities from "./utilities"; * * const user = new auth0.User("user", { * connectionName: "Username-Password-Authentication", + * userId: "12345", + * username: "unique_username", + * name: "Firstname Lastname", + * nickname: "some.nickname", * email: "test@test.com", * emailVerified: true, - * nickname: "some.nickname", * password: "passpass$12$12", * picture: "https://www.example.com/a-valid-picture-url.jpg", - * userId: "12345", - * username: "unique_username", * }); * ``` * diff --git a/sdk/nodejs/userRole.ts b/sdk/nodejs/userRole.ts index 65d28b4e..55e7d85f 100644 --- a/sdk/nodejs/userRole.ts +++ b/sdk/nodejs/userRole.ts @@ -19,14 +19,18 @@ import * as utilities from "./utilities"; * import * as auth0 from "@pulumi/auth0"; * * // Example: - * const admin = new auth0.Role("admin", {description: "Administrator"}); + * const admin = new auth0.Role("admin", { + * name: "admin", + * description: "Administrator", + * }); * const user = new auth0.User("user", { * connectionName: "Username-Password-Authentication", * username: "unique_username", + * name: "Firstname Lastname", * email: "test@test.com", * password: "passpass$12$12", * }); - * const userRoles = new auth0.UserRole("userRoles", { + * const userRoles = new auth0.UserRole("user_roles", { * userId: user.id, * roleId: admin.id, * }); diff --git a/sdk/nodejs/userRoles.ts b/sdk/nodejs/userRoles.ts index 03062f70..c03c99b8 100644 --- a/sdk/nodejs/userRoles.ts +++ b/sdk/nodejs/userRoles.ts @@ -19,14 +19,18 @@ import * as utilities from "./utilities"; * import * as auth0 from "@pulumi/auth0"; * * // Example: - * const admin = new auth0.Role("admin", {description: "Administrator"}); + * const admin = new auth0.Role("admin", { + * name: "admin", + * description: "Administrator", + * }); * const user = new auth0.User("user", { * connectionName: "Username-Password-Authentication", * username: "unique_username", + * name: "Firstname Lastname", * email: "test@test.com", * password: "passpass$12$12", * }); - * const userRoles = new auth0.UserRoles("userRoles", { + * const userRoles = new auth0.UserRoles("user_roles", { * userId: user.id, * roles: [admin.id], * }); diff --git a/sdk/python/pulumi_auth0/attack_protection.py b/sdk/python/pulumi_auth0/attack_protection.py index f9c4b7e8..ea8b109b 100644 --- a/sdk/python/pulumi_auth0/attack_protection.py +++ b/sdk/python/pulumi_auth0/attack_protection.py @@ -144,18 +144,22 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_protection = auth0.AttackProtection("myProtection", - breached_password_detection=auth0.AttackProtectionBreachedPasswordDetectionArgs( - admin_notification_frequencies=["daily"], + my_protection = auth0.AttackProtection("my_protection", + suspicious_ip_throttling=auth0.AttackProtectionSuspiciousIpThrottlingArgs( enabled=True, - method="standard", - pre_user_registration=auth0.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs( - shields=["block"], - ), shields=[ "admin_notification", "block", ], + allowlists=["192.168.1.1"], + pre_login=auth0.AttackProtectionSuspiciousIpThrottlingPreLoginArgs( + max_attempts=100, + rate=864000, + ), + pre_user_registration=auth0.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs( + max_attempts=50, + rate=1200, + ), ), brute_force_protection=auth0.AttackProtectionBruteForceProtectionArgs( allowlists=["127.0.0.1"], @@ -167,21 +171,17 @@ def __init__(__self__, "user_notification", ], ), - suspicious_ip_throttling=auth0.AttackProtectionSuspiciousIpThrottlingArgs( - allowlists=["192.168.1.1"], + breached_password_detection=auth0.AttackProtectionBreachedPasswordDetectionArgs( + admin_notification_frequencies=["daily"], enabled=True, - pre_login=auth0.AttackProtectionSuspiciousIpThrottlingPreLoginArgs( - max_attempts=100, - rate=864000, - ), - pre_user_registration=auth0.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs( - max_attempts=50, - rate=1200, - ), + method="standard", shields=[ "admin_notification", "block", ], + pre_user_registration=auth0.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs( + shields=["block"], + ), )) ``` @@ -226,18 +226,22 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_protection = auth0.AttackProtection("myProtection", - breached_password_detection=auth0.AttackProtectionBreachedPasswordDetectionArgs( - admin_notification_frequencies=["daily"], + my_protection = auth0.AttackProtection("my_protection", + suspicious_ip_throttling=auth0.AttackProtectionSuspiciousIpThrottlingArgs( enabled=True, - method="standard", - pre_user_registration=auth0.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs( - shields=["block"], - ), shields=[ "admin_notification", "block", ], + allowlists=["192.168.1.1"], + pre_login=auth0.AttackProtectionSuspiciousIpThrottlingPreLoginArgs( + max_attempts=100, + rate=864000, + ), + pre_user_registration=auth0.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs( + max_attempts=50, + rate=1200, + ), ), brute_force_protection=auth0.AttackProtectionBruteForceProtectionArgs( allowlists=["127.0.0.1"], @@ -249,21 +253,17 @@ def __init__(__self__, "user_notification", ], ), - suspicious_ip_throttling=auth0.AttackProtectionSuspiciousIpThrottlingArgs( - allowlists=["192.168.1.1"], + breached_password_detection=auth0.AttackProtectionBreachedPasswordDetectionArgs( + admin_notification_frequencies=["daily"], enabled=True, - pre_login=auth0.AttackProtectionSuspiciousIpThrottlingPreLoginArgs( - max_attempts=100, - rate=864000, - ), - pre_user_registration=auth0.AttackProtectionSuspiciousIpThrottlingPreUserRegistrationArgs( - max_attempts=50, - rate=1200, - ), + method="standard", shields=[ "admin_notification", "block", ], + pre_user_registration=auth0.AttackProtectionBreachedPasswordDetectionPreUserRegistrationArgs( + shields=["block"], + ), )) ``` diff --git a/sdk/python/pulumi_auth0/branding.py b/sdk/python/pulumi_auth0/branding.py index f39dc8ab..59e32a80 100644 --- a/sdk/python/pulumi_auth0/branding.py +++ b/sdk/python/pulumi_auth0/branding.py @@ -203,25 +203,6 @@ def __init__(__self__, """ This resource allows you to manage branding within your Auth0 tenant. Auth0 can be customized with a look and feel that aligns with your organization's brand requirements and user expectations. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - my_brand = auth0.Branding("myBrand", - logo_url="https://mycompany.org/logo.png", - colors=auth0.BrandingColorsArgs( - primary="#0059d6", - page_background="#000000", - ), - universal_login=auth0.BrandingUniversalLoginArgs( - body=(lambda path: open(path).read())("universal_login_body.html"), - )) - ``` - - ## Import As this is not a resource identifiable by an ID within the Auth0 Management API, @@ -257,25 +238,6 @@ def __init__(__self__, """ This resource allows you to manage branding within your Auth0 tenant. Auth0 can be customized with a look and feel that aligns with your organization's brand requirements and user expectations. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - my_brand = auth0.Branding("myBrand", - logo_url="https://mycompany.org/logo.png", - colors=auth0.BrandingColorsArgs( - primary="#0059d6", - page_background="#000000", - ), - universal_login=auth0.BrandingUniversalLoginArgs( - body=(lambda path: open(path).read())("universal_login_body.html"), - )) - ``` - - ## Import As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/python/pulumi_auth0/branding_theme.py b/sdk/python/pulumi_auth0/branding_theme.py index 572b37ec..34d961ce 100644 --- a/sdk/python/pulumi_auth0/branding_theme.py +++ b/sdk/python/pulumi_auth0/branding_theme.py @@ -191,88 +191,6 @@ def __init__(__self__, """ This resource allows you to manage branding themes for your Universal Login page within your Auth0 tenant. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - # An example of a fully configured auth0_branding_theme. - my_theme = auth0.BrandingTheme("myTheme", - borders=auth0.BrandingThemeBordersArgs( - button_border_radius=1, - button_border_weight=1, - buttons_style="pill", - input_border_radius=3, - input_border_weight=1, - inputs_style="pill", - show_widget_shadow=False, - widget_border_weight=1, - widget_corner_radius=3, - ), - colors=auth0.BrandingThemeColorsArgs( - body_text="#FF00CC", - error="#FF00CC", - header="#FF00CC", - icons="#FF00CC", - input_background="#FF00CC", - input_border="#FF00CC", - input_filled_text="#FF00CC", - input_labels_placeholders="#FF00CC", - links_focused_components="#FF00CC", - primary_button="#FF00CC", - primary_button_label="#FF00CC", - secondary_button_border="#FF00CC", - secondary_button_label="#FF00CC", - success="#FF00CC", - widget_background="#FF00CC", - widget_border="#FF00CC", - ), - fonts=auth0.BrandingThemeFontsArgs( - body_text=auth0.BrandingThemeFontsBodyTextArgs( - bold=False, - size=100, - ), - buttons_text=auth0.BrandingThemeFontsButtonsTextArgs( - bold=False, - size=100, - ), - font_url="https://google.com/font.woff", - input_labels=auth0.BrandingThemeFontsInputLabelsArgs( - bold=False, - size=100, - ), - links=auth0.BrandingThemeFontsLinksArgs( - bold=False, - size=100, - ), - links_style="normal", - reference_text_size=12, - subtitle=auth0.BrandingThemeFontsSubtitleArgs( - bold=False, - size=100, - ), - title=auth0.BrandingThemeFontsTitleArgs( - bold=False, - size=100, - ), - ), - page_background=auth0.BrandingThemePageBackgroundArgs( - background_color="#000000", - background_image_url="https://google.com/background.png", - page_layout="center", - ), - widget=auth0.BrandingThemeWidgetArgs( - header_text_alignment="center", - logo_height=55, - logo_position="center", - logo_url="https://google.com/logo.png", - social_buttons_layout="top", - )) - ``` - - ## Import This resource can be imported by specifying the Branding Theme ID. @@ -298,88 +216,6 @@ def __init__(__self__, """ This resource allows you to manage branding themes for your Universal Login page within your Auth0 tenant. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - # An example of a fully configured auth0_branding_theme. - my_theme = auth0.BrandingTheme("myTheme", - borders=auth0.BrandingThemeBordersArgs( - button_border_radius=1, - button_border_weight=1, - buttons_style="pill", - input_border_radius=3, - input_border_weight=1, - inputs_style="pill", - show_widget_shadow=False, - widget_border_weight=1, - widget_corner_radius=3, - ), - colors=auth0.BrandingThemeColorsArgs( - body_text="#FF00CC", - error="#FF00CC", - header="#FF00CC", - icons="#FF00CC", - input_background="#FF00CC", - input_border="#FF00CC", - input_filled_text="#FF00CC", - input_labels_placeholders="#FF00CC", - links_focused_components="#FF00CC", - primary_button="#FF00CC", - primary_button_label="#FF00CC", - secondary_button_border="#FF00CC", - secondary_button_label="#FF00CC", - success="#FF00CC", - widget_background="#FF00CC", - widget_border="#FF00CC", - ), - fonts=auth0.BrandingThemeFontsArgs( - body_text=auth0.BrandingThemeFontsBodyTextArgs( - bold=False, - size=100, - ), - buttons_text=auth0.BrandingThemeFontsButtonsTextArgs( - bold=False, - size=100, - ), - font_url="https://google.com/font.woff", - input_labels=auth0.BrandingThemeFontsInputLabelsArgs( - bold=False, - size=100, - ), - links=auth0.BrandingThemeFontsLinksArgs( - bold=False, - size=100, - ), - links_style="normal", - reference_text_size=12, - subtitle=auth0.BrandingThemeFontsSubtitleArgs( - bold=False, - size=100, - ), - title=auth0.BrandingThemeFontsTitleArgs( - bold=False, - size=100, - ), - ), - page_background=auth0.BrandingThemePageBackgroundArgs( - background_color="#000000", - background_image_url="https://google.com/background.png", - page_layout="center", - ), - widget=auth0.BrandingThemeWidgetArgs( - header_text_alignment="center", - logo_height=55, - logo_position="center", - logo_url="https://google.com/logo.png", - social_buttons_layout="top", - )) - ``` - - ## Import This resource can be imported by specifying the Branding Theme ID. diff --git a/sdk/python/pulumi_auth0/client.py b/sdk/python/pulumi_auth0/client.py index bc8b56d9..8efdacac 100644 --- a/sdk/python/pulumi_auth0/client.py +++ b/sdk/python/pulumi_auth0/client.py @@ -1170,38 +1170,18 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_client = auth0.Client("myClient", - addons=auth0.ClientAddonsArgs( - samlp=auth0.ClientAddonsSamlpArgs( - audience="https://example.com/saml", - create_upn_claim=False, - issuer="https://example.com", - map_identities=False, - map_unknown_claims_as_is=False, - mappings={ - "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", - "name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", - }, - name_identifier_format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", - name_identifier_probes=["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"], - passthrough_claims_with_no_mapping=False, - signing_cert=\"\"\"-----BEGIN PUBLIC KEY----- - MIGf...bpP/t3 - +JGNGIRMj1hF1rnb6QIDAQAB - -----END PUBLIC KEY----- - - \"\"\", - ), - ), - allowed_logout_urls=["https://example.com"], - allowed_origins=["https://example.com"], + my_client = auth0.Client("my_client", + name="Application - Acceptance Test", + description="Test Applications Long Description", app_type="non_interactive", - callbacks=["https://example.com/callback"], - client_metadata={ - "foo": "zoo", - }, custom_login_page_on=True, - description="Test Applications Long Description", + is_first_party=True, + is_token_endpoint_ip_header_trusted=True, + oidc_conformant=False, + callbacks=["https://example.com/callback"], + allowed_origins=["https://example.com"], + allowed_logout_urls=["https://example.com"], + web_origins=["https://example.com"], grant_types=[ "authorization_code", "http://auth0.com/oauth/grant-type/password-realm", @@ -1209,30 +1189,50 @@ def __init__(__self__, "password", "refresh_token", ], - is_first_party=True, - is_token_endpoint_ip_header_trusted=True, + client_metadata={ + "foo": "zoo", + }, jwt_configuration=auth0.ClientJwtConfigurationArgs( - alg="RS256", lifetime_in_seconds=300, + secret_encoded=True, + alg="RS256", scopes={ "foo": "bar", }, - secret_encoded=True, + ), + refresh_token=auth0.ClientRefreshTokenArgs( + leeway=0, + token_lifetime=2592000, + rotation_type="rotating", + expiration_type="expiring", ), mobile=auth0.ClientMobileArgs( ios=auth0.ClientMobileIosArgs( - app_bundle_identifier="com.my.bundle.id", team_id="9JA89QQLNQ", + app_bundle_identifier="com.my.bundle.id", ), ), - oidc_conformant=False, - refresh_token=auth0.ClientRefreshTokenArgs( - expiration_type="expiring", - leeway=0, - rotation_type="rotating", - token_lifetime=2592000, - ), - web_origins=["https://example.com"]) + addons=auth0.ClientAddonsArgs( + samlp=auth0.ClientAddonsSamlpArgs( + audience="https://example.com/saml", + issuer="https://example.com", + mappings={ + "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", + "name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", + }, + create_upn_claim=False, + passthrough_claims_with_no_mapping=False, + map_unknown_claims_as_is=False, + map_identities=False, + name_identifier_format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + name_identifier_probes=["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"], + signing_cert=\"\"\"-----BEGIN PUBLIC KEY----- + MIGf...bpP/t3 + +JGNGIRMj1hF1rnb6QIDAQAB + -----END PUBLIC KEY----- + \"\"\", + ), + )) ``` @@ -1300,38 +1300,18 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_client = auth0.Client("myClient", - addons=auth0.ClientAddonsArgs( - samlp=auth0.ClientAddonsSamlpArgs( - audience="https://example.com/saml", - create_upn_claim=False, - issuer="https://example.com", - map_identities=False, - map_unknown_claims_as_is=False, - mappings={ - "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", - "name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", - }, - name_identifier_format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", - name_identifier_probes=["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"], - passthrough_claims_with_no_mapping=False, - signing_cert=\"\"\"-----BEGIN PUBLIC KEY----- - MIGf...bpP/t3 - +JGNGIRMj1hF1rnb6QIDAQAB - -----END PUBLIC KEY----- - - \"\"\", - ), - ), - allowed_logout_urls=["https://example.com"], - allowed_origins=["https://example.com"], + my_client = auth0.Client("my_client", + name="Application - Acceptance Test", + description="Test Applications Long Description", app_type="non_interactive", - callbacks=["https://example.com/callback"], - client_metadata={ - "foo": "zoo", - }, custom_login_page_on=True, - description="Test Applications Long Description", + is_first_party=True, + is_token_endpoint_ip_header_trusted=True, + oidc_conformant=False, + callbacks=["https://example.com/callback"], + allowed_origins=["https://example.com"], + allowed_logout_urls=["https://example.com"], + web_origins=["https://example.com"], grant_types=[ "authorization_code", "http://auth0.com/oauth/grant-type/password-realm", @@ -1339,30 +1319,50 @@ def __init__(__self__, "password", "refresh_token", ], - is_first_party=True, - is_token_endpoint_ip_header_trusted=True, + client_metadata={ + "foo": "zoo", + }, jwt_configuration=auth0.ClientJwtConfigurationArgs( - alg="RS256", lifetime_in_seconds=300, + secret_encoded=True, + alg="RS256", scopes={ "foo": "bar", }, - secret_encoded=True, + ), + refresh_token=auth0.ClientRefreshTokenArgs( + leeway=0, + token_lifetime=2592000, + rotation_type="rotating", + expiration_type="expiring", ), mobile=auth0.ClientMobileArgs( ios=auth0.ClientMobileIosArgs( - app_bundle_identifier="com.my.bundle.id", team_id="9JA89QQLNQ", + app_bundle_identifier="com.my.bundle.id", ), ), - oidc_conformant=False, - refresh_token=auth0.ClientRefreshTokenArgs( - expiration_type="expiring", - leeway=0, - rotation_type="rotating", - token_lifetime=2592000, - ), - web_origins=["https://example.com"]) + addons=auth0.ClientAddonsArgs( + samlp=auth0.ClientAddonsSamlpArgs( + audience="https://example.com/saml", + issuer="https://example.com", + mappings={ + "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", + "name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", + }, + create_upn_claim=False, + passthrough_claims_with_no_mapping=False, + map_unknown_claims_as_is=False, + map_identities=False, + name_identifier_format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + name_identifier_probes=["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"], + signing_cert=\"\"\"-----BEGIN PUBLIC KEY----- + MIGf...bpP/t3 + +JGNGIRMj1hF1rnb6QIDAQAB + -----END PUBLIC KEY----- + \"\"\", + ), + )) ``` diff --git a/sdk/python/pulumi_auth0/client_credentials.py b/sdk/python/pulumi_auth0/client_credentials.py index 6d647a55..17b232f7 100644 --- a/sdk/python/pulumi_auth0/client_credentials.py +++ b/sdk/python/pulumi_auth0/client_credentials.py @@ -183,54 +183,6 @@ def __init__(__self__, > Refer to the client secret rotation guide for instructions on how to rotate client secrets with zero downtime. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - my_client = auth0.Client("myClient", - app_type="non_interactive", - jwt_configuration=auth0.ClientJwtConfigurationArgs( - alg="RS256", - )) - # Configuring client_secret_post as an authentication method. - test_client_credentials = auth0.ClientCredentials("testClientCredentials", - client_id=my_client.id, - authentication_method="client_secret_post") - # Configuring client_secret_basic as an authentication method. - test_index_client_credentials_client_credentials = auth0.ClientCredentials("testIndex/clientCredentialsClientCredentials", - client_id=my_client.id, - authentication_method="client_secret_basic") - # Configuring none as an authentication method. - test_auth0_index_client_credentials_client_credentials = auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials", - client_id=my_client.id, - authentication_method="none") - # Configuring private_key_jwt as an authentication method. - test_auth0_index_client_credentials_client_credentials1 = auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials1", - client_id=my_client.id, - authentication_method="private_key_jwt", - private_key_jwt=auth0.ClientCredentialsPrivateKeyJwtArgs( - credentials=[auth0.ClientCredentialsPrivateKeyJwtCredentialArgs( - name="Testing Credentials 1", - credential_type="public_key", - algorithm="RS256", - parse_expiry_from_cert=True, - pem=\"\"\"-----BEGIN CERTIFICATE----- - MIIFWDCCA0ACCQDXqpBo3R...G9w0BAQsFADBuMQswCQYDVQQGEwJl - -----END CERTIFICATE----- - \"\"\", - )], - )) - # Configuring the client_secret. - test_auth0_index_client_credentials_client_credentials2 = auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials2", - client_id=my_client.id, - authentication_method="client_secret_basic", - client_secret="LUFqPx+sRLjbL7peYRPFmFu-bbvE7u7og4YUNe_C345=683341") - ``` - - ## Import This resource can be imported by specifying the client ID. @@ -269,54 +221,6 @@ def __init__(__self__, > Refer to the client secret rotation guide for instructions on how to rotate client secrets with zero downtime. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - my_client = auth0.Client("myClient", - app_type="non_interactive", - jwt_configuration=auth0.ClientJwtConfigurationArgs( - alg="RS256", - )) - # Configuring client_secret_post as an authentication method. - test_client_credentials = auth0.ClientCredentials("testClientCredentials", - client_id=my_client.id, - authentication_method="client_secret_post") - # Configuring client_secret_basic as an authentication method. - test_index_client_credentials_client_credentials = auth0.ClientCredentials("testIndex/clientCredentialsClientCredentials", - client_id=my_client.id, - authentication_method="client_secret_basic") - # Configuring none as an authentication method. - test_auth0_index_client_credentials_client_credentials = auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials", - client_id=my_client.id, - authentication_method="none") - # Configuring private_key_jwt as an authentication method. - test_auth0_index_client_credentials_client_credentials1 = auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials1", - client_id=my_client.id, - authentication_method="private_key_jwt", - private_key_jwt=auth0.ClientCredentialsPrivateKeyJwtArgs( - credentials=[auth0.ClientCredentialsPrivateKeyJwtCredentialArgs( - name="Testing Credentials 1", - credential_type="public_key", - algorithm="RS256", - parse_expiry_from_cert=True, - pem=\"\"\"-----BEGIN CERTIFICATE----- - MIIFWDCCA0ACCQDXqpBo3R...G9w0BAQsFADBuMQswCQYDVQQGEwJl - -----END CERTIFICATE----- - \"\"\", - )], - )) - # Configuring the client_secret. - test_auth0_index_client_credentials_client_credentials2 = auth0.ClientCredentials("testAuth0Index/clientCredentialsClientCredentials2", - client_id=my_client.id, - authentication_method="client_secret_basic", - client_secret="LUFqPx+sRLjbL7peYRPFmFu-bbvE7u7og4YUNe_C345=683341") - ``` - - ## Import This resource can be imported by specifying the client ID. diff --git a/sdk/python/pulumi_auth0/connection.py b/sdk/python/pulumi_auth0/connection.py index b3410ebe..8e7605f6 100644 --- a/sdk/python/pulumi_auth0/connection.py +++ b/sdk/python/pulumi_auth0/connection.py @@ -306,6 +306,77 @@ def __init__(__self__, ## Example Usage + ### Auth0 Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of an Auth0 connection. + my_connection = auth0.Connection("my_connection", + name="Example-Connection", + is_domain_connection=True, + strategy="auth0", + metadata={ + "key1": "foo", + "key2": "bar", + }, + options=auth0.ConnectionOptionsArgs( + password_policy="excellent", + brute_force_protection=True, + enabled_database_customization=True, + import_mode=False, + requires_username=True, + disable_signup=False, + custom_scripts={ + "get_user": \"\"\" function getByEmail(email, callback) { + return callback(new Error("Whoops!")); + } + \"\"\", + }, + configuration={ + "foo": "bar", + "bar": "baz", + }, + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + password_histories=[auth0.ConnectionOptionsPasswordHistoryArgs( + enable=True, + size=3, + )], + password_no_personal_info=auth0.ConnectionOptionsPasswordNoPersonalInfoArgs( + enable=True, + ), + password_dictionary=auth0.ConnectionOptionsPasswordDictionaryArgs( + enable=True, + dictionaries=[ + "password", + "admin", + "1234", + ], + ), + password_complexity_options=auth0.ConnectionOptionsPasswordComplexityOptionsArgs( + min_length=12, + ), + validation=auth0.ConnectionOptionsValidationArgs( + username=auth0.ConnectionOptionsValidationUsernameArgs( + min=10, + max=40, + ), + ), + mfa=auth0.ConnectionOptionsMfaArgs( + active=True, + return_enroll_settings=True, + ), + )) + ``` + + ### Google OAuth2 Connection > Your Auth0 account may be pre-configured with a `google-oauth2` connection. @@ -315,18 +386,17 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - google_oauth2 = auth0.Connection("googleOauth2", + # This is an example of a Google OAuth2 connection. + google_oauth2 = auth0.Connection("google_oauth2", + name="Google-OAuth2-Connection", + strategy="google-oauth2", options=auth0.ConnectionOptionsArgs( + client_id="", + client_secret="", allowed_audiences=[ "example.com", "api.example.com", ], - client_id="", - client_secret="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "email", "profile", @@ -334,26 +404,70 @@ def __init__(__self__, "youtube", ], set_user_root_attributes="on_each_login", - ), - strategy="google-oauth2") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` - ### Facebook Connection + ### Google Apps ```python import pulumi + import json import pulumi_auth0 as auth0 - facebook = auth0.Connection("facebook", + google_apps = auth0.Connection("google_apps", + name="connection-google-apps", + is_domain_connection=False, + strategy="google-apps", + show_as_button=False, options=auth0.ConnectionOptionsArgs( - client_id="", - client_secret="", + client_id="", + client_secret="", + domain="example.com", + tenant_domain="example.com", + domain_aliases=[ + "example.com", + "api.example.com", + ], + api_enable_users=True, + scopes=[ + "ext_profile", + "ext_groups", + ], + icon_url="https://example.com/assets/logo.png", + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + set_user_root_attributes="on_each_login", non_persistent_attrs=[ "ethnicity", "gender", ], + )) + ``` + + + ### Facebook Connection + + + ```python + import pulumi + import pulumi_auth0 as auth0 + + # This is an example of a Facebook connection. + facebook = auth0.Connection("facebook", + name="Facebook-Connection", + strategy="facebook", + options=auth0.ConnectionOptionsArgs( + client_id="", + client_secret="", scopes=[ "public_profile", "email", @@ -361,8 +475,11 @@ def __init__(__self__, "user_birthday", ], set_user_root_attributes="on_each_login", - ), - strategy="facebook") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -373,26 +490,27 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an Apple connection. apple = auth0.Connection("apple", + name="Apple-Connection", + strategy="apple", options=auth0.ConnectionOptionsArgs( client_id="", client_secret=\"\"\"-----BEGIN PRIVATE KEY----- MIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA - -----END PRIVATE KEY----- - \"\"\", + -----END PRIVATE KEY-----\"\"\", + team_id="", key_id="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "email", "name", ], set_user_root_attributes="on_first_login", - team_id="", - ), - strategy="apple") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -403,23 +521,25 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an LinkedIn connection. linkedin = auth0.Connection("linkedin", + name="Linkedin-Connection", + strategy="linkedin", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], + strategy_version=2, scopes=[ "basic_profile", "profile", "email", ], set_user_root_attributes="on_each_login", - strategy_version=2, - ), - strategy="linkedin") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -430,14 +550,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an GitHub connection. github = auth0.Connection("github", + name="GitHub-Connection", + strategy="github", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "email", "profile", @@ -445,8 +564,11 @@ def __init__(__self__, "repo", ], set_user_root_attributes="on_each_login", - ), - strategy="github") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -457,22 +579,24 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an SalesForce connection. salesforce = auth0.Connection("salesforce", + name="Salesforce-Connection", + strategy="salesforce", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", community_base_url="https://salesforce.example.com", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "openid", "email", ], set_user_root_attributes="on_first_login", - ), - strategy="salesforce") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -485,70 +609,126 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an OAuth2 connection. oauth2 = auth0.Connection("oauth2", + name="OAuth2-Connection", + strategy="oauth2", options=auth0.ConnectionOptionsArgs( - authorization_endpoint="https://auth.example.com/oauth2/authorize", client_id="", client_secret="", - icon_url="https://auth.example.com/assets/logo.png", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], - pkce_enabled=True, scopes=[ "basic_profile", "profile", "email", ], + token_endpoint="https://auth.example.com/oauth2/token", + authorization_endpoint="https://auth.example.com/oauth2/authorize", + pkce_enabled=True, + icon_url="https://auth.example.com/assets/logo.png", scripts={ "fetchUserProfile": \"\"\" function fetchUserProfile(accessToken, context, callback) { return callback(new Error("Whoops!")); } - \"\"\", }, set_user_root_attributes="on_each_login", - token_endpoint="https://auth.example.com/oauth2/token", - ), - strategy="oauth2") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` - ### SMS Connection - - > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms". + ### Active Directory (AD) ```python import pulumi + import json import pulumi_auth0 as auth0 - sms = auth0.Connection("sms", - is_domain_connection=False, + ad = auth0.Connection("ad", + name="connection-active-directory", + display_name="Active Directory Connection", + strategy="ad", + show_as_button=True, options=auth0.ConnectionOptionsArgs( + disable_self_service_change_password=True, brute_force_protection=True, - disable_signup=False, - forward_request_info=True, - from_="+15555555555", - gateway_authentication=auth0.ConnectionOptionsGatewayAuthenticationArgs( - audience="https://somewhere.com/sms-gateway", - method="bearer", - secret="4e2680bb74ec2ae24736476dd37ed6c2", - secret_base64_encoded=False, - subject="test.us.auth0.com:sms", - ), - gateway_url="https://somewhere.com/sms-gateway", - name="sms", - provider="sms_gateway", - syntax="md_with_macros", - template="@@password@@", - totp=auth0.ConnectionOptionsTotpArgs( - length=6, - time_step=300, - ), - ), - strategy="sms") + tenant_domain="example.com", + icon_url="https://example.com/assets/logo.png", + domain_aliases=[ + "example.com", + "api.example.com", + ], + ips=[ + "192.168.1.1", + "192.168.1.2", + ], + set_user_root_attributes="on_each_login", + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + use_cert_auth=False, + use_kerberos=False, + disable_cache=False, + )) + ``` + + + ### Azure AD Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + azure_ad = auth0.Connection("azure_ad", + name="connection-azure-ad", + strategy="waad", + show_as_button=True, + options=auth0.ConnectionOptionsArgs( + identity_api="azure-active-directory-v1.0", + client_id="123456", + client_secret="123456", + app_id="app-id-123", + tenant_domain="example.onmicrosoft.com", + domain="example.onmicrosoft.com", + domain_aliases=[ + "example.com", + "api.example.com", + ], + icon_url="https://example.onmicrosoft.com/assets/logo.png", + use_wsfed=False, + waad_protocol="openid-connect", + waad_common_endpoint=False, + max_groups_to_retrieve="250", + api_enable_users=True, + scopes=[ + "basic_profile", + "ext_groups", + "ext_profile", + ], + set_user_root_attributes="on_each_login", + should_trust_email_verified_connection="never_set_emails_as_verified", + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -561,27 +741,110 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - passwordless_email = auth0.Connection("passwordlessEmail", + # This is an example of an Email connection. + passwordless_email = auth0.Connection("passwordless_email", + strategy="email", + name="email", options=auth0.ConnectionOptionsArgs( - auth_params={ - "responseType": "code", - "scope": "openid email profile offline_access", - }, - brute_force_protection=True, - disable_signup=False, - from_="{{ application.name }} ", name="email", - non_persistent_attrs=[], - set_user_root_attributes="on_each_login", + from_="{{ application.name }} ", subject="Welcome to {{ application.name }}", syntax="liquid", template="This is the body of the email", + disable_signup=False, + brute_force_protection=True, + set_user_root_attributes="on_each_login", + non_persistent_attrs=[], + auth_params={ + "scope": "openid email profile offline_access", + "response_type": "code", + }, totp=auth0.ConnectionOptionsTotpArgs( - length=6, time_step=300, + length=6, + ), + )) + ``` + + + ### SAML Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of a SAML connection. + samlp = auth0.Connection("samlp", + name="SAML-Connection", + strategy="samlp", + options=auth0.ConnectionOptionsArgs( + debug=False, + signing_cert="", + sign_in_endpoint="https://saml.provider/sign_in", + sign_out_endpoint="https://saml.provider/sign_out", + disable_sign_out=True, + tenant_domain="example.com", + domain_aliases=[ + "example.com", + "alias.example.com", + ], + protocol_binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + request_template=\"\"\" + @@Issuer@@ + \"\"\", + user_id_attribute="https://saml.provider/imi/ns/identity-200810", + signature_algorithm="rsa-sha256", + digest_algorithm="sha256", + icon_url="https://saml.provider/assets/logo.png", + entity_id="", + metadata_xml=\"\"\" + + + + + + + \"\"\", + metadata_url="https://saml.provider/imi/ns/FederationMetadata.xml", + fields_map=json.dumps({ + "name": [ + "name", + "nameidentifier", + ], + "email": [ + "emailaddress", + "nameidentifier", + ], + "family_name": "surname", + }), + signing_key=auth0.ConnectionOptionsSigningKeyArgs( + key=\"\"\"-----BEGIN PRIVATE KEY----- + ...{your private key here}... + -----END PRIVATE KEY-----\"\"\", + cert=\"\"\"-----BEGIN CERTIFICATE----- + ...{your public key cert here}... + -----END CERTIFICATE-----\"\"\", + ), + decryption_key=auth0.ConnectionOptionsDecryptionKeyArgs( + key=\"\"\"-----BEGIN PRIVATE KEY----- + ...{your private key here}... + -----END PRIVATE KEY-----\"\"\", + cert=\"\"\"-----BEGIN CERTIFICATE----- + ...{your public key cert here}... + -----END CERTIFICATE-----\"\"\", ), - ), - strategy="email") + idp_initiated=auth0.ConnectionOptionsIdpInitiatedArgs( + client_id="client_id", + client_protocol="samlp", + client_authorize_query="type=code&timeout=30", + ), + )) ``` @@ -592,22 +855,138 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of a WindowsLive connection. windowslive = auth0.Connection("windowslive", + name="Windowslive-Connection", + strategy="windowslive", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", + strategy_version=2, + scopes=[ + "signin", + "graph_user", + ], + set_user_root_attributes="on_first_login", non_persistent_attrs=[ "ethnicity", "gender", ], + )) + ``` + + + ### OIDC Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of an OIDC connection. + oidc = auth0.Connection("oidc", + name="oidc-connection", + display_name="OIDC Connection", + strategy="oidc", + show_as_button=False, + options=auth0.ConnectionOptionsArgs( + client_id="1234567", + client_secret="1234567", + domain_aliases=["example.com"], + tenant_domain="", + icon_url="https://example.com/assets/logo.png", + type="back_channel", + issuer="https://www.paypalobjects.com", + jwks_uri="https://api.paypal.com/v1/oauth2/certs", + discovery_url="https://www.paypalobjects.com/.well-known/openid-configuration", + token_endpoint="https://api.paypal.com/v1/oauth2/token", + userinfo_endpoint="https://api.paypal.com/v1/oauth2/token/userinfo", + authorization_endpoint="https://www.paypal.com/signin/authorize", scopes=[ - "signin", - "graph_user", + "openid", + "email", ], set_user_root_attributes="on_first_login", - strategy_version=2, - ), - strategy="windowslive") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + connection_settings=auth0.ConnectionOptionsConnectionSettingsArgs( + pkce="auto", + ), + attribute_map=auth0.ConnectionOptionsAttributeMapArgs( + mapping_mode="use_map", + userinfo_scope="openid email profile groups", + attributes=json.dumps({ + "name": "${context.tokenset.name}", + "email": "${context.tokenset.email}", + "email_verified": "${context.tokenset.email_verified}", + "nickname": "${context.tokenset.nickname}", + "picture": "${context.tokenset.picture}", + "given_name": "${context.tokenset.given_name}", + "family_name": "${context.tokenset.family_name}", + }), + ), + )) + ``` + + + ### Okta Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of an Okta Workforce connection. + okta = auth0.Connection("okta", + name="okta-connection", + display_name="Okta Workforce Connection", + strategy="okta", + show_as_button=False, + options=auth0.ConnectionOptionsArgs( + client_id="1234567", + client_secret="1234567", + domain="example.okta.com", + domain_aliases=["example.com"], + issuer="https://example.okta.com", + jwks_uri="https://example.okta.com/oauth2/v1/keys", + token_endpoint="https://example.okta.com/oauth2/v1/token", + userinfo_endpoint="https://example.okta.com/oauth2/v1/userinfo", + authorization_endpoint="https://example.okta.com/oauth2/v1/authorize", + scopes=[ + "openid", + "email", + ], + set_user_root_attributes="on_first_login", + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + connection_settings=auth0.ConnectionOptionsConnectionSettingsArgs( + pkce="auto", + ), + attribute_map=auth0.ConnectionOptionsAttributeMapArgs( + mapping_mode="basic_profile", + userinfo_scope="openid email profile groups", + attributes=json.dumps({ + "name": "${context.tokenset.name}", + "email": "${context.tokenset.email}", + "email_verified": "${context.tokenset.email_verified}", + "nickname": "${context.tokenset.nickname}", + "picture": "${context.tokenset.picture}", + "given_name": "${context.tokenset.given_name}", + "family_name": "${context.tokenset.family_name}", + }), + ), + )) ``` @@ -648,6 +1027,77 @@ def __init__(__self__, ## Example Usage + ### Auth0 Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of an Auth0 connection. + my_connection = auth0.Connection("my_connection", + name="Example-Connection", + is_domain_connection=True, + strategy="auth0", + metadata={ + "key1": "foo", + "key2": "bar", + }, + options=auth0.ConnectionOptionsArgs( + password_policy="excellent", + brute_force_protection=True, + enabled_database_customization=True, + import_mode=False, + requires_username=True, + disable_signup=False, + custom_scripts={ + "get_user": \"\"\" function getByEmail(email, callback) { + return callback(new Error("Whoops!")); + } + \"\"\", + }, + configuration={ + "foo": "bar", + "bar": "baz", + }, + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + password_histories=[auth0.ConnectionOptionsPasswordHistoryArgs( + enable=True, + size=3, + )], + password_no_personal_info=auth0.ConnectionOptionsPasswordNoPersonalInfoArgs( + enable=True, + ), + password_dictionary=auth0.ConnectionOptionsPasswordDictionaryArgs( + enable=True, + dictionaries=[ + "password", + "admin", + "1234", + ], + ), + password_complexity_options=auth0.ConnectionOptionsPasswordComplexityOptionsArgs( + min_length=12, + ), + validation=auth0.ConnectionOptionsValidationArgs( + username=auth0.ConnectionOptionsValidationUsernameArgs( + min=10, + max=40, + ), + ), + mfa=auth0.ConnectionOptionsMfaArgs( + active=True, + return_enroll_settings=True, + ), + )) + ``` + + ### Google OAuth2 Connection > Your Auth0 account may be pre-configured with a `google-oauth2` connection. @@ -657,18 +1107,17 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - google_oauth2 = auth0.Connection("googleOauth2", + # This is an example of a Google OAuth2 connection. + google_oauth2 = auth0.Connection("google_oauth2", + name="Google-OAuth2-Connection", + strategy="google-oauth2", options=auth0.ConnectionOptionsArgs( + client_id="", + client_secret="", allowed_audiences=[ "example.com", "api.example.com", ], - client_id="", - client_secret="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "email", "profile", @@ -676,26 +1125,70 @@ def __init__(__self__, "youtube", ], set_user_root_attributes="on_each_login", - ), - strategy="google-oauth2") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` - ### Facebook Connection + ### Google Apps ```python import pulumi + import json import pulumi_auth0 as auth0 - facebook = auth0.Connection("facebook", + google_apps = auth0.Connection("google_apps", + name="connection-google-apps", + is_domain_connection=False, + strategy="google-apps", + show_as_button=False, options=auth0.ConnectionOptionsArgs( - client_id="", - client_secret="", + client_id="", + client_secret="", + domain="example.com", + tenant_domain="example.com", + domain_aliases=[ + "example.com", + "api.example.com", + ], + api_enable_users=True, + scopes=[ + "ext_profile", + "ext_groups", + ], + icon_url="https://example.com/assets/logo.png", + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + set_user_root_attributes="on_each_login", non_persistent_attrs=[ "ethnicity", "gender", ], + )) + ``` + + + ### Facebook Connection + + + ```python + import pulumi + import pulumi_auth0 as auth0 + + # This is an example of a Facebook connection. + facebook = auth0.Connection("facebook", + name="Facebook-Connection", + strategy="facebook", + options=auth0.ConnectionOptionsArgs( + client_id="", + client_secret="", scopes=[ "public_profile", "email", @@ -703,8 +1196,11 @@ def __init__(__self__, "user_birthday", ], set_user_root_attributes="on_each_login", - ), - strategy="facebook") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -715,26 +1211,27 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an Apple connection. apple = auth0.Connection("apple", + name="Apple-Connection", + strategy="apple", options=auth0.ConnectionOptionsArgs( client_id="", client_secret=\"\"\"-----BEGIN PRIVATE KEY----- MIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA - -----END PRIVATE KEY----- - \"\"\", + -----END PRIVATE KEY-----\"\"\", + team_id="", key_id="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "email", "name", ], set_user_root_attributes="on_first_login", - team_id="", - ), - strategy="apple") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -745,23 +1242,25 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an LinkedIn connection. linkedin = auth0.Connection("linkedin", + name="Linkedin-Connection", + strategy="linkedin", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], + strategy_version=2, scopes=[ "basic_profile", "profile", "email", ], set_user_root_attributes="on_each_login", - strategy_version=2, - ), - strategy="linkedin") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -772,14 +1271,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an GitHub connection. github = auth0.Connection("github", + name="GitHub-Connection", + strategy="github", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "email", "profile", @@ -787,8 +1285,11 @@ def __init__(__self__, "repo", ], set_user_root_attributes="on_each_login", - ), - strategy="github") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -799,22 +1300,24 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an SalesForce connection. salesforce = auth0.Connection("salesforce", + name="Salesforce-Connection", + strategy="salesforce", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", community_base_url="https://salesforce.example.com", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], scopes=[ "openid", "email", ], set_user_root_attributes="on_first_login", - ), - strategy="salesforce") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -827,70 +1330,126 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of an OAuth2 connection. oauth2 = auth0.Connection("oauth2", + name="OAuth2-Connection", + strategy="oauth2", options=auth0.ConnectionOptionsArgs( - authorization_endpoint="https://auth.example.com/oauth2/authorize", client_id="", client_secret="", - icon_url="https://auth.example.com/assets/logo.png", - non_persistent_attrs=[ - "ethnicity", - "gender", - ], - pkce_enabled=True, scopes=[ "basic_profile", "profile", "email", ], + token_endpoint="https://auth.example.com/oauth2/token", + authorization_endpoint="https://auth.example.com/oauth2/authorize", + pkce_enabled=True, + icon_url="https://auth.example.com/assets/logo.png", scripts={ "fetchUserProfile": \"\"\" function fetchUserProfile(accessToken, context, callback) { return callback(new Error("Whoops!")); } - \"\"\", }, set_user_root_attributes="on_each_login", - token_endpoint="https://auth.example.com/oauth2/token", - ), - strategy="oauth2") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` - ### SMS Connection - - > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms". + ### Active Directory (AD) ```python import pulumi + import json import pulumi_auth0 as auth0 - sms = auth0.Connection("sms", - is_domain_connection=False, + ad = auth0.Connection("ad", + name="connection-active-directory", + display_name="Active Directory Connection", + strategy="ad", + show_as_button=True, options=auth0.ConnectionOptionsArgs( + disable_self_service_change_password=True, brute_force_protection=True, - disable_signup=False, - forward_request_info=True, - from_="+15555555555", - gateway_authentication=auth0.ConnectionOptionsGatewayAuthenticationArgs( - audience="https://somewhere.com/sms-gateway", - method="bearer", - secret="4e2680bb74ec2ae24736476dd37ed6c2", - secret_base64_encoded=False, - subject="test.us.auth0.com:sms", - ), - gateway_url="https://somewhere.com/sms-gateway", - name="sms", - provider="sms_gateway", - syntax="md_with_macros", - template="@@password@@", - totp=auth0.ConnectionOptionsTotpArgs( - length=6, - time_step=300, - ), - ), - strategy="sms") + tenant_domain="example.com", + icon_url="https://example.com/assets/logo.png", + domain_aliases=[ + "example.com", + "api.example.com", + ], + ips=[ + "192.168.1.1", + "192.168.1.2", + ], + set_user_root_attributes="on_each_login", + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + use_cert_auth=False, + use_kerberos=False, + disable_cache=False, + )) + ``` + + + ### Azure AD Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + azure_ad = auth0.Connection("azure_ad", + name="connection-azure-ad", + strategy="waad", + show_as_button=True, + options=auth0.ConnectionOptionsArgs( + identity_api="azure-active-directory-v1.0", + client_id="123456", + client_secret="123456", + app_id="app-id-123", + tenant_domain="example.onmicrosoft.com", + domain="example.onmicrosoft.com", + domain_aliases=[ + "example.com", + "api.example.com", + ], + icon_url="https://example.onmicrosoft.com/assets/logo.png", + use_wsfed=False, + waad_protocol="openid-connect", + waad_common_endpoint=False, + max_groups_to_retrieve="250", + api_enable_users=True, + scopes=[ + "basic_profile", + "ext_groups", + "ext_profile", + ], + set_user_root_attributes="on_each_login", + should_trust_email_verified_connection="never_set_emails_as_verified", + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + )) ``` @@ -903,27 +1462,110 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - passwordless_email = auth0.Connection("passwordlessEmail", + # This is an example of an Email connection. + passwordless_email = auth0.Connection("passwordless_email", + strategy="email", + name="email", options=auth0.ConnectionOptionsArgs( - auth_params={ - "responseType": "code", - "scope": "openid email profile offline_access", - }, - brute_force_protection=True, - disable_signup=False, - from_="{{ application.name }} ", name="email", - non_persistent_attrs=[], - set_user_root_attributes="on_each_login", + from_="{{ application.name }} ", subject="Welcome to {{ application.name }}", syntax="liquid", template="This is the body of the email", + disable_signup=False, + brute_force_protection=True, + set_user_root_attributes="on_each_login", + non_persistent_attrs=[], + auth_params={ + "scope": "openid email profile offline_access", + "response_type": "code", + }, totp=auth0.ConnectionOptionsTotpArgs( - length=6, time_step=300, + length=6, + ), + )) + ``` + + + ### SAML Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of a SAML connection. + samlp = auth0.Connection("samlp", + name="SAML-Connection", + strategy="samlp", + options=auth0.ConnectionOptionsArgs( + debug=False, + signing_cert="", + sign_in_endpoint="https://saml.provider/sign_in", + sign_out_endpoint="https://saml.provider/sign_out", + disable_sign_out=True, + tenant_domain="example.com", + domain_aliases=[ + "example.com", + "alias.example.com", + ], + protocol_binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + request_template=\"\"\" + @@Issuer@@ + \"\"\", + user_id_attribute="https://saml.provider/imi/ns/identity-200810", + signature_algorithm="rsa-sha256", + digest_algorithm="sha256", + icon_url="https://saml.provider/assets/logo.png", + entity_id="", + metadata_xml=\"\"\" + + + + + + + \"\"\", + metadata_url="https://saml.provider/imi/ns/FederationMetadata.xml", + fields_map=json.dumps({ + "name": [ + "name", + "nameidentifier", + ], + "email": [ + "emailaddress", + "nameidentifier", + ], + "family_name": "surname", + }), + signing_key=auth0.ConnectionOptionsSigningKeyArgs( + key=\"\"\"-----BEGIN PRIVATE KEY----- + ...{your private key here}... + -----END PRIVATE KEY-----\"\"\", + cert=\"\"\"-----BEGIN CERTIFICATE----- + ...{your public key cert here}... + -----END CERTIFICATE-----\"\"\", + ), + decryption_key=auth0.ConnectionOptionsDecryptionKeyArgs( + key=\"\"\"-----BEGIN PRIVATE KEY----- + ...{your private key here}... + -----END PRIVATE KEY-----\"\"\", + cert=\"\"\"-----BEGIN CERTIFICATE----- + ...{your public key cert here}... + -----END CERTIFICATE-----\"\"\", ), - ), - strategy="email") + idp_initiated=auth0.ConnectionOptionsIdpInitiatedArgs( + client_id="client_id", + client_protocol="samlp", + client_authorize_query="type=code&timeout=30", + ), + )) ``` @@ -934,22 +1576,138 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 + # This is an example of a WindowsLive connection. windowslive = auth0.Connection("windowslive", + name="Windowslive-Connection", + strategy="windowslive", options=auth0.ConnectionOptionsArgs( client_id="", client_secret="", + strategy_version=2, + scopes=[ + "signin", + "graph_user", + ], + set_user_root_attributes="on_first_login", non_persistent_attrs=[ "ethnicity", "gender", ], + )) + ``` + + + ### OIDC Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of an OIDC connection. + oidc = auth0.Connection("oidc", + name="oidc-connection", + display_name="OIDC Connection", + strategy="oidc", + show_as_button=False, + options=auth0.ConnectionOptionsArgs( + client_id="1234567", + client_secret="1234567", + domain_aliases=["example.com"], + tenant_domain="", + icon_url="https://example.com/assets/logo.png", + type="back_channel", + issuer="https://www.paypalobjects.com", + jwks_uri="https://api.paypal.com/v1/oauth2/certs", + discovery_url="https://www.paypalobjects.com/.well-known/openid-configuration", + token_endpoint="https://api.paypal.com/v1/oauth2/token", + userinfo_endpoint="https://api.paypal.com/v1/oauth2/token/userinfo", + authorization_endpoint="https://www.paypal.com/signin/authorize", scopes=[ - "signin", - "graph_user", + "openid", + "email", ], set_user_root_attributes="on_first_login", - strategy_version=2, - ), - strategy="windowslive") + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + connection_settings=auth0.ConnectionOptionsConnectionSettingsArgs( + pkce="auto", + ), + attribute_map=auth0.ConnectionOptionsAttributeMapArgs( + mapping_mode="use_map", + userinfo_scope="openid email profile groups", + attributes=json.dumps({ + "name": "${context.tokenset.name}", + "email": "${context.tokenset.email}", + "email_verified": "${context.tokenset.email_verified}", + "nickname": "${context.tokenset.nickname}", + "picture": "${context.tokenset.picture}", + "given_name": "${context.tokenset.given_name}", + "family_name": "${context.tokenset.family_name}", + }), + ), + )) + ``` + + + ### Okta Connection + + + ```python + import pulumi + import json + import pulumi_auth0 as auth0 + + # This is an example of an Okta Workforce connection. + okta = auth0.Connection("okta", + name="okta-connection", + display_name="Okta Workforce Connection", + strategy="okta", + show_as_button=False, + options=auth0.ConnectionOptionsArgs( + client_id="1234567", + client_secret="1234567", + domain="example.okta.com", + domain_aliases=["example.com"], + issuer="https://example.okta.com", + jwks_uri="https://example.okta.com/oauth2/v1/keys", + token_endpoint="https://example.okta.com/oauth2/v1/token", + userinfo_endpoint="https://example.okta.com/oauth2/v1/userinfo", + authorization_endpoint="https://example.okta.com/oauth2/v1/authorize", + scopes=[ + "openid", + "email", + ], + set_user_root_attributes="on_first_login", + non_persistent_attrs=[ + "ethnicity", + "gender", + ], + upstream_params=json.dumps({ + "screen_name": { + "alias": "login_hint", + }, + }), + connection_settings=auth0.ConnectionOptionsConnectionSettingsArgs( + pkce="auto", + ), + attribute_map=auth0.ConnectionOptionsAttributeMapArgs( + mapping_mode="basic_profile", + userinfo_scope="openid email profile groups", + attributes=json.dumps({ + "name": "${context.tokenset.name}", + "email": "${context.tokenset.email}", + "email_verified": "${context.tokenset.email_verified}", + "nickname": "${context.tokenset.nickname}", + "picture": "${context.tokenset.picture}", + "given_name": "${context.tokenset.given_name}", + "family_name": "${context.tokenset.family_name}", + }), + ), + )) ``` diff --git a/sdk/python/pulumi_auth0/connection_client.py b/sdk/python/pulumi_auth0/connection_client.py index 3bfa58d9..bd94e685 100644 --- a/sdk/python/pulumi_auth0/connection_client.py +++ b/sdk/python/pulumi_auth0/connection_client.py @@ -144,11 +144,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_conn = auth0.Connection("myConn", strategy="auth0") - my_client = auth0.Client("myClient") + my_conn = auth0.Connection("my_conn", + name="My-Auth0-Connection", + strategy="auth0") + my_client = auth0.Client("my_client", name="My-Auth0-Client") # One connection to one client association. # To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. - my_conn_client_assoc = auth0.ConnectionClient("myConnClientAssoc", + my_conn_client_assoc = auth0.ConnectionClient("my_conn_client_assoc", connection_id=my_conn.id, client_id=my_client.id) ``` @@ -196,11 +198,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_conn = auth0.Connection("myConn", strategy="auth0") - my_client = auth0.Client("myClient") + my_conn = auth0.Connection("my_conn", + name="My-Auth0-Connection", + strategy="auth0") + my_client = auth0.Client("my_client", name="My-Auth0-Client") # One connection to one client association. # To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. - my_conn_client_assoc = auth0.ConnectionClient("myConnClientAssoc", + my_conn_client_assoc = auth0.ConnectionClient("my_conn_client_assoc", connection_id=my_conn.id, client_id=my_client.id) ``` diff --git a/sdk/python/pulumi_auth0/connection_clients.py b/sdk/python/pulumi_auth0/connection_clients.py index a53b57c5..1fd19183 100644 --- a/sdk/python/pulumi_auth0/connection_clients.py +++ b/sdk/python/pulumi_auth0/connection_clients.py @@ -144,12 +144,14 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_conn = auth0.Connection("myConn", strategy="auth0") - my_first_client = auth0.Client("myFirstClient") - my_second_client = auth0.Client("mySecondClient") + my_conn = auth0.Connection("my_conn", + name="My-Auth0-Connection", + strategy="auth0") + my_first_client = auth0.Client("my_first_client", name="My-First-Auth0-Client") + my_second_client = auth0.Client("my_second_client", name="My-Second-Auth0-Client") # One connection to many clients association. # To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. - my_conn_clients_assoc = auth0.ConnectionClients("myConnClientsAssoc", + my_conn_clients_assoc = auth0.ConnectionClients("my_conn_clients_assoc", connection_id=my_conn.id, enabled_clients=[ my_first_client.id, @@ -196,12 +198,14 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_conn = auth0.Connection("myConn", strategy="auth0") - my_first_client = auth0.Client("myFirstClient") - my_second_client = auth0.Client("mySecondClient") + my_conn = auth0.Connection("my_conn", + name="My-Auth0-Connection", + strategy="auth0") + my_first_client = auth0.Client("my_first_client", name="My-First-Auth0-Client") + my_second_client = auth0.Client("my_second_client", name="My-Second-Auth0-Client") # One connection to many clients association. # To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. - my_conn_clients_assoc = auth0.ConnectionClients("myConnClientsAssoc", + my_conn_clients_assoc = auth0.ConnectionClients("my_conn_clients_assoc", connection_id=my_conn.id, enabled_clients=[ my_first_client.id, diff --git a/sdk/python/pulumi_auth0/custom_domain.py b/sdk/python/pulumi_auth0/custom_domain.py index a494043d..e9ed8d82 100644 --- a/sdk/python/pulumi_auth0/custom_domain.py +++ b/sdk/python/pulumi_auth0/custom_domain.py @@ -239,7 +239,7 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_custom_domain = auth0.CustomDomain("myCustomDomain", + my_custom_domain = auth0.CustomDomain("my_custom_domain", domain="auth.example.com", type="auth0_managed_certs") ``` @@ -286,7 +286,7 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_custom_domain = auth0.CustomDomain("myCustomDomain", + my_custom_domain = auth0.CustomDomain("my_custom_domain", domain="auth.example.com", type="auth0_managed_certs") ``` diff --git a/sdk/python/pulumi_auth0/email_provider.py b/sdk/python/pulumi_auth0/email_provider.py index f388fe63..c3611c04 100644 --- a/sdk/python/pulumi_auth0/email_provider.py +++ b/sdk/python/pulumi_auth0/email_provider.py @@ -201,41 +201,6 @@ def __init__(__self__, """ With Auth0, you can have standard welcome, password reset, and account verification email-based workflows built right into Auth0. This resource allows you to configure email providers, so you can route all emails that are part of Auth0's authentication workflows through the supported high-volume email service of your choice. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - # This is an example on how to set up the email provider with Amazon SES. - amazon_ses_email_provider = auth0.EmailProvider("amazonSesEmailProvider", - credentials=auth0.EmailProviderCredentialsArgs( - access_key_id="AKIAXXXXXXXXXXXXXXXX", - region="us-east-1", - secret_access_key="7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - ), - default_from_address="accounts@example.com", - enabled=True) - # This is an example on how to set up the email provider with Sendgrid. - sendgrid_email_provider = auth0.EmailProvider("sendgridEmailProvider", - credentials=auth0.EmailProviderCredentialsArgs( - api_key="secretAPIKey", - ), - default_from_address="accounts@example.com", - enabled=True) - # This is an example on how to set up the email provider with MS365. - smtp_email_provider = auth0.EmailProvider("smtpEmailProvider", - credentials=auth0.EmailProviderCredentialsArgs( - ms365_client_id="ms365_client_id", - ms365_client_secret="ms365_client_secret", - ms365_tenant_id="ms365_tenant_id", - ), - default_from_address="accounts@example.com", - enabled=True) - ``` - - ## Import As this is not a resource identifiable by an ID within the Auth0 Management API, @@ -271,41 +236,6 @@ def __init__(__self__, """ With Auth0, you can have standard welcome, password reset, and account verification email-based workflows built right into Auth0. This resource allows you to configure email providers, so you can route all emails that are part of Auth0's authentication workflows through the supported high-volume email service of your choice. - ## Example Usage - - - ```python - import pulumi - import pulumi_auth0 as auth0 - - # This is an example on how to set up the email provider with Amazon SES. - amazon_ses_email_provider = auth0.EmailProvider("amazonSesEmailProvider", - credentials=auth0.EmailProviderCredentialsArgs( - access_key_id="AKIAXXXXXXXXXXXXXXXX", - region="us-east-1", - secret_access_key="7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - ), - default_from_address="accounts@example.com", - enabled=True) - # This is an example on how to set up the email provider with Sendgrid. - sendgrid_email_provider = auth0.EmailProvider("sendgridEmailProvider", - credentials=auth0.EmailProviderCredentialsArgs( - api_key="secretAPIKey", - ), - default_from_address="accounts@example.com", - enabled=True) - # This is an example on how to set up the email provider with MS365. - smtp_email_provider = auth0.EmailProvider("smtpEmailProvider", - credentials=auth0.EmailProviderCredentialsArgs( - ms365_client_id="ms365_client_id", - ms365_client_secret="ms365_client_secret", - ms365_tenant_id="ms365_tenant_id", - ), - default_from_address="accounts@example.com", - enabled=True) - ``` - - ## Import As this is not a resource identifiable by an ID within the Auth0 Management API, diff --git a/sdk/python/pulumi_auth0/email_template.py b/sdk/python/pulumi_auth0/email_template.py index 069aaaf0..076e5336 100644 --- a/sdk/python/pulumi_auth0/email_template.py +++ b/sdk/python/pulumi_auth0/email_template.py @@ -334,7 +334,8 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_email_provider = auth0.EmailProvider("myEmailProvider", + my_email_provider = auth0.EmailProvider("my_email_provider", + name="ses", enabled=True, default_from_address="accounts@example.com", credentials=auth0.EmailProviderCredentialsArgs( @@ -342,7 +343,7 @@ def __init__(__self__, secret_access_key="7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", region="us-east-1", )) - my_email_template = auth0.EmailTemplate("myEmailTemplate", + my_email_template = auth0.EmailTemplate("my_email_template", template="welcome_email", body="

Welcome!

", from_="welcome@example.com", @@ -409,7 +410,8 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_email_provider = auth0.EmailProvider("myEmailProvider", + my_email_provider = auth0.EmailProvider("my_email_provider", + name="ses", enabled=True, default_from_address="accounts@example.com", credentials=auth0.EmailProviderCredentialsArgs( @@ -417,7 +419,7 @@ def __init__(__self__, secret_access_key="7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", region="us-east-1", )) - my_email_template = auth0.EmailTemplate("myEmailTemplate", + my_email_template = auth0.EmailTemplate("my_email_template", template="welcome_email", body="

Welcome!

", from_="welcome@example.com", diff --git a/sdk/python/pulumi_auth0/get_client.py b/sdk/python/pulumi_auth0/get_client.py index baae2b9a..57f8f2f3 100644 --- a/sdk/python/pulumi_auth0/get_client.py +++ b/sdk/python/pulumi_auth0/get_client.py @@ -499,7 +499,9 @@ def get_client(client_id: Optional[str] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Client loaded using its name. some_client_by_name = auth0.get_client(name="Name of my Application") + # An Auth0 Client loaded using its ID. some_client_by_id = auth0.get_client(client_id="abcdefghkijklmnopqrstuvwxyz0123456789") ``` @@ -565,7 +567,9 @@ def get_client_output(client_id: Optional[pulumi.Input[Optional[str]]] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Client loaded using its name. some_client_by_name = auth0.get_client(name="Name of my Application") + # An Auth0 Client loaded using its ID. some_client_by_id = auth0.get_client(client_id="abcdefghkijklmnopqrstuvwxyz0123456789") ``` diff --git a/sdk/python/pulumi_auth0/get_connection.py b/sdk/python/pulumi_auth0/get_connection.py index 1b115bfc..4603edaa 100644 --- a/sdk/python/pulumi_auth0/get_connection.py +++ b/sdk/python/pulumi_auth0/get_connection.py @@ -178,7 +178,9 @@ def get_connection(connection_id: Optional[str] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Connection loaded using its name. some_connection_by_name = auth0.get_connection(name="Acceptance-Test-Connection-{{.testName}}") + # An Auth0 Connection loaded using its ID. some_connection_by_id = auth0.get_connection(connection_id="con_abcdefghkijklmnopqrstuvwxyz0123456789") ``` @@ -220,7 +222,9 @@ def get_connection_output(connection_id: Optional[pulumi.Input[Optional[str]]] = import pulumi import pulumi_auth0 as auth0 + # An Auth0 Connection loaded using its name. some_connection_by_name = auth0.get_connection(name="Acceptance-Test-Connection-{{.testName}}") + # An Auth0 Connection loaded using its ID. some_connection_by_id = auth0.get_connection(connection_id="con_abcdefghkijklmnopqrstuvwxyz0123456789") ``` diff --git a/sdk/python/pulumi_auth0/get_organization.py b/sdk/python/pulumi_auth0/get_organization.py index 7c066067..f4716309 100644 --- a/sdk/python/pulumi_auth0/get_organization.py +++ b/sdk/python/pulumi_auth0/get_organization.py @@ -139,7 +139,9 @@ def get_organization(name: Optional[str] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Organization loaded using its name. some_organization_by_name = auth0.get_organization(name="my-org") + # An Auth0 Organization loaded using its ID. some_organization_by_id = auth0.get_organization(organization_id="org_abcdefghkijklmnopqrstuvwxyz0123456789") ``` @@ -179,7 +181,9 @@ def get_organization_output(name: Optional[pulumi.Input[Optional[str]]] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Organization loaded using its name. some_organization_by_name = auth0.get_organization(name="my-org") + # An Auth0 Organization loaded using its ID. some_organization_by_id = auth0.get_organization(organization_id="org_abcdefghkijklmnopqrstuvwxyz0123456789") ``` diff --git a/sdk/python/pulumi_auth0/get_resource_server.py b/sdk/python/pulumi_auth0/get_resource_server.py index a1b1fd2f..f1ba7f24 100644 --- a/sdk/python/pulumi_auth0/get_resource_server.py +++ b/sdk/python/pulumi_auth0/get_resource_server.py @@ -214,7 +214,9 @@ def get_resource_server(identifier: Optional[str] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Resource Server loaded using its identifier. some_resource_server_by_identifier = auth0.get_resource_server(identifier="https://my-api.com/v1") + # An Auth0 Resource Server loaded using its ID. some_resource_server_by_id = auth0.get_resource_server(resource_server_id="abcdefghkijklmnopqrstuvwxyz0123456789") ``` @@ -260,7 +262,9 @@ def get_resource_server_output(identifier: Optional[pulumi.Input[Optional[str]]] import pulumi import pulumi_auth0 as auth0 + # An Auth0 Resource Server loaded using its identifier. some_resource_server_by_identifier = auth0.get_resource_server(identifier="https://my-api.com/v1") + # An Auth0 Resource Server loaded using its ID. some_resource_server_by_id = auth0.get_resource_server(resource_server_id="abcdefghkijklmnopqrstuvwxyz0123456789") ``` diff --git a/sdk/python/pulumi_auth0/get_role.py b/sdk/python/pulumi_auth0/get_role.py index 4d3d2b62..7e049e4f 100644 --- a/sdk/python/pulumi_auth0/get_role.py +++ b/sdk/python/pulumi_auth0/get_role.py @@ -118,7 +118,9 @@ def get_role(name: Optional[str] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Role loaded using its name. some_role_by_name = auth0.get_role(name="my-role") + # An Auth0 Role loaded using its ID. some_role_by_id = auth0.get_role(role_id="abcdefghkijklmnopqrstuvwxyz0123456789") ``` @@ -155,7 +157,9 @@ def get_role_output(name: Optional[pulumi.Input[Optional[str]]] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 Role loaded using its name. some_role_by_name = auth0.get_role(name="my-role") + # An Auth0 Role loaded using its ID. some_role_by_id = auth0.get_role(role_id="abcdefghkijklmnopqrstuvwxyz0123456789") ``` diff --git a/sdk/python/pulumi_auth0/get_user.py b/sdk/python/pulumi_auth0/get_user.py index b991f3bc..a212956c 100644 --- a/sdk/python/pulumi_auth0/get_user.py +++ b/sdk/python/pulumi_auth0/get_user.py @@ -285,6 +285,7 @@ def get_user(user_id: Optional[str] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 User loaded using its ID. my_user = auth0.get_user(user_id="auth0|34fdr23fdsfdfsf") ``` @@ -333,6 +334,7 @@ def get_user_output(user_id: Optional[pulumi.Input[str]] = None, import pulumi import pulumi_auth0 as auth0 + # An Auth0 User loaded using its ID. my_user = auth0.get_user(user_id="auth0|34fdr23fdsfdfsf") ``` diff --git a/sdk/python/pulumi_auth0/guardian.py b/sdk/python/pulumi_auth0/guardian.py index 809fc098..4c3e00a7 100644 --- a/sdk/python/pulumi_auth0/guardian.py +++ b/sdk/python/pulumi_auth0/guardian.py @@ -341,17 +341,21 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_guardian = auth0.Guardian("myGuardian", - duo=auth0.GuardianDuoArgs( - enabled=True, - hostname="api-hostname", - integration_key="someKey", - secret_key="someSecret", - ), + my_guardian = auth0.Guardian("my_guardian", + policy="all-applications", email=True, otp=True, + recovery_code=True, + webauthn_platform=auth0.GuardianWebauthnPlatformArgs( + enabled=True, + ), + webauthn_roaming=auth0.GuardianWebauthnRoamingArgs( + enabled=True, + user_verification="required", + ), phone=auth0.GuardianPhoneArgs( enabled=True, + provider="auth0", message_types=[ "sms", "voice", @@ -360,10 +364,10 @@ def __init__(__self__, enrollment_message="{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message="{{code}} is your verification code for {{tenant.friendly_name}}.", ), - provider="auth0", ), - policy="all-applications", push=auth0.GuardianPushArgs( + enabled=True, + provider="sns", amazon_sns=auth0.GuardianPushAmazonSnsArgs( aws_access_key_id="test1", aws_region="us-west-1", @@ -376,16 +380,12 @@ def __init__(__self__, apple_app_link="https://itunes.apple.com/us/app/my-app/id123121", google_app_link="https://play.google.com/store/apps/details?id=com.my.app", ), - enabled=True, - provider="sns", - ), - recovery_code=True, - webauthn_platform=auth0.GuardianWebauthnPlatformArgs( - enabled=True, ), - webauthn_roaming=auth0.GuardianWebauthnRoamingArgs( + duo=auth0.GuardianDuoArgs( enabled=True, - user_verification="required", + integration_key="someKey", + secret_key="someSecret", + hostname="api-hostname", )) ``` @@ -436,17 +436,21 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_guardian = auth0.Guardian("myGuardian", - duo=auth0.GuardianDuoArgs( - enabled=True, - hostname="api-hostname", - integration_key="someKey", - secret_key="someSecret", - ), + my_guardian = auth0.Guardian("my_guardian", + policy="all-applications", email=True, otp=True, + recovery_code=True, + webauthn_platform=auth0.GuardianWebauthnPlatformArgs( + enabled=True, + ), + webauthn_roaming=auth0.GuardianWebauthnRoamingArgs( + enabled=True, + user_verification="required", + ), phone=auth0.GuardianPhoneArgs( enabled=True, + provider="auth0", message_types=[ "sms", "voice", @@ -455,10 +459,10 @@ def __init__(__self__, enrollment_message="{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message="{{code}} is your verification code for {{tenant.friendly_name}}.", ), - provider="auth0", ), - policy="all-applications", push=auth0.GuardianPushArgs( + enabled=True, + provider="sns", amazon_sns=auth0.GuardianPushAmazonSnsArgs( aws_access_key_id="test1", aws_region="us-west-1", @@ -471,16 +475,12 @@ def __init__(__self__, apple_app_link="https://itunes.apple.com/us/app/my-app/id123121", google_app_link="https://play.google.com/store/apps/details?id=com.my.app", ), - enabled=True, - provider="sns", - ), - recovery_code=True, - webauthn_platform=auth0.GuardianWebauthnPlatformArgs( - enabled=True, ), - webauthn_roaming=auth0.GuardianWebauthnRoamingArgs( + duo=auth0.GuardianDuoArgs( enabled=True, - user_verification="required", + integration_key="someKey", + secret_key="someSecret", + hostname="api-hostname", )) ``` diff --git a/sdk/python/pulumi_auth0/hook.py b/sdk/python/pulumi_auth0/hook.py index 9a542af3..ebc743fb 100644 --- a/sdk/python/pulumi_auth0/hook.py +++ b/sdk/python/pulumi_auth0/hook.py @@ -241,20 +241,20 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_hook = auth0.Hook("myHook", - dependencies={ - "auth0": "2.30.0", - }, - enabled=True, + my_hook = auth0.Hook("my_hook", + name="My Pre User Registration Hook", script=\"\"\" function (user, context, callback) { callback(null, { user }); } - \"\"\", + trigger_id="pre-user-registration", + enabled=True, secrets={ "foo": "bar", }, - trigger_id="pre-user-registration") + dependencies={ + "auth0": "2.30.0", + }) ``` @@ -297,20 +297,20 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_hook = auth0.Hook("myHook", - dependencies={ - "auth0": "2.30.0", - }, - enabled=True, + my_hook = auth0.Hook("my_hook", + name="My Pre User Registration Hook", script=\"\"\" function (user, context, callback) { callback(null, { user }); } - \"\"\", + trigger_id="pre-user-registration", + enabled=True, secrets={ "foo": "bar", }, - trigger_id="pre-user-registration") + dependencies={ + "auth0": "2.30.0", + }) ``` diff --git a/sdk/python/pulumi_auth0/log_stream.py b/sdk/python/pulumi_auth0/log_stream.py index fe19c82c..64ecaecc 100644 --- a/sdk/python/pulumi_auth0/log_stream.py +++ b/sdk/python/pulumi_auth0/log_stream.py @@ -209,36 +209,38 @@ def __init__(__self__, import pulumi_auth0 as auth0 # This is an example of an http log stream. - my_webhook = auth0.LogStream("myWebhook", + my_webhook = auth0.LogStream("my_webhook", + name="HTTP log stream", + type="http", filters=[ { - "name": "auth.login.fail", "type": "category", + "name": "auth.login.fail", }, { - "name": "auth.signup.fail", "type": "category", + "name": "auth.signup.fail", }, ], sink=auth0.LogStreamSinkArgs( - http_authorization="AKIAXXXXXXXXXXXXXXXX", - http_content_format="JSONOBJECT", + http_endpoint="https://example.com/logs", http_content_type="application/json", + http_content_format="JSONOBJECT", + http_authorization="AKIAXXXXXXXXXXXXXXXX", http_custom_headers=[{ "header": "foo", "value": "bar", }], - http_endpoint="https://example.com/logs", - ), - type="http") + )) # This is an example of an Amazon EventBridge log stream. - example_aws = auth0.LogStream("exampleAws", + example_aws = auth0.LogStream("example_aws", + name="AWS Eventbridge", + type="eventbridge", + status="active", sink=auth0.LogStreamSinkArgs( aws_account_id="my_account_id", aws_region="us-east-2", - ), - status="active", - type="eventbridge") + )) ``` @@ -279,36 +281,38 @@ def __init__(__self__, import pulumi_auth0 as auth0 # This is an example of an http log stream. - my_webhook = auth0.LogStream("myWebhook", + my_webhook = auth0.LogStream("my_webhook", + name="HTTP log stream", + type="http", filters=[ { - "name": "auth.login.fail", "type": "category", + "name": "auth.login.fail", }, { - "name": "auth.signup.fail", "type": "category", + "name": "auth.signup.fail", }, ], sink=auth0.LogStreamSinkArgs( - http_authorization="AKIAXXXXXXXXXXXXXXXX", - http_content_format="JSONOBJECT", + http_endpoint="https://example.com/logs", http_content_type="application/json", + http_content_format="JSONOBJECT", + http_authorization="AKIAXXXXXXXXXXXXXXXX", http_custom_headers=[{ "header": "foo", "value": "bar", }], - http_endpoint="https://example.com/logs", - ), - type="http") + )) # This is an example of an Amazon EventBridge log stream. - example_aws = auth0.LogStream("exampleAws", + example_aws = auth0.LogStream("example_aws", + name="AWS Eventbridge", + type="eventbridge", + status="active", sink=auth0.LogStreamSinkArgs( aws_account_id="my_account_id", aws_region="us-east-2", - ), - status="active", - type="eventbridge") + )) ``` diff --git a/sdk/python/pulumi_auth0/organization.py b/sdk/python/pulumi_auth0/organization.py index dcc68fce..2ef32764 100644 --- a/sdk/python/pulumi_auth0/organization.py +++ b/sdk/python/pulumi_auth0/organization.py @@ -183,15 +183,16 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_organization = auth0.Organization("myOrganization", + my_organization = auth0.Organization("my_organization", + name="auth0-inc", + display_name="Auth0 Inc.", branding=auth0.OrganizationBrandingArgs( + logo_url="https://example.com/assets/icons/icon.png", colors={ - "pageBackground": "#e1e1e1", "primary": "#f2f2f2", + "page_background": "#e1e1e1", }, - logo_url="https://example.com/assets/icons/icon.png", - ), - display_name="Auth0 Inc.") + )) ``` @@ -236,15 +237,16 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_organization = auth0.Organization("myOrganization", + my_organization = auth0.Organization("my_organization", + name="auth0-inc", + display_name="Auth0 Inc.", branding=auth0.OrganizationBrandingArgs( + logo_url="https://example.com/assets/icons/icon.png", colors={ - "pageBackground": "#e1e1e1", "primary": "#f2f2f2", + "page_background": "#e1e1e1", }, - logo_url="https://example.com/assets/icons/icon.png", - ), - display_name="Auth0 Inc.") + )) ``` diff --git a/sdk/python/pulumi_auth0/organization_connection.py b/sdk/python/pulumi_auth0/organization_connection.py index b7be8d24..72bd5243 100644 --- a/sdk/python/pulumi_auth0/organization_connection.py +++ b/sdk/python/pulumi_auth0/organization_connection.py @@ -177,9 +177,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_connection = auth0.Connection("myConnection", strategy="auth0") - my_organization = auth0.Organization("myOrganization", display_name="My Organization") - my_org_conn = auth0.OrganizationConnection("myOrgConn", + my_connection = auth0.Connection("my_connection", + name="My Connection", + strategy="auth0") + my_organization = auth0.Organization("my_organization", + name="my-organization", + display_name="My Organization") + my_org_conn = auth0.OrganizationConnection("my_org_conn", organization_id=my_organization.id, connection_id=my_connection.id, assign_membership_on_login=True) @@ -229,9 +233,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_connection = auth0.Connection("myConnection", strategy="auth0") - my_organization = auth0.Organization("myOrganization", display_name="My Organization") - my_org_conn = auth0.OrganizationConnection("myOrgConn", + my_connection = auth0.Connection("my_connection", + name="My Connection", + strategy="auth0") + my_organization = auth0.Organization("my_organization", + name="my-organization", + display_name="My Organization") + my_org_conn = auth0.OrganizationConnection("my_org_conn", organization_id=my_organization.id, connection_id=my_connection.id, assign_membership_on_login=True) diff --git a/sdk/python/pulumi_auth0/organization_connections.py b/sdk/python/pulumi_auth0/organization_connections.py index 9f3bc71f..cea6b20f 100644 --- a/sdk/python/pulumi_auth0/organization_connections.py +++ b/sdk/python/pulumi_auth0/organization_connections.py @@ -114,9 +114,15 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_connection_1 = auth0.Connection("myConnection-1", strategy="auth0") - my_connection_2 = auth0.Connection("myConnection-2", strategy="auth0") - my_organization = auth0.Organization("myOrganization", display_name="My Organization") + my_connection_1 = auth0.Connection("my_connection-1", + name="My Connection 1", + strategy="auth0") + my_connection_2 = auth0.Connection("my_connection-2", + name="My Connection 2", + strategy="auth0") + my_organization = auth0.Organization("my_organization", + name="my-organization", + display_name="My Organization") one_to_many = auth0.OrganizationConnections("one-to-many", organization_id=my_organization.id, enabled_connections=[ @@ -170,9 +176,15 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_connection_1 = auth0.Connection("myConnection-1", strategy="auth0") - my_connection_2 = auth0.Connection("myConnection-2", strategy="auth0") - my_organization = auth0.Organization("myOrganization", display_name="My Organization") + my_connection_1 = auth0.Connection("my_connection-1", + name="My Connection 1", + strategy="auth0") + my_connection_2 = auth0.Connection("my_connection-2", + name="My Connection 2", + strategy="auth0") + my_organization = auth0.Organization("my_organization", + name="my-organization", + display_name="My Organization") one_to_many = auth0.OrganizationConnections("one-to-many", organization_id=my_organization.id, enabled_connections=[ diff --git a/sdk/python/pulumi_auth0/organization_member.py b/sdk/python/pulumi_auth0/organization_member.py index ff46db2c..5fb09236 100644 --- a/sdk/python/pulumi_auth0/organization_member.py +++ b/sdk/python/pulumi_auth0/organization_member.py @@ -116,8 +116,10 @@ def __init__(__self__, connection_name="Username-Password-Authentication", email_verified=True, password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Admin") - my_org_member = auth0.OrganizationMember("myOrgMember", + my_org = auth0.Organization("my_org", + name="org-admin", + display_name="Admin") + my_org_member = auth0.OrganizationMember("my_org_member", organization_id=my_org.id, user_id=user.id) ``` @@ -169,8 +171,10 @@ def __init__(__self__, connection_name="Username-Password-Authentication", email_verified=True, password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Admin") - my_org_member = auth0.OrganizationMember("myOrgMember", + my_org = auth0.Organization("my_org", + name="org-admin", + display_name="Admin") + my_org_member = auth0.OrganizationMember("my_org_member", organization_id=my_org.id, user_id=user.id) ``` diff --git a/sdk/python/pulumi_auth0/organization_member_role.py b/sdk/python/pulumi_auth0/organization_member_role.py index 4da83252..1ab29b14 100644 --- a/sdk/python/pulumi_auth0/organization_member_role.py +++ b/sdk/python/pulumi_auth0/organization_member_role.py @@ -171,14 +171,16 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - reader = auth0.Role("reader") - writer = auth0.Role("writer") + reader = auth0.Role("reader", name="Reader") + writer = auth0.Role("writer", name="Writer") user = auth0.User("user", connection_name="Username-Password-Authentication", email="test-user@auth0.com", password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Some Org") - my_org_member = auth0.OrganizationMember("myOrgMember", + my_org = auth0.Organization("my_org", + name="some-org", + display_name="Some Org") + my_org_member = auth0.OrganizationMember("my_org_member", organization_id=my_org.id, user_id=user.id) role1 = auth0.OrganizationMemberRole("role1", @@ -230,14 +232,16 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - reader = auth0.Role("reader") - writer = auth0.Role("writer") + reader = auth0.Role("reader", name="Reader") + writer = auth0.Role("writer", name="Writer") user = auth0.User("user", connection_name="Username-Password-Authentication", email="test-user@auth0.com", password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Some Org") - my_org_member = auth0.OrganizationMember("myOrgMember", + my_org = auth0.Organization("my_org", + name="some-org", + display_name="Some Org") + my_org_member = auth0.OrganizationMember("my_org_member", organization_id=my_org.id, user_id=user.id) role1 = auth0.OrganizationMemberRole("role1", diff --git a/sdk/python/pulumi_auth0/organization_member_roles.py b/sdk/python/pulumi_auth0/organization_member_roles.py index 17f8999a..752fd124 100644 --- a/sdk/python/pulumi_auth0/organization_member_roles.py +++ b/sdk/python/pulumi_auth0/organization_member_roles.py @@ -139,17 +139,19 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - reader = auth0.Role("reader") - writer = auth0.Role("writer") + reader = auth0.Role("reader", name="Reader") + writer = auth0.Role("writer", name="Writer") user = auth0.User("user", connection_name="Username-Password-Authentication", email="test-user@auth0.com", password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Some Org") - my_org_member = auth0.OrganizationMember("myOrgMember", + my_org = auth0.Organization("my_org", + name="some-org", + display_name="Some Org") + my_org_member = auth0.OrganizationMember("my_org_member", organization_id=my_org.id, user_id=user.id) - my_org_member_roles = auth0.OrganizationMemberRoles("myOrgMemberRoles", + my_org_member_roles = auth0.OrganizationMemberRoles("my_org_member_roles", organization_id=my_org.id, user_id=user.id, roles=[ @@ -197,17 +199,19 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - reader = auth0.Role("reader") - writer = auth0.Role("writer") + reader = auth0.Role("reader", name="Reader") + writer = auth0.Role("writer", name="Writer") user = auth0.User("user", connection_name="Username-Password-Authentication", email="test-user@auth0.com", password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Some Org") - my_org_member = auth0.OrganizationMember("myOrgMember", + my_org = auth0.Organization("my_org", + name="some-org", + display_name="Some Org") + my_org_member = auth0.OrganizationMember("my_org_member", organization_id=my_org.id, user_id=user.id) - my_org_member_roles = auth0.OrganizationMemberRoles("myOrgMemberRoles", + my_org_member_roles = auth0.OrganizationMemberRoles("my_org_member_roles", organization_id=my_org.id, user_id=user.id, roles=[ diff --git a/sdk/python/pulumi_auth0/organization_members.py b/sdk/python/pulumi_auth0/organization_members.py index 8c7c19f7..f34ad24d 100644 --- a/sdk/python/pulumi_auth0/organization_members.py +++ b/sdk/python/pulumi_auth0/organization_members.py @@ -112,16 +112,18 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - user1 = auth0.User("user1", + user1 = auth0.User("user_1", connection_name="Username-Password-Authentication", email="myuser1@auth0.com", password="MyPass123$") - user2 = auth0.User("user2", + user2 = auth0.User("user_2", connection_name="Username-Password-Authentication", email="myuser2@auth0.com", password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Some Organization") - my_members = auth0.OrganizationMembers("myMembers", + my_org = auth0.Organization("my_org", + name="some-org", + display_name="Some Organization") + my_members = auth0.OrganizationMembers("my_members", organization_id=my_org.id, members=[ user1.id, @@ -168,16 +170,18 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - user1 = auth0.User("user1", + user1 = auth0.User("user_1", connection_name="Username-Password-Authentication", email="myuser1@auth0.com", password="MyPass123$") - user2 = auth0.User("user2", + user2 = auth0.User("user_2", connection_name="Username-Password-Authentication", email="myuser2@auth0.com", password="MyPass123$") - my_org = auth0.Organization("myOrg", display_name="Some Organization") - my_members = auth0.OrganizationMembers("myMembers", + my_org = auth0.Organization("my_org", + name="some-org", + display_name="Some Organization") + my_members = auth0.OrganizationMembers("my_members", organization_id=my_org.id, members=[ user1.id, diff --git a/sdk/python/pulumi_auth0/pages.py b/sdk/python/pulumi_auth0/pages.py index 7d254a0a..b00fdfb3 100644 --- a/sdk/python/pulumi_auth0/pages.py +++ b/sdk/python/pulumi_auth0/pages.py @@ -177,23 +177,23 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_pages = auth0.Pages("myPages", + my_pages = auth0.Pages("my_pages", + login=auth0.PagesLoginArgs( + enabled=True, + html="My Custom Login Page", + ), change_password=auth0.PagesChangePasswordArgs( enabled=True, html="My Custom Reset Password Page", ), - error=auth0.PagesErrorArgs( - html="My Custom Error Page", - show_log_link=True, - url="https://example.com", - ), guardian_mfa=auth0.PagesGuardianMfaArgs( enabled=True, html="My Custom MFA Page", ), - login=auth0.PagesLoginArgs( - enabled=True, - html="My Custom Login Page", + error=auth0.PagesErrorArgs( + show_log_link=True, + html="My Custom Error Page", + url="https://example.com", )) ``` @@ -239,23 +239,23 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_pages = auth0.Pages("myPages", + my_pages = auth0.Pages("my_pages", + login=auth0.PagesLoginArgs( + enabled=True, + html="My Custom Login Page", + ), change_password=auth0.PagesChangePasswordArgs( enabled=True, html="My Custom Reset Password Page", ), - error=auth0.PagesErrorArgs( - html="My Custom Error Page", - show_log_link=True, - url="https://example.com", - ), guardian_mfa=auth0.PagesGuardianMfaArgs( enabled=True, html="My Custom MFA Page", ), - login=auth0.PagesLoginArgs( - enabled=True, - html="My Custom Login Page", + error=auth0.PagesErrorArgs( + show_log_link=True, + html="My Custom Error Page", + url="https://example.com", )) ``` diff --git a/sdk/python/pulumi_auth0/prompt.py b/sdk/python/pulumi_auth0/prompt.py index ddf74f81..c5ae3cf3 100644 --- a/sdk/python/pulumi_auth0/prompt.py +++ b/sdk/python/pulumi_auth0/prompt.py @@ -142,9 +142,9 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_prompt = auth0.Prompt("myPrompt", - identifier_first=False, + my_prompt = auth0.Prompt("my_prompt", universal_login_experience="new", + identifier_first=False, webauthn_platform_first_factor=True) ``` @@ -189,9 +189,9 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_prompt = auth0.Prompt("myPrompt", - identifier_first=False, + my_prompt = auth0.Prompt("my_prompt", universal_login_experience="new", + identifier_first=False, webauthn_platform_first_factor=True) ``` diff --git a/sdk/python/pulumi_auth0/prompt_partials.py b/sdk/python/pulumi_auth0/prompt_partials.py index e1661888..2d824f24 100644 --- a/sdk/python/pulumi_auth0/prompt_partials.py +++ b/sdk/python/pulumi_auth0/prompt_partials.py @@ -273,14 +273,14 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_login_prompt_partials = auth0.PromptPartials("myLoginPromptPartials", - form_content_end="
Updated Form Content End
", + my_login_prompt_partials = auth0.PromptPartials("my_login_prompt_partials", + prompt="login", form_content_start="
Updated Form Content Start
", - form_footer_end="
Updated Footer End
", + form_content_end="
Updated Form Content End
", form_footer_start="
Updated Footer Start
", - prompt="login", - secondary_actions_end="
Updated Secondary Actions End
", - secondary_actions_start="
Updated Secondary Actions Start
") + form_footer_end="
Updated Footer End
", + secondary_actions_start="
Updated Secondary Actions Start
", + secondary_actions_end="
Updated Secondary Actions End
") ``` @@ -322,14 +322,14 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_login_prompt_partials = auth0.PromptPartials("myLoginPromptPartials", - form_content_end="
Updated Form Content End
", + my_login_prompt_partials = auth0.PromptPartials("my_login_prompt_partials", + prompt="login", form_content_start="
Updated Form Content Start
", - form_footer_end="
Updated Footer End
", + form_content_end="
Updated Form Content End
", form_footer_start="
Updated Footer Start
", - prompt="login", - secondary_actions_end="
Updated Secondary Actions End
", - secondary_actions_start="
Updated Secondary Actions Start
") + form_footer_end="
Updated Footer End
", + secondary_actions_start="
Updated Secondary Actions Start
", + secondary_actions_end="
Updated Secondary Actions End
") ``` diff --git a/sdk/python/pulumi_auth0/resource_server.py b/sdk/python/pulumi_auth0/resource_server.py index fa91c71b..2118abfd 100644 --- a/sdk/python/pulumi_auth0/resource_server.py +++ b/sdk/python/pulumi_auth0/resource_server.py @@ -405,12 +405,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_resource_server = auth0.ResourceServer("myResourceServer", - allow_offline_access=True, + my_resource_server = auth0.ResourceServer("my_resource_server", + name="Example Resource Server (Managed by Terraform)", identifier="https://api.example.com", signing_alg="RS256", - skip_consent_for_verifiable_first_party_clients=True, - token_lifetime=8600) + allow_offline_access=True, + token_lifetime=8600, + skip_consent_for_verifiable_first_party_clients=True) ``` @@ -456,12 +457,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_resource_server = auth0.ResourceServer("myResourceServer", - allow_offline_access=True, + my_resource_server = auth0.ResourceServer("my_resource_server", + name="Example Resource Server (Managed by Terraform)", identifier="https://api.example.com", signing_alg="RS256", - skip_consent_for_verifiable_first_party_clients=True, - token_lifetime=8600) + allow_offline_access=True, + token_lifetime=8600, + skip_consent_for_verifiable_first_party_clients=True) ``` diff --git a/sdk/python/pulumi_auth0/resource_server_scope.py b/sdk/python/pulumi_auth0/resource_server_scope.py index e8649e8a..1b73cddd 100644 --- a/sdk/python/pulumi_auth0/resource_server_scope.py +++ b/sdk/python/pulumi_auth0/resource_server_scope.py @@ -144,11 +144,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - resource_server = auth0.ResourceServer("resourceServer", identifier="https://api.example.com") - read_posts = auth0.ResourceServerScope("readPosts", + resource_server = auth0.ResourceServer("resource_server", + name="Example Resource Server (Managed by Terraform)", + identifier="https://api.example.com") + read_posts = auth0.ResourceServerScope("read_posts", resource_server_identifier=resource_server.identifier, scope="read:posts") - write_posts = auth0.ResourceServerScope("writePosts", + write_posts = auth0.ResourceServerScope("write_posts", resource_server_identifier=resource_server.identifier, scope="write:posts") ``` @@ -196,11 +198,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - resource_server = auth0.ResourceServer("resourceServer", identifier="https://api.example.com") - read_posts = auth0.ResourceServerScope("readPosts", + resource_server = auth0.ResourceServer("resource_server", + name="Example Resource Server (Managed by Terraform)", + identifier="https://api.example.com") + read_posts = auth0.ResourceServerScope("read_posts", resource_server_identifier=resource_server.identifier, scope="read:posts") - write_posts = auth0.ResourceServerScope("writePosts", + write_posts = auth0.ResourceServerScope("write_posts", resource_server_identifier=resource_server.identifier, scope="write:posts") ``` diff --git a/sdk/python/pulumi_auth0/resource_server_scopes.py b/sdk/python/pulumi_auth0/resource_server_scopes.py index b9c91773..44e7faeb 100644 --- a/sdk/python/pulumi_auth0/resource_server_scopes.py +++ b/sdk/python/pulumi_auth0/resource_server_scopes.py @@ -106,8 +106,10 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_api = auth0.ResourceServer("myApi", identifier="https://api.example.com") - my_api_scopes = auth0.ResourceServerScopes("myApiScopes", + my_api = auth0.ResourceServer("my_api", + name="Example Resource Server (Managed by Terraform)", + identifier="https://api.example.com") + my_api_scopes = auth0.ResourceServerScopes("my_api_scopes", resource_server_identifier=my_api.identifier, scopes=[ auth0.ResourceServerScopesScopeArgs( @@ -159,8 +161,10 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_api = auth0.ResourceServer("myApi", identifier="https://api.example.com") - my_api_scopes = auth0.ResourceServerScopes("myApiScopes", + my_api = auth0.ResourceServer("my_api", + name="Example Resource Server (Managed by Terraform)", + identifier="https://api.example.com") + my_api_scopes = auth0.ResourceServerScopes("my_api_scopes", resource_server_identifier=my_api.identifier, scopes=[ auth0.ResourceServerScopesScopeArgs( diff --git a/sdk/python/pulumi_auth0/role.py b/sdk/python/pulumi_auth0/role.py index dbc6330c..76fcf184 100644 --- a/sdk/python/pulumi_auth0/role.py +++ b/sdk/python/pulumi_auth0/role.py @@ -113,7 +113,9 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_role = auth0.Role("myRole", description="Role Description...") + my_role = auth0.Role("my_role", + name="My Role - (Managed by Terraform)", + description="Role Description...") ``` @@ -150,7 +152,9 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_role = auth0.Role("myRole", description="Role Description...") + my_role = auth0.Role("my_role", + name="My Role - (Managed by Terraform)", + description="Role Description...") ``` diff --git a/sdk/python/pulumi_auth0/rule.py b/sdk/python/pulumi_auth0/rule.py index 0fcdc74d..5f27878d 100644 --- a/sdk/python/pulumi_auth0/rule.py +++ b/sdk/python/pulumi_auth0/rule.py @@ -176,13 +176,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_rule = auth0.Rule("myRule", - enabled=True, + my_rule = auth0.Rule("my_rule", + name="empty-rule", script=\"\"\" function (user, context, callback) { callback(null, user, context); } - - \"\"\") + \"\"\", + enabled=True) ``` @@ -223,13 +223,13 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_rule = auth0.Rule("myRule", - enabled=True, + my_rule = auth0.Rule("my_rule", + name="empty-rule", script=\"\"\" function (user, context, callback) { callback(null, user, context); } - - \"\"\") + \"\"\", + enabled=True) ``` diff --git a/sdk/python/pulumi_auth0/rule_config.py b/sdk/python/pulumi_auth0/rule_config.py index 777457d3..506f7298 100644 --- a/sdk/python/pulumi_auth0/rule_config.py +++ b/sdk/python/pulumi_auth0/rule_config.py @@ -107,14 +107,14 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_rule = auth0.Rule("myRule", - enabled=True, + my_rule = auth0.Rule("my_rule", + name="empty-rule", script=\"\"\" function (user, context, callback) { callback(null, user, context); } - - \"\"\") - my_rule_config = auth0.RuleConfig("myRuleConfig", + \"\"\", + enabled=True) + my_rule_config = auth0.RuleConfig("my_rule_config", key="foo", value="bar") ``` @@ -153,14 +153,14 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_rule = auth0.Rule("myRule", - enabled=True, + my_rule = auth0.Rule("my_rule", + name="empty-rule", script=\"\"\" function (user, context, callback) { callback(null, user, context); } - - \"\"\") - my_rule_config = auth0.RuleConfig("myRuleConfig", + \"\"\", + enabled=True) + my_rule_config = auth0.RuleConfig("my_rule_config", key="foo", value="bar") ``` diff --git a/sdk/python/pulumi_auth0/tenant.py b/sdk/python/pulumi_auth0/tenant.py index de09d39c..dc7f4f0f 100644 --- a/sdk/python/pulumi_auth0/tenant.py +++ b/sdk/python/pulumi_auth0/tenant.py @@ -609,30 +609,30 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_tenant = auth0.Tenant("myTenant", + my_tenant = auth0.Tenant("my_tenant", + friendly_name="Tenant Name", + picture_url="http://example.com/logo.png", + support_email="support@example.com", + support_url="http://example.com/support", allowed_logout_urls=["http://example.com/logout"], - default_redirection_uri="https://example.com/login", + session_lifetime=8760, + sandbox_version="12", enabled_locales=["en"], + default_redirection_uri="https://example.com/login", flags=auth0.TenantFlagsArgs( disable_clickjack_protection_headers=True, - disable_fields_map_fix=False, - disable_management_api_sms_obfuscation=False, enable_public_signup_user_exists_error=True, - no_disclose_enterprise_connections=False, use_scope_descriptions_for_consent=True, + no_disclose_enterprise_connections=False, + disable_management_api_sms_obfuscation=False, + disable_fields_map_fix=False, ), - friendly_name="Tenant Name", - picture_url="http://example.com/logo.png", - sandbox_version="12", session_cookie=auth0.TenantSessionCookieArgs( mode="non-persistent", ), - session_lifetime=8760, sessions=auth0.TenantSessionsArgs( oidc_logout_prompt_enabled=False, - ), - support_email="support@example.com", - support_url="http://example.com/support") + )) ``` @@ -693,30 +693,30 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - my_tenant = auth0.Tenant("myTenant", + my_tenant = auth0.Tenant("my_tenant", + friendly_name="Tenant Name", + picture_url="http://example.com/logo.png", + support_email="support@example.com", + support_url="http://example.com/support", allowed_logout_urls=["http://example.com/logout"], - default_redirection_uri="https://example.com/login", + session_lifetime=8760, + sandbox_version="12", enabled_locales=["en"], + default_redirection_uri="https://example.com/login", flags=auth0.TenantFlagsArgs( disable_clickjack_protection_headers=True, - disable_fields_map_fix=False, - disable_management_api_sms_obfuscation=False, enable_public_signup_user_exists_error=True, - no_disclose_enterprise_connections=False, use_scope_descriptions_for_consent=True, + no_disclose_enterprise_connections=False, + disable_management_api_sms_obfuscation=False, + disable_fields_map_fix=False, ), - friendly_name="Tenant Name", - picture_url="http://example.com/logo.png", - sandbox_version="12", session_cookie=auth0.TenantSessionCookieArgs( mode="non-persistent", ), - session_lifetime=8760, sessions=auth0.TenantSessionsArgs( oidc_logout_prompt_enabled=False, - ), - support_email="support@example.com", - support_url="http://example.com/support") + )) ``` diff --git a/sdk/python/pulumi_auth0/trigger_action.py b/sdk/python/pulumi_auth0/trigger_action.py index f2c09c7e..9a6ae29b 100644 --- a/sdk/python/pulumi_auth0/trigger_action.py +++ b/sdk/python/pulumi_auth0/trigger_action.py @@ -146,7 +146,8 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - login_alert = auth0.Action("loginAlert", + login_alert = auth0.Action("login_alert", + name="Alert after login", code=\"\"\"exports.onContinuePostLogin = async (event, api) => { console.log("foo"); };" @@ -156,7 +157,7 @@ def __init__(__self__, id="post-login", version="v3", )) - post_login_alert_action = auth0.TriggerAction("postLoginAlertAction", + post_login_alert_action = auth0.TriggerAction("post_login_alert_action", trigger="post-login", action_id=login_alert.id) ``` @@ -206,7 +207,8 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - login_alert = auth0.Action("loginAlert", + login_alert = auth0.Action("login_alert", + name="Alert after login", code=\"\"\"exports.onContinuePostLogin = async (event, api) => { console.log("foo"); };" @@ -216,7 +218,7 @@ def __init__(__self__, id="post-login", version="v3", )) - post_login_alert_action = auth0.TriggerAction("postLoginAlertAction", + post_login_alert_action = auth0.TriggerAction("post_login_alert_action", trigger="post-login", action_id=login_alert.id) ``` diff --git a/sdk/python/pulumi_auth0/trigger_actions.py b/sdk/python/pulumi_auth0/trigger_actions.py index f1d8c63d..84a6495a 100644 --- a/sdk/python/pulumi_auth0/trigger_actions.py +++ b/sdk/python/pulumi_auth0/trigger_actions.py @@ -113,7 +113,8 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - action_foo = auth0.Action("actionFoo", + action_foo = auth0.Action("action_foo", + name="Test Trigger Binding Foo", code=\"\"\"exports.onContinuePostLogin = async (event, api) => { console.log("foo"); };" @@ -123,7 +124,8 @@ def __init__(__self__, id="post-login", version="v3", )) - action_bar = auth0.Action("actionBar", + action_bar = auth0.Action("action_bar", + name="Test Trigger Binding Bar", code=\"\"\"exports.onContinuePostLogin = async (event, api) => { console.log("bar"); };" @@ -133,7 +135,7 @@ def __init__(__self__, id="post-login", version="v3", )) - login_flow = auth0.TriggerActions("loginFlow", + login_flow = auth0.TriggerActions("login_flow", trigger="post-login", actions=[ auth0.TriggerActionsActionArgs( @@ -185,7 +187,8 @@ def __init__(__self__, import pulumi import pulumi_auth0 as auth0 - action_foo = auth0.Action("actionFoo", + action_foo = auth0.Action("action_foo", + name="Test Trigger Binding Foo", code=\"\"\"exports.onContinuePostLogin = async (event, api) => { console.log("foo"); };" @@ -195,7 +198,8 @@ def __init__(__self__, id="post-login", version="v3", )) - action_bar = auth0.Action("actionBar", + action_bar = auth0.Action("action_bar", + name="Test Trigger Binding Bar", code=\"\"\"exports.onContinuePostLogin = async (event, api) => { console.log("bar"); };" @@ -205,7 +209,7 @@ def __init__(__self__, id="post-login", version="v3", )) - login_flow = auth0.TriggerActions("loginFlow", + login_flow = auth0.TriggerActions("login_flow", trigger="post-login", actions=[ auth0.TriggerActionsActionArgs( diff --git a/sdk/python/pulumi_auth0/user.py b/sdk/python/pulumi_auth0/user.py index 908d6f7a..1b3a5944 100644 --- a/sdk/python/pulumi_auth0/user.py +++ b/sdk/python/pulumi_auth0/user.py @@ -605,13 +605,14 @@ def __init__(__self__, user = auth0.User("user", connection_name="Username-Password-Authentication", + user_id="12345", + username="unique_username", + name="Firstname Lastname", + nickname="some.nickname", email="test@test.com", email_verified=True, - nickname="some.nickname", password="passpass$12$12", - picture="https://www.example.com/a-valid-picture-url.jpg", - user_id="12345", - username="unique_username") + picture="https://www.example.com/a-valid-picture-url.jpg") ``` @@ -665,13 +666,14 @@ def __init__(__self__, user = auth0.User("user", connection_name="Username-Password-Authentication", + user_id="12345", + username="unique_username", + name="Firstname Lastname", + nickname="some.nickname", email="test@test.com", email_verified=True, - nickname="some.nickname", password="passpass$12$12", - picture="https://www.example.com/a-valid-picture-url.jpg", - user_id="12345", - username="unique_username") + picture="https://www.example.com/a-valid-picture-url.jpg") ``` diff --git a/sdk/python/pulumi_auth0/user_role.py b/sdk/python/pulumi_auth0/user_role.py index 1acc714b..7d83a76d 100644 --- a/sdk/python/pulumi_auth0/user_role.py +++ b/sdk/python/pulumi_auth0/user_role.py @@ -144,13 +144,16 @@ def __init__(__self__, import pulumi_auth0 as auth0 # Example: - admin = auth0.Role("admin", description="Administrator") + admin = auth0.Role("admin", + name="admin", + description="Administrator") user = auth0.User("user", connection_name="Username-Password-Authentication", username="unique_username", + name="Firstname Lastname", email="test@test.com", password="passpass$12$12") - user_roles = auth0.UserRole("userRoles", + user_roles = auth0.UserRole("user_roles", user_id=user.id, role_id=admin.id) ``` @@ -198,13 +201,16 @@ def __init__(__self__, import pulumi_auth0 as auth0 # Example: - admin = auth0.Role("admin", description="Administrator") + admin = auth0.Role("admin", + name="admin", + description="Administrator") user = auth0.User("user", connection_name="Username-Password-Authentication", username="unique_username", + name="Firstname Lastname", email="test@test.com", password="passpass$12$12") - user_roles = auth0.UserRole("userRoles", + user_roles = auth0.UserRole("user_roles", user_id=user.id, role_id=admin.id) ``` diff --git a/sdk/python/pulumi_auth0/user_roles.py b/sdk/python/pulumi_auth0/user_roles.py index 523dbfaa..bab80bc4 100644 --- a/sdk/python/pulumi_auth0/user_roles.py +++ b/sdk/python/pulumi_auth0/user_roles.py @@ -112,13 +112,16 @@ def __init__(__self__, import pulumi_auth0 as auth0 # Example: - admin = auth0.Role("admin", description="Administrator") + admin = auth0.Role("admin", + name="admin", + description="Administrator") user = auth0.User("user", connection_name="Username-Password-Authentication", username="unique_username", + name="Firstname Lastname", email="test@test.com", password="passpass$12$12") - user_roles = auth0.UserRoles("userRoles", + user_roles = auth0.UserRoles("user_roles", user_id=user.id, roles=[admin.id]) ``` @@ -162,13 +165,16 @@ def __init__(__self__, import pulumi_auth0 as auth0 # Example: - admin = auth0.Role("admin", description="Administrator") + admin = auth0.Role("admin", + name="admin", + description="Administrator") user = auth0.User("user", connection_name="Username-Password-Authentication", username="unique_username", + name="Firstname Lastname", email="test@test.com", password="passpass$12$12") - user_roles = auth0.UserRoles("userRoles", + user_roles = auth0.UserRoles("user_roles", user_id=user.id, roles=[admin.id]) ```