def authorize(auth = {})
      auth = @authentication ||= TaskMapper::Authenticator.new(auth)

      if auth[:username].blank? && auth[:email].blank?
        message = "Please provide a username or email."
        raise TaskMapper::Exception.new message
      end

      if auth[:token].blank? && auth[:password].blank?
        message = "Please provide a token or password."
        raise TaskMapper::Exception.new message
      end

      username = (auth[:username].blank? ? auth[:email] : auth[:username])
      password = (auth[:token].blank? ? auth[:password] : auth[:token])

      KanbanpadAPI.authenticate username, password
    end
def authorize(auth = {})
      auth = @authentication ||= TaskMapper::Authenticator.new(auth)

      if auth[:username].blank? && auth[:email].blank?
        message = "Please provide a username or email."
        raise TaskMapper::Exception.new message
      end

      if auth[:token].blank? && auth[:password].blank?
        message = "Please provide a token or password."
        raise TaskMapper::Exception.new message
      end

      username = (auth[:username].blank? ? auth[:email] : auth[:username])
      password = (auth[:token].blank? ? auth[:password] : auth[:token])

      KanbanpadAPI.authenticate username, password
    end
Public: Checks authentication and auths against Kanbanpad API

 auth - hash of authentication options

 Returns nothing