Sha256: d9ce86bf15850924a3d12d412c9deb7a68698e0b9cacb61742d7d7906541df5e

Contents?: true

Size: 505 Bytes

Versions: 2

Compression:

Stored size: 505 Bytes

Contents

module Lifen
  class AppAuthenticatedClient < Client

    private

      def handle_status!(response)
        super(response)

        case response.status
        when 400
          raise Error, "Error 400"
        when 401
          raise InvalidSecretTokenError
        when 403
          raise UserAlreadyExistingError
        when 404
          raise Error, "Error 404, Page not found"
        end

      end

      def bearer
        Lifen.configuration.application_access_token
      end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lifen-1.0.1 lib/lifen/app_authenticated_client.rb
lifen-1.0.0 lib/lifen/app_authenticated_client.rb