# -*- coding: utf-8 -*-

"""
swaggerpetstore

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""

from apimatic_core.authentication.header_auth import HeaderAuth


class CustomAuthentication(HeaderAuth):

    @property
    def error_message(self):
        """Display error message on occurrence of authentication failure
         in CustomAuthentication

        """
        # TODO: Add your error message here in case of failure in authentication
        #
        # Example:
        # return "CustomAuth: _password is undefined."

    def __init__(self, password, config):
        auth_params = {}

        # TODO: Add your custom authentication here
        # auth_params["Password"] = password

        super().__init__(auth_params=auth_params)
        self._password = password
        self._config = config

    def is_valid(self):
        """Validate arguments for authentication"""
        # TODO: Add your validation checks here
        #
        # Example:
        # if self._password:
        #    return True
        return True
