Skip to content
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
5 changes: 0 additions & 5 deletions planet/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,6 @@ def from_key(key: typing.Optional[str]) -> Auth:
Parameters:
key: Planet API key
"""
warnings.warn(
"Planet API keys will be deprecated for most use cases."
" Initialize an OAuth client, or create an OAuth service account."
" Proceeding for now.",
PendingDeprecationWarning)
if not key:
raise APIKeyAuthException('API key cannot be empty.')

Expand Down
6 changes: 0 additions & 6 deletions tests/unit/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ def test_Auth_from_env_alternate_doesnotexist(monkeypatch):


def test_Auth_from_login(monkeypatch):
# auth.AuthClient has been completely removed
# in the conversion to planet_auth
# def login(*args, **kwargs):
# return {'api_key': auth_data}
#
# monkeypatch.setattr(auth.AuthClient, 'login', login)
with pytest.raises(DeprecationWarning):
_ = auth.Auth.from_login('email', 'pw')

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_cli_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def test_CliSession_auth_valid(test_valid_secretfile):
received_request = route.calls.last.request
# The planet_auth library sends the api key as bearer token.
# The older Planet SDK sent it as HTTP basic.
# Most Planet APIs accept either (and API keys are being deprecated.)
# Most Planet APIs accept either.
# credentials = received_request.headers['authorization'].strip(
# 'Authorization: Basic ')
# assert base64.b64decode(credentials) == b'clisessiontest:'
Expand Down