Repository: microsoft/kiota (csharp)

Issue:
OAuth implicit flow should generate "none" authentication
### Is your feature request related to a problem? Please describe the problem.

When genearating a plugin, when oauth is implicit flow, Kiota generates an oauth configuration in the ai-plugin file.
Since DAs do not support oauth implicit flow, the auth in the ai-plugin file should be none

Test spec file: https://github.com/SLdragon/example-openapi-spec/blob/main/implicit.yaml

### Client library/SDK language

None

### Describe the solution you'd like

Since DAs do not support oauth implicit flow, the auth in the ai-plugin file should be none

### Additional context

_No response_

Pull request:
### Overview
Closes #6475

Patch:
diff --git a/src/Kiota.Builder/Plugins/PluginsGenerationService.cs b/src/Kiota.Builder/Plugins/PluginsGenerationService.cs
index f1f683a1c5..91a187bf3a 100644
--- a/src/Kiota.Builder/Plugins/PluginsGenerationService.cs
+++ b/src/Kiota.Builder/Plugins/PluginsGenerationService.cs
@@ -611,6 +611,7 @@ private static Auth GetAuthFromSecuritySchemeReference(OpenApiSecuritySchemeRefe
             {
                 ReferenceId = string.IsNullOrEmpty(authenticationReferenceId) ? $"{{{name}_REGISTRATION_ID}}" : authenticationReferenceId
             },
+            SecuritySchemeType.OAuth2 when securityScheme.Flows?.Implicit != null => new AnonymousAuth(),
             SecuritySchemeType.OAuth2 => new OAuthPluginVault
             {
                 ReferenceId = string.IsNullOrEmpty(authenticationReferenceId) ? $"{{{name}_REGISTRATION_ID}}" : authenticationReferenceId


Test patch:
diff --git a/tests/Kiota.Builder.Tests/Plugins/PluginsGenerationServiceTests.cs b/tests/Kiota.Builder.Tests/Plugins/PluginsGenerationServiceTests.cs
index eaa9bebf3d..a2aa8d32d0 100644
--- a/tests/Kiota.Builder.Tests/Plugins/PluginsGenerationServiceTests.cs
+++ b/tests/Kiota.Builder.Tests/Plugins/PluginsGenerationServiceTests.cs
@@ -551,6 +551,18 @@ public static TheoryData<string, string, string, PluginAuthConfiguration, Action
                     Assert.Equal("{oauth2_0_REGISTRATION_ID}", ((OAuthPluginVault)auth0!).ReferenceId);
                 }
             },
+            // OAuth2 with implicit flow should return (None)
+            {
+                "{securitySchemes: {oauth2_implicit: {type: oauth2, flows: {implicit: {authorizationUrl: 'https://example.com/auth'}}}}}",
+                string.Empty, "security: [oauth2_implicit: []]", null, resultingManifest =>
+                {
+                    Assert.NotNull(resultingManifest.Document);
+                    Assert.Empty(resultingManifest.Problems);
+                    Assert.NotEmpty(resultingManifest.Document.Runtimes);
+                    var auth = resultingManifest.Document.Runtimes[0].Auth;
+                    Assert.IsType<AnonymousAuth>(auth);
+                }
+            },
             // should be anonymous
             {
                 "{}", string.Empty, "security: [invalid: []]", null, resultingManifest =>
diff --git a/vscode/npm-package/tests/integration/integrationGeneratePlugin.spec.ts b/vscode/npm-package/tests/integration/integrationGeneratePlugin.spec.ts
index b01253e6a2..7862487155 100644
--- a/vscode/npm-package/tests/integration/integrationGeneratePlugin.spec.ts
+++ b/vscode/npm-package/tests/integration/integrationGeneratePlugin.spec.ts
@@ -65,8 +65,7 @@ describe("GeneratePlugin", () => {
       descriptionPath: actual?.aiPlugin
     });
     expect(actualPluginManifest).toBeDefined();
-    expect(actualPluginManifest?.runtime[0].auth.type).toEqual('OAuthPluginVault');
-    expect(actualPluginManifest?.runtime[0].auth.reference_id).toEqual('{oAuth2AuthCode_REGISTRATION_ID}');
+    expect(actualPluginManifest?.runtime[0].auth.type).toEqual('None');
     expect(actualPluginManifest?.runtime[0].run_for_functions[0]).toEqual('listRepairs');
     expect(actualPluginManifest?.runtime[0].run_for_functions[1]).toEqual('repairs_post');
     expect(actualPluginManifest?.functions[0].name).toEqual('listRepairs');
@@ -86,7 +85,7 @@ describe("GeneratePlugin", () => {
     }
     const actualSecurityScheme = actualSecuritySchemes['oAuth2AuthCode'];
     expect(actualSecurityScheme).toBeDefined();
-    expect(actualSecurityScheme.referenceId).toEqual('{oAuth2AuthCode_REGISTRATION_ID}');
+    expect(actualSecurityScheme.referenceId).toEqual('');
   });