Skip to content
Prev Previous commit
Next Next commit
Slight adjustment
  • Loading branch information
pvaneck committed Sep 5, 2024
commit 5ab7003f541748df6ee696a16d73ffbcf311fffe
5 changes: 4 additions & 1 deletion sdk/core/azure-core/azure/core/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_token(


@runtime_checkable
class SupportsTokenInfo(ContextManager["SupportsTokenInfo"], Protocol):
class SupportsTokenInfo(Protocol, ContextManager["SupportsTokenInfo"]):
"""Protocol for classes able to provide OAuth access tokens with additional properties."""

def get_token_info(self, *scopes: str, options: Optional[TokenRequestOptions] = None) -> AccessTokenInfo:
Expand All @@ -110,6 +110,9 @@ def get_token_info(self, *scopes: str, options: Optional[TokenRequestOptions] =
"""
...

def close(self) -> None:
pass


TokenProvider = Union[TokenCredential, SupportsTokenInfo]

Expand Down