Skip to content

Commit

Permalink
Merge branch 'pkce-auth' of github.com:lyft/flytekit into pkce-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
katrogan committed Dec 6, 2019
2 parents 946a058 + 0dc3186 commit a940a0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions flytekit/clis/auth/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
REDIRECT_URI as _REDIRECT_URI,
CLIENT_ID as _CLIENT_ID
)
from flytekit.configuration.platform import URL as _URL
from flytekit.configuration.platform import URL as _URL, INSECURE as _INSECURE

try: # Python 3
import urllib.parse as _urlparse
Expand All @@ -18,7 +18,9 @@


def _get_discovery_endpoint():
return _urlparse.urljoin(_URL.get(), discovery_endpoint_path)
if _INSECURE.get():
return _urlparse.urljoin('http://{}/'.format(_URL.get()), discovery_endpoint_path)
return _urlparse.urljoin('https://{}/'.format(_URL.get()), discovery_endpoint_path)


# Lazy initialized authorization client singleton
Expand Down
2 changes: 1 addition & 1 deletion flytekit/clis/auth/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AuthorizationEndpoints(object):
A simple wrapper around commonly discovered endpoints used for the PKCE auth flow.
"""
def __init__(self, auth_endpoint=None, token_endpoint=None):
self._auth_endpoint = auth_endpoint
self._auth_endpoint = auth_endpoint
self._token_endpoint = token_endpoint

@property
Expand Down

0 comments on commit a940a0c

Please sign in to comment.