Skip to content

Commit

Permalink
Add support for new Prompts and Screens Prompt Partials in Universal …
Browse files Browse the repository at this point in the history
…Login Customize Command (#1063)

* Add support for new Prompts and screens for Auth0 CLI

* Delete not required file

* Linting

* Update go-auth0 version

* Improved the saveUniversalLoginBrandingData function
  • Loading branch information
developerkunal authored Sep 13, 2024
1 parent 102d852 commit dc77f19
Show file tree
Hide file tree
Showing 12 changed files with 2,147 additions and 1,422 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ replace github.com/mholt/archiver/v3 => github.com/anchore/archiver/v3 v3.5.2
require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/PuerkitoBio/rehttp v1.4.0
github.com/auth0/go-auth0 v1.9.0
github.com/auth0/go-auth0 v1.10.0
github.com/briandowns/spinner v1.23.1
github.com/charmbracelet/glamour v0.8.0
github.com/fsnotify/fsnotify v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/auth0/go-auth0 v1.9.0 h1:IRCMQ9zLmFn8aAKkd+lopFo6IAdpARYSRf8i9ZACG48=
github.com/auth0/go-auth0 v1.9.0/go.mod h1:p9KEEkCehO7tcDf32r1r06Ji63mqZa1QZ6IfQ172bys=
github.com/auth0/go-auth0 v1.10.0 h1:7fjcuVjtTET5NEg8RPl3uYadGto7WZnBl31LcnXANWc=
github.com/auth0/go-auth0 v1.10.0/go.mod h1:VMTiemb4rn2TUPiH9obD2FoHS2FoTALTsnKU0NUXLxk=
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48=
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
Expand Down
58 changes: 0 additions & 58 deletions internal/auth/mock/auth.go

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

10 changes: 8 additions & 2 deletions internal/auth0/branding_prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ type PromptAPI interface {
// See: https://auth0.com/docs/api/management/v2#!/Prompts/put_custom_text_by_language
SetCustomText(ctx context.Context, p string, l string, b map[string]interface{}, opts ...management.RequestOption) (err error)

ReadPartials(ctx context.Context, prompt management.PromptType, opts ...management.RequestOption) (c *management.PromptPartials, err error)
// GetPartials retrieves the partials for a specific prompt.
//
// See: https://auth0.com/docs/api/management/v2/prompts/get-partials
GetPartials(ctx context.Context, prompt management.PromptType, opts ...management.RequestOption) (c *management.PromptScreenPartials, err error)

UpdatePartials(ctx context.Context, c *management.PromptPartials, opts ...management.RequestOption) error
// SetPartials sets the partials for a specific prompt.
//
// See: https://auth0.com/docs/api/management/v2/prompts/put-partials
SetPartials(ctx context.Context, prompt management.PromptType, c *management.PromptScreenPartials, opts ...management.RequestOption) error
}
40 changes: 20 additions & 20 deletions internal/auth0/mock/action_mock.go

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

72 changes: 36 additions & 36 deletions internal/auth0/mock/branding_prompt_mock.go

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

40 changes: 20 additions & 20 deletions internal/auth0/mock/organization_mock.go

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

16 changes: 8 additions & 8 deletions internal/auth0/mock/user.go

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

Loading

0 comments on commit dc77f19

Please sign in to comment.