Require OsinServerConfig in OAuth server binary
Both the hypershift and openshift-integrated-oauth-server binaries
are expected to use this struct now.
package openshift_integrated_oauth_server
import (
- "encoding/json"
"errors"
"fmt"
"io"
@@ -85,14 +84,8 @@ func (o *OsinServer) RunOsinServer(stopCh <-chan struct{}) error {
codecs := serializer.NewCodecFactory(scheme)
obj, err := runtime.Decode(codecs.UniversalDecoder(osinv1.GroupVersion, configv1.GroupVersion), configContent)
if err != nil {
- // TODO drop this code once we remove the hypershift path
- obj = &osinv1.OsinServerConfig{}
- if jsonErr := json.Unmarshal(configContent, obj); jsonErr != nil {
- glog.Errorf("osin config parse error: %v", jsonErr)
return err
}
- // return err
- }
config, ok := obj.(*osinv1.OsinServerConfig)
if !ok {
