Get the username & password from the Authorization header

        If the header is actually malformed where Basic Auth was
        indicated by the request then an InvalidAuthSyntax exception
        is raised. Otherwise an AuthRequired exception since it's
        unclear in this scenario if the requestor was even aware
        Authentication was required & if so which "scheme".

        Calls _validate_auth_scheme first & bubbles up it's
        exceptions.

        :return:
            tuple (username, password)
        :raise:
            AuthRequired, InvalidAuthSyntax

def _get_creds(self, req):
        """ Get the username & password from the Authorization header

        If the header is actually malformed where Basic Auth was
        indicated by the request then an InvalidAuthSyntax exception
        is raised. Otherwise an AuthRequired exception since it's
        unclear in this scenario if the requestor was even aware
        Authentication was required & if so which "scheme".

        Calls _validate_auth_scheme first & bubbles up it's
        exceptions.

        :return:
            tuple (username, password)
        :raise:
            AuthRequired, InvalidAuthSyntax
        """

        self._validate_auth_scheme(req)

        try:
            creds = naked(req.auth.split(' ')[1])
            creds = b64decode(creds)

            username, password = creds.split(':')
            return username, password
        except IndexError:
            raise InvalidAuthSyntax(**{
                'detail': 'You are using the Basic Authentication scheme as '
                          'required to login but your Authorization header is '
                          'completely missing the login credentials.',
                'links': 'tools.ietf.org/html/rfc2617#section-2',
            })
        except TypeError:
            raise InvalidAuthSyntax(**{
                'detail': 'Our API failed to base64 decode your Basic '
                          'Authentication login credentials in the '
                          'Authorization header. They seem to be malformed.',
                'links': 'tools.ietf.org/html/rfc2617#section-2',
            })
        except ValueError:
            raise InvalidAuthSyntax(**{
                'detail': 'Our API failed to identify a username & password '
                          'in your Basic Authentication Authorization header '
                          'after decoding them. The username or password is '
                          'either missing or not separated by a ":" per the '
                          'spec. Either way the credentials are malformed.',
                'links': 'tools.ietf.org/html/rfc2617#section-2',
            })