Skip to content

Commit

Permalink
chore: #7 add authorization header to Beacon and CKAN APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopacheco1 committed Apr 5, 2024
1 parent e1dfa48 commit 02f043b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _http/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2024 PNED G.I.E.
#
# SPDX-License-Identifier: Apache-2.0

KEYCLOAK_HOST=https://keycloak-test.healthdata.nl
KEYCLOAK_REALM=ckan
KEYCLOAK_PROVIDER_ALIAS=LSAAI
Expand Down
18 changes: 18 additions & 0 deletions src/main/openapi/beacon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ paths:
post:
summary: Searches for individuals based on criteria
operationId: list_individuals
parameters:
- name: Authorization
in: header
description: The authorization header
required: true
schema:
type: string
tags:
- "beacon-query"
requestBody:
Expand All @@ -28,6 +35,8 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/BeaconIndividualsResponse"
"401":
description: "Unauthorized"
security:
- beacon_auth:
- read:beacon
Expand All @@ -37,13 +46,22 @@ paths:
operationId: list_filtering_terms
tags:
- "beacon-query"
parameters:
- name: Authorization
in: header
description: The authorization header
required: true
schema:
type: string
responses:
"200":
description: A list of filtering terms
content:
application/json:
schema:
$ref: "#/components/schemas/BeaconFilteringTermsResponse"
"401":
description: "Unauthorized"
security:
- beacon_auth:
- read:beacon
Expand Down
12 changes: 12 additions & 0 deletions src/main/openapi/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ paths:
required: false
schema:
type: string
- name: Authorization
in: header
description: The authorization header
required: false
schema:
type: string
responses:
"200":
description: A list of packages matching the search criteria
Expand All @@ -80,6 +86,12 @@ paths:
required: true
schema:
type: string
- name: Authorization
in: header
description: The authorization header
required: false
schema:
type: string
responses:
"200":
description: The package with the specified ID
Expand Down

0 comments on commit 02f043b

Please sign in to comment.