public Object findEndpoint(SecurityFilterChain filterChain) {
		Optional<?> oAuth2EndpointFilterOptional =
				filterChain.getFilters().stream()
						.filter(((Class<?>) oauth2EndpointFilter)::isInstance)
						.map(((Class<?>) oauth2EndpointFilter)::cast)
						.findAny();
		return oAuth2EndpointFilterOptional.orElse(null);
	}
Find endpoint object.

@param filterChain the filter chain
@return the object
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2EndpointUtils.java