Skip to content

Commit f769555

Browse files
committed
ApiKeyAuth classes now return None on refresh
1 parent 63f88e8 commit f769555

File tree

1 file changed

+8
-8
lines changed
  • reportportal_client/_internal/services

1 file changed

+8
-8
lines changed

reportportal_client/_internal/services/auth.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ def get(self) -> Optional[str]:
7676
"""
7777
return f"Bearer {self.api_key}"
7878

79-
def refresh(self) -> Optional[str]:
79+
def refresh(self) -> None:
8080
"""Refresh the access key and return Authorization header value.
8181
82-
For API keys, this simply returns the key as there's no refresh mechanism.
82+
For API keys, this simply returns None as there's no refresh mechanism.
8383
84-
:return: Authorization header value with Bearer token.
84+
:return: None
8585
"""
86-
return f"Bearer {self.api_key}"
86+
return None
8787

8888

8989
class ApiKeyAuthAsync(Auth):
@@ -109,14 +109,14 @@ async def get(self) -> Optional[str]:
109109
"""
110110
return f"Bearer {self.api_key}"
111111

112-
async def refresh(self) -> Optional[str]:
112+
async def refresh(self) -> None:
113113
"""Refresh the access key and return Authorization header value.
114114
115-
For API keys, this simply returns the key as there's no refresh mechanism.
115+
For API keys, this simply returns None as there's no refresh mechanism.
116116
117-
:return: Authorization header value with Bearer token.
117+
:return: None
118118
"""
119-
return f"Bearer {self.api_key}"
119+
return None
120120

121121

122122
# noinspection PyAbstractClass

0 commit comments

Comments
 (0)