Rename v3._AuthConstructor to v3.AuthConstructor
Since more auth plugins depending on v3._AuthConstructor are created in separated modules, this class should no longer be named as it was private. Auth plugins using v3._AuthConstructor currently are: - SAML2 auth plugin (under review) - oAuth auth plugin (merged with basecode) Change-Id: Ia097941a465a972dc7ca177a74c8fb8d21d219e6
This commit is contained in:
@@ -159,7 +159,7 @@ class AuthMethod(object):
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class _AuthConstructor(Auth):
|
||||
class AuthConstructor(Auth):
|
||||
"""AuthConstructor is a means of creating an Auth Plugin that contains
|
||||
only one authentication method. This is generally the required usage.
|
||||
|
||||
@@ -173,7 +173,7 @@ class _AuthConstructor(Auth):
|
||||
def __init__(self, auth_url, *args, **kwargs):
|
||||
method_kwargs = self._auth_method_class._extract_kwargs(kwargs)
|
||||
method = self._auth_method_class(*args, **method_kwargs)
|
||||
super(_AuthConstructor, self).__init__(auth_url, [method], **kwargs)
|
||||
super(AuthConstructor, self).__init__(auth_url, [method], **kwargs)
|
||||
|
||||
|
||||
class PasswordMethod(AuthMethod):
|
||||
@@ -211,7 +211,7 @@ class PasswordMethod(AuthMethod):
|
||||
return 'password', {'user': user}
|
||||
|
||||
|
||||
class Password(_AuthConstructor):
|
||||
class Password(AuthConstructor):
|
||||
_auth_method_class = PasswordMethod
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ class TokenMethod(AuthMethod):
|
||||
return 'token', {'id': self.token}
|
||||
|
||||
|
||||
class Token(_AuthConstructor):
|
||||
class Token(AuthConstructor):
|
||||
_auth_method_class = TokenMethod
|
||||
|
||||
def __init__(self, auth_url, token, **kwargs):
|
||||
|
@@ -51,5 +51,5 @@ class OAuthMethod(v3.AuthMethod):
|
||||
return 'oauth1', {}
|
||||
|
||||
|
||||
class OAuth(v3._AuthConstructor):
|
||||
class OAuth(v3.AuthConstructor):
|
||||
_auth_method_class = OAuthMethod
|
||||
|
Reference in New Issue
Block a user