Skip to content

Commit

Permalink
DXCDT-546: Add logic to fetch universal login branding data (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiught authored Oct 5, 2023
1 parent d4ce7d9 commit b20738a
Show file tree
Hide file tree
Showing 5 changed files with 1,199 additions and 3 deletions.
2 changes: 2 additions & 0 deletions internal/auth0/auth0.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type API struct {
Anomaly AnomalyAPI
AttackProtection AttackProtectionAPI
Branding BrandingAPI
BrandingTheme BrandingThemeAPI
Client ClientAPI
ClientGrant ClientGrantAPI
Connection ConnectionAPI
Expand All @@ -38,6 +39,7 @@ func NewAPI(m *management.Management) *API {
Anomaly: m.Anomaly,
AttackProtection: m.AttackProtection,
Branding: m.Branding,
BrandingTheme: m.BrandingTheme,
Client: m.Client,
ClientGrant: m.ClientGrant,
Connection: m.Connection,
Expand Down
17 changes: 17 additions & 0 deletions internal/auth0/branding_theme.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//go:generate mockgen -source=branding_theme.go -destination=mock/branding_theme_mock.go -package=mock

package auth0

import (
"context"

"github.com/auth0/go-auth0/management"
)

type BrandingThemeAPI interface {
Default(ctx context.Context, opts ...management.RequestOption) (theme *management.BrandingTheme, err error)
Create(ctx context.Context, theme *management.BrandingTheme, opts ...management.RequestOption) (err error)
Read(ctx context.Context, id string, opts ...management.RequestOption) (theme *management.BrandingTheme, err error)
Update(ctx context.Context, id string, theme *management.BrandingTheme, opts ...management.RequestOption) (err error)
Delete(ctx context.Context, id string, opts ...management.RequestOption) (err error)
}
133 changes: 133 additions & 0 deletions internal/auth0/mock/branding_theme_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b20738a

Please sign in to comment.