Sha256: 196e4afef66d96ea56441ed692dda09c5f1f9f9a8650c3dd68396af691bf62ff

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

require 'sufia/http_header_auth'

# TODO move this method to HttpAuth initializer
# Returns an array containing the vhost 'CoSign service' value and URL
Sufia.config do |config|
  config.id_namespace = "sufia"
  config.fits_path = "fits.sh"
  config.fits_to_desc_mapping= {
      :file_title => :title,
      :file_author => :creator
    }

  config.max_days_between_audits = 7

  # TODO move these to an HttpAuth initializer
    # Map hostnames onto vhosts
  config.hosts_vhosts_map = {
    'fedora1test' => 'https://scholarsphere-integration.dlt.psu.edu:8443/',
    'fedora2test' => 'https://scholarsphere-test.dlt.psu.edu/',
    'ss1stage' => 'https://scholarsphere-staging.dlt.psu.edu/',
    'ss2stage' => 'https://scholarsphere-staging.dlt.psu.edu/',
    'ss1prod' => 'https://scholarsphere.psu.edu/',
    'ss2prod' => 'https://scholarsphere.psu.edu/'
  }

  # TODO move these to an HttpAuth initializer
  config.logout_url = "https://webaccess.psu.edu/cgi-bin/logout?#{Sufia::HttpHeaderAuth.get_vhost_by_host(config)[1]}"
  config.login_url = "https://webaccess.psu.edu?cosign-#{Sufia::HttpHeaderAuth.get_vhost_by_host(config)[0]}&#{Sufia::HttpHeaderAuth.get_vhost_by_host(config)[1]}"
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sufia-0.0.1.pre2 lib/generators/sufia/templates/config/sufia.rb