Skip to content

Commit

Permalink
Merge 7859d9f into 2db76f3
Browse files Browse the repository at this point in the history
  • Loading branch information
Fratt committed Jun 20, 2019
2 parents 2db76f3 + 7859d9f commit 68cdeca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/management/api.go
Expand Up @@ -284,7 +284,7 @@ func (password PasswordRepresentation) Validate() error {
}

func (config RealmCustomConfiguration) Validate() error {
if config.DefaultClientId != nil && !matchesRegExp(*config.DefaultClientId, RegExpID) {
if config.DefaultClientId != nil && !matchesRegExp(*config.DefaultClientId, RegExpClientID) {
return errors.New("Invalid default client ID")
}

Expand Down
4 changes: 2 additions & 2 deletions api/management/api_test.go
Expand Up @@ -188,7 +188,7 @@ func TestValidateRealmCustomConfiguration(t *testing.T) {
assert.Nil(t, config.Validate())
}

defaultClientID := "f467ed7c"
defaultClientID := "something$invalid"
defaultRedirectURI := "ht//tp://company.com"

var configs []RealmCustomConfiguration
Expand Down Expand Up @@ -276,7 +276,7 @@ func createValidPasswordRepresentation() PasswordRepresentation {
}

func createValidRealmCustomConfiguration() RealmCustomConfiguration {
defaultClientID := "f467ed7c-0a1d-4eee-9bb8-669c6f89c0ee"
defaultClientID := "backofficeid"
defaultRedirectURI := "http://company.com"

return RealmCustomConfiguration{
Expand Down

0 comments on commit 68cdeca

Please sign in to comment.