Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
_ChallengeAuthPolicyBase -> ChallengeAuthPolicyBase
  • Loading branch information
chlowell committed Jul 9, 2019
commit 02236420c6c9c7177abeb1b470e6f8a25055bd0c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from .challenge_auth_policy import ChallengeAuthPolicy
from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase
from .http_challenge import HttpChallenge
from . import http_challenge_cache as HttpChallengeCache

__all__ = ["ChallengeAuthPolicy", "HttpChallenge", "HttpChallengeCache"]
__all__ = ["ChallengeAuthPolicy", "ChallengeAuthPolicyBase", "HttpChallenge", "HttpChallengeCache"]

try:
from .async_challenge_auth_policy import AsyncChallengeAuthPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
from azure.core.pipeline.policies import AsyncHTTPPolicy
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from . import HttpChallenge, HttpChallengeCache
from .challenge_auth_policy import _ChallengeAuthPolicyBase
from . import ChallengeAuthPolicyBase, HttpChallenge, HttpChallengeCache


class AsyncChallengeAuthPolicy(_ChallengeAuthPolicyBase, AsyncHTTPPolicy):
class AsyncChallengeAuthPolicy(ChallengeAuthPolicyBase, AsyncHTTPPolicy):
"""policy for handling HTTP authentication challenges"""

async def send(self, request: PipelineRequest) -> HttpResponse:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
from . import http_challenge_cache as ChallengeCache


class _ChallengeAuthPolicyBase(_BearerTokenCredentialPolicyBase):
class ChallengeAuthPolicyBase(_BearerTokenCredentialPolicyBase):
"""Sans I/O base for challenge authentication policies"""

def __init__(self, credential, **kwargs):
super(_ChallengeAuthPolicyBase, self).__init__(credential, **kwargs)
super(ChallengeAuthPolicyBase, self).__init__(credential, **kwargs)

@staticmethod
def _update_challenge(request, challenger):
Expand All @@ -40,7 +40,7 @@ def _update_challenge(request, challenger):
return challenge


class ChallengeAuthPolicy(_ChallengeAuthPolicyBase, HTTPPolicy):
class ChallengeAuthPolicy(ChallengeAuthPolicyBase, HTTPPolicy):
"""policy for handling HTTP authentication challenges"""

def send(self, request):
Expand Down