forked from microsoft/chat-copilot
-
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.
Update import document tool to new auth model (microsoft#239)
### Motivation and Context The recent changes to the authentication model in Chat Copilot effiectively broke the import document tool. This change fixes it, by enabling users to: - Use the tool with an unauthenticated local instance of Chat Copilot without signing in - Use the tool with an Azure-deployed instance of Chat Copilot with Azure AD authentication enabled Fixes microsoft#212, fixes microsoft#231 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> - Adds code paths to authenticate user (or not) depending on configuration - Removes user name/info from document import form - Updates README with instructions for setting up the app registration for import document tool and configuring appsettings.json ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [Contribution Guidelines](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - N/A, but both supported scenarios have been tested - [x] I didn't break anyone 😄
- Loading branch information
Showing
4 changed files
with
119 additions
and
50 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
{ | ||
"Config": { | ||
"ServiceUri": "https://localhost:40443", | ||
"AuthenticationType": "None", // Supported authentication types are "None" or "AzureAd" | ||
"ClientId": "", | ||
"RedirectUri": "", | ||
"ServiceUri": "https://localhost:40443" | ||
"RedirectUri": "http://localhost", | ||
"BackendClientId": "", | ||
"TenantId": "", | ||
"Instance": "https://login.microsoftonline.com", | ||
"Scopes": "access_as_user" // Scopes that the client app requires to access the API | ||
} | ||
} |