ehsso 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehsso/person.rb +11 -4
- data/lib/ehsso/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f79fdf189b6f937310904f6527fa18608c42b15
|
4
|
+
data.tar.gz: 947eef5658a6f8bca3b9eddddd54a068643175b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60eee35327c03e8fd8aca309d9852140ff0a36c948ae4ca89c2b1a100a0992efe2d0ef3554371bdb0d59f63cbacfb67a02b95c8fc38bbe25b5af90e22ba6d44a
|
7
|
+
data.tar.gz: 0e6f9bd76b6931c0a09e2d4c5c63ba80fe74a74ce340aa0c9fc4c96078c53cba9db338392fbc77ac05671feb743888562d6f406e074c9e22967f4ebc17fba436
|
data/lib/ehsso/person.rb
CHANGED
@@ -11,7 +11,7 @@ module Ehsso
|
|
11
11
|
attr_accessor :module_name
|
12
12
|
attr_accessor :roles
|
13
13
|
|
14
|
-
|
14
|
+
attr_accessor :last_error_message
|
15
15
|
|
16
16
|
def initialize(args={})
|
17
17
|
@id = args[:id]
|
@@ -42,12 +42,19 @@ module Ehsso
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.parse_from_request_header(header={})
|
45
|
-
return nil unless header.is_a?(Hash)
|
46
|
-
|
47
45
|
person = Ehsso::Person.new()
|
48
46
|
|
47
|
+
unless header.is_a?(Hash)
|
48
|
+
person.last_error_message = "Request header argument is not a hash"
|
49
|
+
return person
|
50
|
+
end
|
51
|
+
|
49
52
|
# reference (mandatory)
|
50
|
-
|
53
|
+
if header['HTTP_NIBR521'].nil? || header['HTTP_NIBR521'].size == 0
|
54
|
+
person.last_error_message = "Unable to extract HTTP_NIBR* porperties from request header"
|
55
|
+
return person
|
56
|
+
end
|
57
|
+
|
51
58
|
person.reference = header['HTTP_NIBR521'].downcase
|
52
59
|
|
53
60
|
[
|
data/lib/ehsso/version.rb
CHANGED