Skip to content

Commit

Permalink
force api key to be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-cohere committed May 8, 2024
1 parent 8bd8976 commit 5226a91
Show file tree
Hide file tree
Showing 87 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion _template_/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):

# This function is run for all endpoints to ensure requests are using a valid API key
def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion agilitycms/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion agora/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion aha/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion algolia/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion asana/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()

Expand Down
2 changes: 1 addition & 1 deletion atera/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()

return {}
2 changes: 1 addition & 1 deletion backstage/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion basecamp/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion bigquery/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion blogger/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion box/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion carbon/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()

Expand Down
2 changes: 1 addition & 1 deletion cockroach/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion coda/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion confluence/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion contentful/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion copper/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion couchbase/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion courier/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()

Expand Down
2 changes: 1 addition & 1 deletion crunchbase/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def search(body):

# This function is run for all endpoints to ensure requests are using a valid API key
def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion discourse/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion docusign/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion dropbox/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion egnyte/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion elastic/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()

return {}
2 changes: 1 addition & 1 deletion fifteenfive/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion fireflies/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion freshdesk/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion freshsales/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion freshservice/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()

Expand Down
2 changes: 1 addition & 1 deletion gcalendar/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()

Expand Down
2 changes: 1 addition & 1 deletion gdrive/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion github/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()

return {}
2 changes: 1 addition & 1 deletion gitlab/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion gmail/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()

Expand Down
2 changes: 1 addition & 1 deletion guru/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion hackernews/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))

if api_key != "" and token != api_key:
raise Unauthorized()
Expand Down
2 changes: 1 addition & 1 deletion helpscout/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()
# successfully authenticated
Expand Down
2 changes: 1 addition & 1 deletion hubspot/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion intercom/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()

return {}
2 changes: 1 addition & 1 deletion jenkins/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
2 changes: 1 addition & 1 deletion jira/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def search(body):


def apikey_auth(token):
api_key = app.config.get("CONNECTOR_API_KEY", "")
api_key = str(app.config.get("CONNECTOR_API_KEY", ""))
if api_key != "" and token != api_key:
raise Unauthorized()

Expand Down
2 changes: 1 addition & 1 deletion kendra/provider/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def search(body):


def apikey_auth(token):
if token != app.config.get("CONNECTOR_API_KEY"):
if token != str(app.config.get("CONNECTOR_API_KEY")):
raise Unauthorized()
# successfully authenticated
return {}
Loading

0 comments on commit 5226a91

Please sign in to comment.