auth0 / auth0-java

Java client library for the Auth0 platform
https://auth0.com
MIT License
295 stars 130 forks source link

Feature/add branding #399

Closed pelletier197 closed 2 years ago

pelletier197 commented 2 years ago

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

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.

Checklist

pelletier197 commented 2 years ago

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 commented 2 years ago

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.

jimmyjames commented 2 years ago

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!