Class: MyInfo::Configuration
- Inherits:
-
Object
- Object
- MyInfo::Configuration
- Defined in:
- lib/myinfo.rb
Overview
Configuration to set various properties needed to use MyInfo
Instance Attribute Summary collapse
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#public_cert ⇒ Object
Returns the value of attribute public_cert.
-
#public_facing ⇒ Object
writeonly
Sets the attribute public_facing.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#sandbox ⇒ Object
writeonly
Sets the attribute sandbox.
-
#singpass_eservice_id ⇒ Object
Returns the value of attribute singpass_eservice_id.
Instance Method Summary collapse
- #base_url_with_protocol ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #public? ⇒ Boolean
- #sandbox? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
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_id ⇒ Object
Returns the value of attribute app_id.
32 33 34 |
# File 'lib/myinfo.rb', line 32 def app_id @app_id end |
#base_url ⇒ Object
Returns the value of attribute base_url.
35 36 37 |
# File 'lib/myinfo.rb', line 35 def base_url @base_url end |
#client_id ⇒ Object
Returns the value of attribute client_id.
32 33 34 |
# File 'lib/myinfo.rb', line 32 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
32 33 34 |
# File 'lib/myinfo.rb', line 32 def client_secret @client_secret end |
#private_key ⇒ Object
Returns the value of attribute private_key.
32 33 34 |
# File 'lib/myinfo.rb', line 32 def private_key @private_key end |
#proxy ⇒ Object
Returns the value of attribute proxy.
32 33 34 |
# File 'lib/myinfo.rb', line 32 def proxy @proxy end |
#public_cert ⇒ Object
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
36 37 38 |
# File 'lib/myinfo.rb', line 36 def public_facing=(value) @public_facing = value end |
#redirect_uri ⇒ Object
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
36 37 38 |
# File 'lib/myinfo.rb', line 36 def sandbox=(value) @sandbox = value end |
#singpass_eservice_id ⇒ Object
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_protocol ⇒ Object
48 49 50 |
# File 'lib/myinfo.rb', line 48 def base_url_with_protocol "https://#{base_url}" end |
#public? ⇒ Boolean
52 53 54 |
# File 'lib/myinfo.rb', line 52 def public? @public_facing end |
#sandbox? ⇒ Boolean
56 57 58 |
# File 'lib/myinfo.rb', line 56 def sandbox? @sandbox end |