Skip to content

Feature/add branding#399

Merged
jimmyjames merged 12 commits intoauth0:masterfrom
pelletier197:feature/add-branding
Feb 12, 2022
Merged

Feature/add branding#399
jimmyjames merged 12 commits intoauth0:masterfrom
pelletier197:feature/add-branding

Conversation

@pelletier197
Copy link
Copy Markdown
Contributor

@pelletier197 pelletier197 commented Jan 27, 2022

Changes

Added the support for Branding entities which were not supported yet: https://auth0.com/docs/api/management/v2#!/Branding/get_branding

This includes adding a few classes

  • BrandingColors
  • BrandingFont
  • BrandingSettings
  • UniversalLoginTemplate
  • UniversalLoginTemplateUpdate (the update and response templates are different)

Testing

I used the following code snippet to test this:

ManagementAPI api = new ManagementAPI("<audience>", "<token>");

// Get settings
System.out.println(api.branding().getBrandingSettings().execute());

// Set universal login
UniversalLoginTemplateUpdate template = new UniversalLoginTemplateUpdate();
template.setTemplate("<!DOCTYPE html><html><head>{%- auth0:head -%}</head><body>{%- auth0:widget -%}</body></html>");
System.out.println(api.branding().setUniversalLoginTemplate(template).execute());

// Get universal login
System.out.println(api.branding().getUniversalLoginTemplate().execute());

// Delete universal login
System.out.println(api.branding().deleteUniversalLoginTemplate().execute());

Eveything is also unit tested according to the project standards.

  • This change adds test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@pelletier197 pelletier197 requested a review from a team as a code owner January 27, 2022 21:50
@pelletier197
Copy link
Copy Markdown
Contributor Author

pelletier197 commented Feb 7, 2022

Hi @jimmyjames. Sorry for bothering you again with one of these, but I currently have no alternative. The branding API is not available in the SDK, and it is also only possible to update the universal login page by using the Management API, as stated here: https://auth0.com/docs/customize/universal-login-pages/universal-login-page-templates

You can update the ULP templates only using the Management API

If you're not available to review it, can someone else than you review these?
Appreciate the help!

@jimmyjames
Copy link
Copy Markdown
Contributor

Hi @jimmyjames. Sorry for bothering you again with one of these, but I currently have no alternative. The branding API is not available in the SDK, and it is also only possible to update the universal login page by using the Management API, as stated here: https://auth0.com/docs/customize/universal-login-pages/universal-login-page-templates

You can update the ULP templates only using the Management API

If you're not available to review it, can someone else than you review these? Appreciate the help!

@pelletier197 I'm sorry for the delay - we really appreciate your contributions 🙇! I'm reviewing this now, will follow up shortly.

"GET",
new TypeReference<BrandingSettings>() {
},
(builder) -> builder.withPathSegments("api/v2/branding")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Love this simplified request building 🎉

@jimmyjames jimmyjames merged commit 2f02aa5 into auth0:master Feb 12, 2022
@jimmyjames
Copy link
Copy Markdown
Contributor

We're targeting cutting a minor release next week - want to add support for the Attack Protections APIs early next week, then release a new minor. Thanks again!

@pelletier197 pelletier197 deleted the feature/add-branding branch February 12, 2022 10:27
@jimmyjames jimmyjames modified the milestones: v1-Next, 1.39.0 Feb 14, 2022
@jimmyjames jimmyjames mentioned this pull request Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants