Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force api key to be a string #478

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading