func defaultAuthMethod(suiteSupportedAuthMethods []string, openIDConfigAuthMethods []string, logger *logrus.Entry) string {
	intersection, remaining := intersectionAndRemaining(openIDConfigAuthMethods, suiteSupportedAuthMethods)

	for _, method := range remaining {
		if method != "" {
			logger.WithFields(logrus.Fields{
				"method": method,
			}).Info("Invalid 'token_endpoint_auth_methods_supported' in OpenIDConfiguration")
		}
	}
	for _, methodMatch := range intersection {
		if methodMatch != "" {
			return methodMatch
		}
	}

	return suiteSupportedAuthMethods[0]
}
// defaultAuthMethod - return first match from openIDConfigAuthMethods in
// suiteSupportedAuthMethods, else when no match return first method in
// suiteSupportedAuthMethods.
return first match from openIDConfigAuthMethods in
suiteSupportedAuthMethods, else when no match return first method in
suiteSupportedAuthMethods.
// defaultAuthMethod - return first match from openIDConfigAuthMethods in // suiteSupportedAuthMethods else when no match return first method in // suiteSupportedAuthMethods .
func defaultAuthMethod(suiteSupportedAuthMethods []string, openIDConfigAuthMethods []string, logger *logrus.Entry) string {
	intersection, remaining := intersectionAndRemaining(openIDConfigAuthMethods, suiteSupportedAuthMethods)
	for _, method := range remaining {
		if method != "" {
			logger.WithFields(logrus.Fields{
				"method": method,
			}).Info("Invalid 'token_endpoint_auth_methods_supported' in OpenIDConfiguration")
		}
	}
	for _, methodMatch := range intersection {
		if methodMatch != "" {
			return methodMatch
		}
	}
	return suiteSupportedAuthMethods[0]
}
func defaultAuthMethod ( suiteSupportedAuthMethods [ ] string , openIDConfigAuthMethods [ ] string , logger * logrus . Entry ) string { intersection , remaining := intersectionAndRemaining ( openIDConfigAuthMethods , suiteSupportedAuthMethods ) for _ , method := range remaining { if method != " " { logger . WithFields ( logrus . Fields { " " : method , } ) . Info ( " " ) } } for _ , methodMatch := range intersection { if methodMatch != " " { return methodMatch } } return suiteSupportedAuthMethods [ 0 ] }
return first match from openIDConfigAuthMethods in
suiteSupportedAuthMethods, else when no match return first method in
suiteSupportedAuthMethods.
return first match from openIDConfigAuthMethods in suiteSupportedAuthMethods else when no match return first method in suiteSupportedAuthMethods .