forked from microsoft/semantic-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open API GitHub Plugin Skill + Frontend Auth (MSAL + Basic / PAT) (mi…
…crosoft#641) ### Motivation and Context This PR adds: - Swagger files detailing List and Get Pull Request(s) functions. - Example 22 c on how to leverage imported OpenAPI GitHub Skill - Basic (+ User PAT) and Msal Authentication flows in Copilot chat for connector plug-ins, sending auth data if user enables plug-in - Parsing headers in SemanticKernelController to import respective OpenAPI Skill if auth information is provided ### Description ![image](https://user-images.githubusercontent.com/125500434/234473631-cb01eac2-12b7-4f78-a939-bc99f70d2184.png) ![image](https://user-images.githubusercontent.com/125500434/234473648-976fa0a5-f857-4693-b72b-b2f85a4d1eee.png) ![image](https://user-images.githubusercontent.com/125500434/234473826-9d0264a8-1e4c-464e-a59f-84affa1ae99a.png) ![image](https://user-images.githubusercontent.com/125500434/234473842-1efcbf7d-4bd4-4015-b903-c13bdd173191.png) ![image](https://user-images.githubusercontent.com/125500434/235235863-1353180f-f679-4445-afaf-4b4c2154d922.png)
- Loading branch information
1 parent
4a42d02
commit 7d5c59d
Showing
26 changed files
with
6,779 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
samples/apps/copilot-chat-app/webapi/Model/OpenApiSkillsAuthHeaders.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace SemanticKernel.Service.Skills.OpenAPI.Authentication; | ||
|
||
/// /// <summary> | ||
/// Represents the authentication headers for imported OpenAPI Plugin Skills. | ||
/// </summary> | ||
public class OpenApiSkillsAuthHeaders | ||
{ | ||
/// <summary> | ||
/// Gets or sets the MS Graph authentication header value. | ||
/// </summary> | ||
[FromHeader(Name = "x-sk-copilot-graph-auth")] | ||
public string? GraphAuthentication { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the Jira authentication header value. | ||
/// </summary> | ||
[FromHeader(Name = "x-sk-copilot-jira-auth")] | ||
public string? JiraAuthentication { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the GitHub authentication header value. | ||
/// </summary> | ||
[FromHeader(Name = "x-sk-copilot-github-auth")] | ||
public string? GithubAuthentication { get; set; } | ||
} |
Oops, something went wrong.