Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for rendering the settings of prompt-screen #1077

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ramya18101
Copy link

@ramya18101 ramya18101 commented Nov 15, 2024

🔧 Changes

Added new resources and data sources: "auth0_prompt_screen_renderer"
Added relevant expand and flatten rules.
Added relevant test cases for data_source and resource.
Added relevant docs and examples.

Example

resource "auth0_prompt_screen_renderer" "prompt_screen_renderer" {
  prompt_type                = "login-id"
  screen_name                = "login-id"
  rendering_mode             = "advanced"
  default_head_tags_disabled = false
  context_configuration = [
    "branding.settings",
    "branding.themes.default",
    "client.logo_uri",
    "client.description",
    "organization.display_name",
    "organization.branding",
    "screen.texts",
    "tenant.name",
    "tenant.friendly_name",
    "tenant.enabled_locales",
    "untrusted_data.submitted_form_data",
    "untrusted_data.authorization_params.ui_locales",
    "untrusted_data.authorization_params.login_hint",
    "untrusted_data.authorization_params.screen_hint"
  ]
  head_tags = jsonencode([
    {
      attributes : {
        "async" : true,
        "defer" : true,
        "integrity" : [
          "sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
        ],
        "src" : "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
      },
      tag : "script"
    }
  ])
}

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

2. Include unit tests, examples and docs
3. Update Go-Auth0's dependent version
@ramya18101 ramya18101 requested a review from a team as a code owner November 15, 2024 04:07
StateContext: schema.ImportStatePassthroughContext,
},
Description: "With this resource, you can Configure the render settings for a specific screen." +
"You can read more about this [here](https://auth0.com/docs/customize/universal-login-pages/.../acul).",
Copy link
Contributor

@kushalshit27 kushalshit27 Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link is not valid

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have asked the ACUL team to provide the docs link, will update once we get an update.
For time being.. I've added to just replace

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, make sure to update it before release or remove it.

Computed: true,
ValidateFunc: validation.StringIsJSON,
DiffSuppressFunc: structure.SuppressJsonDiff,
Description: "An array of head tags",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add better description

),
},
},
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add case for testAccPromptScreenRenderDelete

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included


# Resource: auth0_prompt_screen_renderer

With this resource, you can Configure the render settings for a specific screen.You can read more about this [here](https://auth0.com/docs/customize/universal-login-pages/.../acul).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalid link

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to update it before release or remove it.

@kushalshit27
Copy link
Contributor

e2e test recordings are not available

@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 80.92784% with 37 lines in your changes missing coverage. Please review.

Project coverage is 89.31%. Comparing base (de227d1) to head (5970ce5).

Files with missing lines Patch % Lines
internal/auth0/prompt/expand.go 56.66% 10 Missing and 3 partials ⚠️
internal/auth0/prompt/resource_screen_render.go 88.23% 8 Missing and 4 partials ⚠️
internal/auth0/prompt/data_source_screen_render.go 80.00% 4 Missing and 2 partials ⚠️
internal/auth0/prompt/flatten.go 76.92% 4 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1077      +/-   ##
==========================================
- Coverage   89.41%   89.31%   -0.10%     
==========================================
  Files         126      128       +2     
  Lines       17464    17652     +188     
==========================================
+ Hits        15615    15766     +151     
- Misses       1309     1335      +26     
- Partials      540      551      +11     
Files with missing lines Coverage Δ
internal/auth0/user/resource.go 75.00% <100.00%> (ø)
internal/auth0/user/resource_role.go 78.00% <100.00%> (ø)
internal/auth0/user/resource_roles.go 80.00% <100.00%> (ø)
internal/provider/provider.go 100.00% <ø> (ø)
internal/auth0/prompt/data_source_screen_render.go 80.00% <80.00%> (ø)
internal/auth0/prompt/flatten.go 86.56% <76.92%> (-2.33%) ⬇️
internal/auth0/prompt/resource_screen_render.go 88.23% <88.23%> (ø)
internal/auth0/prompt/expand.go 81.18% <56.66%> (-10.37%) ⬇️

@kushalshit27 kushalshit27 self-requested a review November 18, 2024 04:59
@kushalshit27
Copy link
Contributor

kushalshit27 commented Nov 18, 2024

looks like a lint ERROR, please lint the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants