func (s *RequestHeaderAuthenticationOptions) ToAuthenticationRequestHeaderConfig() (*authenticatorfactory.RequestHeaderConfig, error) {
	if len(s.ClientCAFile) == 0 {
		return nil, nil
	}

	dynamicCAProvider, err := dynamiccertificates.NewDynamicCAContentFromFile("request-header", s.ClientCAFile)
	if err != nil {
		return nil, err
	}

	return &authenticatorfactory.RequestHeaderConfig{
		UsernameHeaders:     headerrequest.StaticStringSlice(s.UsernameHeaders),
		GroupHeaders:        headerrequest.StaticStringSlice(s.GroupHeaders),
		ExtraHeaderPrefixes: headerrequest.StaticStringSlice(s.ExtraHeaderPrefixes),
		CAContentProvider:   dynamicCAProvider,
		AllowedClientNames:  headerrequest.StaticStringSlice(s.AllowedNames),
	}, nil
}
// ToAuthenticationRequestHeaderConfig returns a RequestHeaderConfig config object for these options
// if necessary, nil otherwise.
ToAuthenticationRequestHeaderConfig returns a RequestHeaderConfig config object for these options
if necessary, nil otherwise.
// ToAuthenticationRequestHeaderConfig returns a RequestHeaderConfig config object for these options // if necessary nil otherwise .
func (s *RequestHeaderAuthenticationOptions) ToAuthenticationRequestHeaderConfig() (*authenticatorfactory.RequestHeaderConfig, error) {
	if len(s.ClientCAFile) == 0 {
		return nil, nil
	}
	dynamicCAProvider, err := dynamiccertificates.NewDynamicCAContentFromFile("request-header", s.ClientCAFile)
	if err != nil {
		return nil, err
	}
	return &authenticatorfactory.RequestHeaderConfig{
		UsernameHeaders:     headerrequest.StaticStringSlice(s.UsernameHeaders),
		GroupHeaders:        headerrequest.StaticStringSlice(s.GroupHeaders),
		ExtraHeaderPrefixes: headerrequest.StaticStringSlice(s.ExtraHeaderPrefixes),
		CAContentProvider:   dynamicCAProvider,
		AllowedClientNames:  headerrequest.StaticStringSlice(s.AllowedNames),
	}, nil
}
func ( s * RequestHeaderAuthenticationOptions ) ToAuthenticationRequestHeaderConfig ( ) ( * authenticatorfactory . RequestHeaderConfig , error ) { if len ( s . ClientCAFile ) == 0 { return nil , nil } dynamicCAProvider , err := dynamiccertificates . NewDynamicCAContentFromFile ( " " , s . ClientCAFile ) if err != nil { return nil , err } return & authenticatorfactory . RequestHeaderConfig { UsernameHeaders : headerrequest . StaticStringSlice ( s . UsernameHeaders ) , GroupHeaders : headerrequest . StaticStringSlice ( s . GroupHeaders ) , ExtraHeaderPrefixes : headerrequest . StaticStringSlice ( s . ExtraHeaderPrefixes ) , CAContentProvider : dynamicCAProvider , AllowedClientNames : headerrequest . StaticStringSlice ( s . AllowedNames ) , } , nil }
ToAuthenticationRequestHeaderConfig returns a RequestHeaderConfig config object for these options
if necessary, nil otherwise.
ToAuthenticationRequestHeaderConfig returns a RequestHeaderConfig config object for these options if necessary nil otherwise .