package example
import (
client "github.com/auth0/go-auth0/management/client"
option "github.com/auth0/go-auth0/management/option"
context "context"
branding "github.com/auth0/go-auth0/management/branding"
management "github.com/auth0/go-auth0/management"
)
func do() () {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
client.Branding.Themes.Update(
context.TODO(),
"themeId",
&branding.UpdateBrandingThemeRequestContent{
Borders: &management.BrandingThemeBorders{
ButtonBorderRadius: 1.1,
ButtonBorderWeight: 1.1,
ButtonsStyle: management.BrandingThemeBordersButtonsStyleEnumPill,
InputBorderRadius: 1.1,
InputBorderWeight: 1.1,
InputsStyle: management.BrandingThemeBordersInputsStyleEnumPill,
ShowWidgetShadow: true,
WidgetBorderWeight: 1.1,
WidgetCornerRadius: 1.1,
},
Colors: &management.BrandingThemeColors{
BodyText: "body_text",
Error: "error",
Header: "header",
Icons: "icons",
InputBackground: "input_background",
InputBorder: "input_border",
InputFilledText: "input_filled_text",
InputLabelsPlaceholders: "input_labels_placeholders",
LinksFocusedComponents: "links_focused_components",
PrimaryButton: "primary_button",
PrimaryButtonLabel: "primary_button_label",
SecondaryButtonBorder: "secondary_button_border",
SecondaryButtonLabel: "secondary_button_label",
Success: "success",
WidgetBackground: "widget_background",
WidgetBorder: "widget_border",
},
Fonts: &management.BrandingThemeFonts{
BodyText: &management.BrandingThemeFontBodyText{
Bold: true,
Size: 1.1,
},
ButtonsText: &management.BrandingThemeFontButtonsText{
Bold: true,
Size: 1.1,
},
FontUrl: "font_url",
InputLabels: &management.BrandingThemeFontInputLabels{
Bold: true,
Size: 1.1,
},
Links: &management.BrandingThemeFontLinks{
Bold: true,
Size: 1.1,
},
LinksStyle: management.BrandingThemeFontLinksStyleEnumNormal,
ReferenceTextSize: 1.1,
Subtitle: &management.BrandingThemeFontSubtitle{
Bold: true,
Size: 1.1,
},
Title: &management.BrandingThemeFontTitle{
Bold: true,
Size: 1.1,
},
},
PageBackground: &management.BrandingThemePageBackground{
BackgroundColor: "background_color",
BackgroundImageUrl: "background_image_url",
PageLayout: management.BrandingThemePageBackgroundPageLayoutEnumCenter,
},
Widget: &management.BrandingThemeWidget{
HeaderTextAlignment: management.BrandingThemeWidgetHeaderTextAlignmentEnumCenter,
LogoHeight: 1.1,
LogoPosition: management.BrandingThemeWidgetLogoPositionEnumCenter,
LogoUrl: "logo_url",
SocialButtonsLayout: management.BrandingThemeWidgetSocialButtonsLayoutEnumBottom,
},
},
)
}{
"borders": {
"button_border_radius": 5.5,
"button_border_weight": 5,
"buttons_style": "pill",
"input_border_radius": 5,
"input_border_weight": 1.5,
"inputs_style": "pill",
"show_widget_shadow": true,
"widget_border_weight": 5,
"widget_corner_radius": 25
},
"colors": {
"body_text": "<string>",
"error": "<string>",
"header": "<string>",
"icons": "<string>",
"input_background": "<string>",
"input_border": "<string>",
"input_filled_text": "<string>",
"input_labels_placeholders": "<string>",
"links_focused_components": "<string>",
"primary_button": "<string>",
"primary_button_label": "<string>",
"secondary_button_border": "<string>",
"secondary_button_label": "<string>",
"success": "<string>",
"widget_background": "<string>",
"widget_border": "<string>",
"base_focus_color": "<string>",
"base_hover_color": "<string>",
"captcha_widget_theme": "auto",
"read_only_background": "<string>"
},
"displayName": "<string>",
"fonts": {
"body_text": {
"bold": true,
"size": 75
},
"buttons_text": {
"bold": true,
"size": 75
},
"font_url": "<string>",
"input_labels": {
"bold": true,
"size": 75
},
"links": {
"bold": true,
"size": 75
},
"links_style": "normal",
"reference_text_size": 18,
"subtitle": {
"bold": true,
"size": 75
},
"title": {
"bold": true,
"size": 112.5
}
},
"page_background": {
"background_color": "<string>",
"background_image_url": "<string>",
"page_layout": "center"
},
"themeId": "<string>",
"widget": {
"header_text_alignment": "center",
"logo_height": 50.5,
"logo_position": "center",
"logo_url": "<string>",
"social_buttons_layout": "bottom"
}
}Update branding theme.
package example
import (
client "github.com/auth0/go-auth0/management/client"
option "github.com/auth0/go-auth0/management/option"
context "context"
branding "github.com/auth0/go-auth0/management/branding"
management "github.com/auth0/go-auth0/management"
)
func do() () {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
client.Branding.Themes.Update(
context.TODO(),
"themeId",
&branding.UpdateBrandingThemeRequestContent{
Borders: &management.BrandingThemeBorders{
ButtonBorderRadius: 1.1,
ButtonBorderWeight: 1.1,
ButtonsStyle: management.BrandingThemeBordersButtonsStyleEnumPill,
InputBorderRadius: 1.1,
InputBorderWeight: 1.1,
InputsStyle: management.BrandingThemeBordersInputsStyleEnumPill,
ShowWidgetShadow: true,
WidgetBorderWeight: 1.1,
WidgetCornerRadius: 1.1,
},
Colors: &management.BrandingThemeColors{
BodyText: "body_text",
Error: "error",
Header: "header",
Icons: "icons",
InputBackground: "input_background",
InputBorder: "input_border",
InputFilledText: "input_filled_text",
InputLabelsPlaceholders: "input_labels_placeholders",
LinksFocusedComponents: "links_focused_components",
PrimaryButton: "primary_button",
PrimaryButtonLabel: "primary_button_label",
SecondaryButtonBorder: "secondary_button_border",
SecondaryButtonLabel: "secondary_button_label",
Success: "success",
WidgetBackground: "widget_background",
WidgetBorder: "widget_border",
},
Fonts: &management.BrandingThemeFonts{
BodyText: &management.BrandingThemeFontBodyText{
Bold: true,
Size: 1.1,
},
ButtonsText: &management.BrandingThemeFontButtonsText{
Bold: true,
Size: 1.1,
},
FontUrl: "font_url",
InputLabels: &management.BrandingThemeFontInputLabels{
Bold: true,
Size: 1.1,
},
Links: &management.BrandingThemeFontLinks{
Bold: true,
Size: 1.1,
},
LinksStyle: management.BrandingThemeFontLinksStyleEnumNormal,
ReferenceTextSize: 1.1,
Subtitle: &management.BrandingThemeFontSubtitle{
Bold: true,
Size: 1.1,
},
Title: &management.BrandingThemeFontTitle{
Bold: true,
Size: 1.1,
},
},
PageBackground: &management.BrandingThemePageBackground{
BackgroundColor: "background_color",
BackgroundImageUrl: "background_image_url",
PageLayout: management.BrandingThemePageBackgroundPageLayoutEnumCenter,
},
Widget: &management.BrandingThemeWidget{
HeaderTextAlignment: management.BrandingThemeWidgetHeaderTextAlignmentEnumCenter,
LogoHeight: 1.1,
LogoPosition: management.BrandingThemeWidgetLogoPositionEnumCenter,
LogoUrl: "logo_url",
SocialButtonsLayout: management.BrandingThemeWidgetSocialButtonsLayoutEnumBottom,
},
},
)
}{
"borders": {
"button_border_radius": 5.5,
"button_border_weight": 5,
"buttons_style": "pill",
"input_border_radius": 5,
"input_border_weight": 1.5,
"inputs_style": "pill",
"show_widget_shadow": true,
"widget_border_weight": 5,
"widget_corner_radius": 25
},
"colors": {
"body_text": "<string>",
"error": "<string>",
"header": "<string>",
"icons": "<string>",
"input_background": "<string>",
"input_border": "<string>",
"input_filled_text": "<string>",
"input_labels_placeholders": "<string>",
"links_focused_components": "<string>",
"primary_button": "<string>",
"primary_button_label": "<string>",
"secondary_button_border": "<string>",
"secondary_button_label": "<string>",
"success": "<string>",
"widget_background": "<string>",
"widget_border": "<string>",
"base_focus_color": "<string>",
"base_hover_color": "<string>",
"captcha_widget_theme": "auto",
"read_only_background": "<string>"
},
"displayName": "<string>",
"fonts": {
"body_text": {
"bold": true,
"size": 75
},
"buttons_text": {
"bold": true,
"size": 75
},
"font_url": "<string>",
"input_labels": {
"bold": true,
"size": 75
},
"links": {
"bold": true,
"size": 75
},
"links_style": "normal",
"reference_text_size": 18,
"subtitle": {
"bold": true,
"size": 75
},
"title": {
"bold": true,
"size": 112.5
}
},
"page_background": {
"background_color": "<string>",
"background_image_url": "<string>",
"page_layout": "center"
},
"themeId": "<string>",
"widget": {
"header_text_alignment": "center",
"logo_height": 50.5,
"logo_position": "center",
"logo_url": "<string>",
"social_buttons_layout": "bottom"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the theme
Branding settings successfully updated.
Show child attributes
Show child attributes
Display Name
2048^[^<>]*$Show child attributes
Show child attributes
Theme Id
32^[a-zA-Z0-9]{32}$Show child attributes
Cette page vous a-t-elle été utile ?