Skip to content

Commit

Permalink
Merge pull request #130
Browse files Browse the repository at this point in the history
* [WIP] remove AuthServerPublicUrl from KeycloakRealmInfo struct
  • Loading branch information
greenMika authored Nov 21, 2023
1 parent a42da96 commit 1f9ef4d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type KeycloakAuthorizer struct {
type KeycloakRealmInfo struct {
RealmId string // RealmId is the realm name that is passed to services via env vars
AuthServerInternalUrl string // AuthServerInternalUrl should point to keycloak auth server on internal (not public) network, e.g. http://keycloak:8080/auth; used for contacting keycloak for realm certificate for JWT
AuthServerPublicUrl string // AuthServerPublicUrl should point to keycloak auth server on public (not internal) network, e.g. http://localhost:28080/auth; used to validate issuer field in JWT
}

func (i *KeycloakRealmInfo) validate() error {
Expand All @@ -40,11 +39,6 @@ func (i *KeycloakRealmInfo) validate() error {
errs = append(errs, fmt.Errorf("couldn't parse auth server internal url: %w", err))
}

_, err = url.ParseRequestURI(i.AuthServerPublicUrl)
if err != nil {
errs = append(errs, fmt.Errorf("couldn't parse auth server public url: %w", err))
}

if len(errs) > 0 {
return fmt.Errorf("\n%w", errors.Join(errs...))
}
Expand Down

0 comments on commit 1f9ef4d

Please sign in to comment.