-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<policies> | ||
<inbound> | ||
<base /> | ||
<get-authorization-context provider-id="github" authorization-id="github" context-variable-name="auth-context" identity-type="managed" ignore-error="false" /> | ||
<return-response> | ||
<set-body>@(((Authorization)context.Variables.GetValueOrDefault("auth-context"))?.AccessToken)</set-body> | ||
</return-response> | ||
</inbound> | ||
<backend> | ||
<base /> | ||
</backend> | ||
<outbound> | ||
<base /> | ||
</outbound> | ||
<on-error> | ||
<base /> | ||
</on-error> | ||
</policies> |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: GitHub Auth API | ||
description: This is a set of APIs that deals with GitHub authN APIs. | ||
license: | ||
name: MIT | ||
url: http://opensource.org/licenses/MIT | ||
version: 1.0.0 | ||
servers: | ||
- url: http://localhost:7071/api | ||
paths: | ||
/access-token: | ||
post: | ||
tags: | ||
- auth | ||
summary: Gets the GitHub OAuth access token | ||
description: This gets the OAuth access token for GitHub API. | ||
operationId: getAccessToken | ||
responses: | ||
'200': | ||
description: This returns the completion generated from the OpenAI API. | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
examples: | ||
access-token: | ||
value: "WW91VHViZSBTZXJpYWxpc2Vy" | ||
x-ms-summary: The access token generated from GitHub. | ||
x-ms-visibility: important |