Use abstract base class for auth handler
Use the abc module for managing abstract base classes in the driver layer. bp abstract-base-class-drivers Change-Id: I302a9bf0ac3aea2a2f687e0ceda7e107c0c11539
This commit is contained in:
parent
8c1899cc8f
commit
8285cd5065
@ -14,17 +14,23 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
from keystone.common import dependency
|
||||
from keystone import exception
|
||||
|
||||
|
||||
@dependency.requires('identity_api')
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class AuthMethodHandler(object):
|
||||
"""Abstract base class for an authentication plugin."""
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def authenticate(self, context, auth_payload, auth_context):
|
||||
"""Authenticate user and return an authentication context.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user