Module: Authpds::Session::Config

Defined in:
lib/authpds/session/config.rb

Instance Method Summary collapse

Instance Method Details

#anonymous(value = nil) ⇒ Object Also known as: anonymous=

Does the system allow anonymous access?



17
18
19
# File 'lib/authpds/session/config.rb', line 17

def anonymous(value = nil)
  rw_config(:anonymous, value, true)
end

#calling_system(value = nil) ⇒ Object Also known as: calling_system=

Name of the system



11
12
13
# File 'lib/authpds/session/config.rb', line 11

def calling_system(value = nil)
  rw_config(:calling_system, value, "authpds")
end

#institution_param_key(value = nil) ⇒ Object Also known as: institution_param_key=

Querystring parameter key for the institution value



50
51
52
# File 'lib/authpds/session/config.rb', line 50

def institution_param_key(value = nil)
  rw_config(:institution_param_key, value, "institute")
end

#login_inaccessible_url(value = nil) ⇒ Object Also known as: login_inaccessible_url=

Custom url to redirect to in case of system outage



38
39
40
# File 'lib/authpds/session/config.rb', line 38

def (value = nil)
  rw_config(:login_inaccessible_url, value, "")
end

#pds_attributes(value = nil) ⇒ Object Also known as: pds_attributes=

Mapping of PDS attributes



23
24
25
26
27
28
# File 'lib/authpds/session/config.rb', line 23

def pds_attributes(value = nil)
  value.each_value { |pds_attr|
    pds_attr.gsub!("-", "_") } unless value.nil?
  rw_config(:pds_attributes, value, { email: "email", firstname: "name",
    lastname: "name", primary_institution: "institute" })
end

#pds_record_identifier(value = nil) ⇒ Object Also known as: pds_record_identifier=

PDS user method to call to identify record



44
45
46
# File 'lib/authpds/session/config.rb', line 44

def pds_record_identifier(value = nil)
  rw_config(:pds_record_identifier, value, :id)
end

#pds_url(value = nil) ⇒ Object Also known as: pds_url=

Base pds url



5
6
7
# File 'lib/authpds/session/config.rb', line 5

def pds_url(value = nil)
  rw_config(:pds_url, value)
end

#redirect_logout_url(value = nil) ⇒ Object Also known as: redirect_logout_url=

Custom redirect logout url



32
33
34
# File 'lib/authpds/session/config.rb', line 32

def redirect_logout_url(value = nil)
  rw_config(:redirect_logout_url, value, "")
end

#validate_url_name(value = nil) ⇒ Object Also known as: validate_url_name=

URL name for validation action



56
57
58
# File 'lib/authpds/session/config.rb', line 56

def validate_url_name(value = nil)
  rw_config(:validate_url_name, value, "validate_url")
end