Class: MyInfo::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/myinfo.rb

Overview

Configuration to set various properties needed to use MyInfo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



38
39
40
41
42
# File 'lib/myinfo.rb', line 38

def initialize
  @public_facing = false
  @sandbox = false
  @proxy = { address: nil, port: nil }
end

Instance Attribute Details

#app_idObject

Returns the value of attribute app_id.



32
33
34
# File 'lib/myinfo.rb', line 32

def app_id
  @app_id
end

#base_urlObject

Returns the value of attribute base_url.



35
36
37
# File 'lib/myinfo.rb', line 35

def base_url
  @base_url
end

#client_idObject

Returns the value of attribute client_id.



32
33
34
# File 'lib/myinfo.rb', line 32

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



32
33
34
# File 'lib/myinfo.rb', line 32

def client_secret
  @client_secret
end

#private_keyObject

Returns the value of attribute private_key.



32
33
34
# File 'lib/myinfo.rb', line 32

def private_key
  @private_key
end

#proxyObject

Returns the value of attribute proxy.



32
33
34
# File 'lib/myinfo.rb', line 32

def proxy
  @proxy
end

#public_certObject

Returns the value of attribute public_cert.



32
33
34
# File 'lib/myinfo.rb', line 32

def public_cert
  @public_cert
end

#public_facing=(value) ⇒ Object (writeonly)

Sets the attribute public_facing

Parameters:

  • value

    the value to set the attribute public_facing to.



36
37
38
# File 'lib/myinfo.rb', line 36

def public_facing=(value)
  @public_facing = value
end

#redirect_uriObject

Returns the value of attribute redirect_uri.



32
33
34
# File 'lib/myinfo.rb', line 32

def redirect_uri
  @redirect_uri
end

#sandbox=(value) ⇒ Object (writeonly)

Sets the attribute sandbox

Parameters:

  • value

    the value to set the attribute sandbox to.



36
37
38
# File 'lib/myinfo.rb', line 36

def sandbox=(value)
  @sandbox = value
end

#singpass_eservice_idObject

Returns the value of attribute singpass_eservice_id.



32
33
34
# File 'lib/myinfo.rb', line 32

def singpass_eservice_id
  @singpass_eservice_id
end

Instance Method Details

#base_url_with_protocolObject



48
49
50
# File 'lib/myinfo.rb', line 48

def base_url_with_protocol
  "https://#{base_url}"
end

#public?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/myinfo.rb', line 52

def public?
  @public_facing
end

#sandbox?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/myinfo.rb', line 56

def sandbox?
  @sandbox
end