-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from auth0/jw-A0CLI-6-create-post-login-actions
[A0CLI-6] Add action create
- Loading branch information
Showing
50 changed files
with
111 additions
and
37,685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package validators | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
|
||
"gopkg.in/auth0.v5/management" | ||
) | ||
|
||
// TriggerID checks that the provided trigger is valid. | ||
func TriggerID(trigger string) error { | ||
allTriggerIDs := []string{ | ||
string(management.PostLogin), | ||
string(management.ClientCredentials), | ||
string(management.PreUserRegistration), | ||
string(management.PostUserRegistration), | ||
} | ||
|
||
for _, id := range allTriggerIDs { | ||
if trigger == id { | ||
return nil | ||
} | ||
} | ||
|
||
return fmt.Errorf("%s is not a valid trigger type (%s)", trigger, strings.Join(allTriggerIDs, ", ")) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.