forked from loafle/openapi-generator-original
Preserve order of securitySchemes (#14536)
* Remove alphabetical sort * Update integration testing expectations * Regenerate files
This commit is contained in:
@@ -85,13 +85,6 @@ Class | Method | HTTP request | Description
|
||||
<a name="documentation-for-authorization"></a>
|
||||
## Documentation for Authorization
|
||||
|
||||
<a name="api_key"></a>
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
<a name="petstore_auth"></a>
|
||||
### petstore_auth
|
||||
|
||||
@@ -102,3 +95,10 @@ Class | Method | HTTP request | Description
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
<a name="api_key"></a>
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
@@ -47,6 +47,14 @@ fun Application.main() {
|
||||
install(HSTS, ApplicationHstsConfiguration()) // see https://ktor.io/docs/hsts.html
|
||||
install(Locations) // see https://ktor.io/docs/features-locations.html
|
||||
install(Authentication) {
|
||||
oauth("petstore_auth") {
|
||||
client = HttpClient(Apache)
|
||||
providerLookup = { ApplicationAuthProviders["petstore_auth"] }
|
||||
urlProvider = { _ ->
|
||||
// TODO: define a callback url here.
|
||||
"/"
|
||||
}
|
||||
}
|
||||
// "Implement API key auth (api_key) for parameter name 'api_key'."
|
||||
apiKeyAuth("api_key") {
|
||||
validate { apikeyCredential: ApiKeyCredential ->
|
||||
@@ -56,14 +64,6 @@ fun Application.main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
oauth("petstore_auth") {
|
||||
client = HttpClient(Apache)
|
||||
providerLookup = { ApplicationAuthProviders["petstore_auth"] }
|
||||
urlProvider = { _ ->
|
||||
// TODO: define a callback url here.
|
||||
"/"
|
||||
}
|
||||
}
|
||||
}
|
||||
install(Routing) {
|
||||
PetApi()
|
||||
|
||||
@@ -57,7 +57,7 @@ val ApplicationAuthProviders: Map<String, OAuthServerSettings> = listOf<OAuthSer
|
||||
clientId = settings.property("auth.oauth.petstore_auth.clientId").getString(),
|
||||
clientSecret = settings.property("auth.oauth.petstore_auth.clientSecret").getString(),
|
||||
defaultScopes = listOf("write:pets", "read:pets")
|
||||
)
|
||||
),
|
||||
// OAuthServerSettings.OAuth2ServerSettings(
|
||||
// name = "facebook",
|
||||
// authorizeUrl = "https://graph.facebook.com/oauth/authorize",
|
||||
|
||||
Reference in New Issue
Block a user