Sha256: be42c490ef5349eeb4a579ad979b138744ad1ec45f561e3b7c6fede040c2f51f

Contents?: true

Size: 474 Bytes

Versions: 8

Compression:

Stored size: 474 Bytes

Contents

module Conjur
  module Authn
    class API < Conjur::API
      class << self
        def host
          ENV['CONJUR_AUTHN_URL'] || default_host
        end
        
        def default_host
          case Conjur.env
          when 'test', 'development'
            "http://localhost:#{Conjur.service_base_port}"
          else
            "https://authn-#{Conjur.stack}-conjur.herokuapp.com"
          end
        end
      end
    end
  end
end

require 'conjur/api/authn'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
conjur-api-2.1.5 lib/conjur/authn-api.rb
conjur-api-2.1.4 lib/conjur/authn-api.rb
conjur-api-2.1.3 lib/conjur/authn-api.rb
conjur-api-2.1.2 lib/conjur/authn-api.rb
conjur-api-2.1.1 lib/conjur/authn-api.rb
conjur-api-2.1.0 lib/conjur/authn-api.rb
conjur-api-2.0.1 lib/conjur/authn-api.rb
conjur-api-2.0.0 lib/conjur/authn-api.rb