private void getOAuth2TokenEndpoint(OpenAPI openAPI, SecurityFilterChain securityFilterChain, boolean openapi31) {
		Object oAuth2EndpointFilter =
				new SpringDocSecurityOAuth2EndpointUtils(OAuth2TokenEndpointFilter.class).findEndpoint(securityFilterChain);

		if (oAuth2EndpointFilter != null) {
			ApiResponses apiResponses = new ApiResponses();
			buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2Token.class, openAPI.getComponents(), null, openapi31));
			buildApiResponsesOnInternalServerError(apiResponses);
			buildApiResponsesOnBadRequest(apiResponses, openAPI, openapi31);
			buildOAuth2Error(openAPI, apiResponses, HttpStatus.UNAUTHORIZED, openapi31);
			Operation operation = buildOperation(apiResponses);

			Schema<?> requestSchema = new ObjectSchema()
					.addProperty(OAuth2ParameterNames.GRANT_TYPE,
							new StringSchema()
									.addEnumItem(AuthorizationGrantType.AUTHORIZATION_CODE.getValue())
									.addEnumItem(AuthorizationGrantType.REFRESH_TOKEN.getValue())
									.addEnumItem(AuthorizationGrantType.CLIENT_CREDENTIALS.getValue()))
					.addProperty(OAuth2ParameterNames.CODE, new StringSchema())
					.addProperty(OAuth2ParameterNames.REDIRECT_URI, new StringSchema())
					.addProperty(OAuth2ParameterNames.REFRESH_TOKEN, new StringSchema())
					.addProperty(OAuth2ParameterNames.SCOPE, new StringSchema())
					.addProperty(OAuth2ParameterNames.CLIENT_ID, new StringSchema())
					.addProperty(OAuth2ParameterNames.CLIENT_SECRET, new StringSchema())
					.addProperty(OAuth2ParameterNames.CLIENT_ASSERTION_TYPE, new StringSchema())
					.addProperty(OAuth2ParameterNames.CLIENT_ASSERTION, new StringSchema())
					.addProperty("additionalParameters", new ObjectSchema().additionalProperties(new StringSchema()));

			String mediaType = org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE;
			RequestBody requestBody = new RequestBody().content(new Content().addMediaType(mediaType, new MediaType().schema(requestSchema)));
			operation.setRequestBody(requestBody);
			operation.addParametersItem(new HeaderParameter().name("Authorization").schema(new StringSchema()));

			buildPath(oAuth2EndpointFilter, "tokenEndpointMatcher", openAPI, operation, HttpMethod.POST);
		}
	}
Gets o auth 2 token endpoint.

@param openAPI             the open api
@param securityFilterChain the security filter chain
@param openapi31           the openapi 31
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java