mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 02:23:30 +00:00
Add authorization header for OAuth2 (#3266)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add authorization header for OAuth2
|
||||||
@@ -312,6 +312,11 @@ function getSecurityHeaders(securities: OpenAPIOperationData['securities']): {
|
|||||||
[name]: 'YOUR_API_KEY',
|
[name]: 'YOUR_API_KEY',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
case 'oauth2': {
|
||||||
|
return {
|
||||||
|
Authorization: 'Bearer YOUR_OAUTH2_TOKEN',
|
||||||
|
};
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user