myinfo 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/myinfo.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e4f4d83acb9ce5afd75d888d6e555089ba29689b6fe844d32051be9ddba21fd1
|
|
4
|
+
data.tar.gz: 5e05d4a0d40c57fb39fcec4e07e4412c6d25158d440478e89827c5aef176327f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 358d683837d81a175ab85f82a27d13789e2244587b711f6d3e3d370d0d7b3eca9780a5654a92d525f2838331da82a5505f2c4c58f00c931f79824967a59e3bac
|
|
7
|
+
data.tar.gz: cad0b5dfb3a0cfad6efc34269a7bce69572dec34dc44ab709203a88ac5c02d34490cb6609e2e60bc79f0a47f95f60bdc885a8e0e8dd954c11b0b8a80a3ae2d53
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
config.app_id = ''
|
|
16
16
|
config.client_id = ''
|
|
17
17
|
config.client_secret = ''
|
|
18
|
-
config.base_url = 'test.api.myinfo.gov.sg'
|
|
18
|
+
config.base_url = 'test.api.myinfo.gov.sg'
|
|
19
19
|
config.redirect_uri = 'https://localhost:3001/callback'
|
|
20
20
|
config.public_facing = true
|
|
21
21
|
config.private_key = File.read(Rails.root.join('private_key_location'))
|
|
@@ -55,7 +55,7 @@ result = MyInfo::V3::Person.call(access_token: response.data) if response.succes
|
|
|
55
55
|
config.app_id = ''
|
|
56
56
|
config.client_id = ''
|
|
57
57
|
config.client_secret = ''
|
|
58
|
-
config.base_url = 'test.api.myinfo.gov.sg'
|
|
58
|
+
config.base_url = 'test.api.myinfo.gov.sg'
|
|
59
59
|
config.redirect_uri = 'https://localhost:3001/callback'
|
|
60
60
|
config.singpass_eservice_id = 'MYINFO-CONSENTPLATFORM'
|
|
61
61
|
config.private_key = File.read(Rails.root.join('private_key_location'))
|
data/lib/myinfo.rb
CHANGED
|
@@ -29,9 +29,10 @@ module MyInfo
|
|
|
29
29
|
|
|
30
30
|
# Configuration to set various properties needed to use MyInfo
|
|
31
31
|
class Configuration
|
|
32
|
-
attr_accessor :singpass_eservice_id, :app_id, :
|
|
33
|
-
:
|
|
32
|
+
attr_accessor :singpass_eservice_id, :app_id, :client_id, :proxy, :private_key, :public_cert, :client_secret,
|
|
33
|
+
:redirect_uri
|
|
34
34
|
|
|
35
|
+
attr_reader :base_url
|
|
35
36
|
attr_writer :public_facing, :sandbox
|
|
36
37
|
|
|
37
38
|
def initialize
|
|
@@ -40,6 +41,10 @@ module MyInfo
|
|
|
40
41
|
@proxy = { address: nil, port: nil }
|
|
41
42
|
end
|
|
42
43
|
|
|
44
|
+
def base_url=(url)
|
|
45
|
+
@base_url = url.sub('https://', '').split('/').first
|
|
46
|
+
end
|
|
47
|
+
|
|
43
48
|
def base_url_with_protocol
|
|
44
49
|
"https://#{base_url}"
|
|
45
50
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: myinfo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lim Yao Jie
|
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
173
|
version: '0'
|
|
174
174
|
requirements: []
|
|
175
|
-
rubygems_version: 3.1.
|
|
175
|
+
rubygems_version: 3.1.2
|
|
176
176
|
signing_key:
|
|
177
177
|
specification_version: 4
|
|
178
178
|
summary: MyInfo gem
|