chore: AWS Signature Authorization type flow updates (#4311)

Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Anwarul Islam
2024-08-30 20:58:27 +06:00
committed by GitHub
parent 15efbc887c
commit c2fb6aee3f
8 changed files with 92 additions and 41 deletions

View File

@@ -246,6 +246,22 @@ const selectOAuth2AuthType = () => {
}
}
const selectAPIKeyAuthType = () => {
auth.value = {
...auth.value,
authType: "api-key",
addTo: "HEADERS",
} as HoppGQLAuth
}
const selectAWSSignatureAuthType = () => {
auth.value = {
...auth.value,
authType: "aws-signature",
addTo: "HEADERS",
} as HoppGQLAuth
}
const authTypes: AuthType[] = [
{
key: "inherit",
@@ -271,10 +287,12 @@ const authTypes: AuthType[] = [
{
key: "api-key",
label: "API Key",
handler: selectAPIKeyAuthType,
},
{
key: "aws-signature",
label: "AWS Signature",
handler: selectAWSSignatureAuthType,
},
]

View File

@@ -591,6 +591,7 @@ const getComputedAuthHeaders = async (
region: request.auth.region ?? "us-east-1",
service: request.auth.serviceName,
url,
sessionToken: request.auth.serviceToken,
})
const sign = await signer.sign()