# Copyright 2018 Immuta, Inc. Licensed under the Immuta Software License
# Version 0.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
#
#    http://www.immuta.com/licenses/Immuta_Software_License_0.1.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


class InvalidTokenError(Exception):
    def __init__(self, msg):
        super(InvalidTokenError, self).__init__(msg)
        self.message = msg


class InvalidLoginError(Exception):
    def __init__(self, msg):
        super(InvalidLoginError, self).__init__(msg)
        self.message = msg


class UnknownAuthenticationScheme(Exception):
    def __init__(self, msg=None):
        msg = (
            msg
            if msg
            else "Unable to generate authentication scheme with provided parameters."
        )
        super(UnknownAuthenticationScheme, self).__init__(msg)
        self.message = msg


class ImmutaCredentialsError(Exception):
    pass


class BadImmutaConfigException(Exception):
    pass
