@@ -28,17 +28,24 @@ class DynamicPolicy implements \JsonSerializable
28
28
*/
29
29
private $ wantedRememberMe ;
30
30
31
+ /**
32
+ * @var object|null
33
+ */
34
+ private $ identityProfileRequirements ;
35
+
31
36
/**
32
37
* @param \Yoti\ShareUrl\Policy\WantedAttribute[] $wantedAttributes
33
38
* Array of attributes to be requested.
34
39
* @param int[] $wantedAuthTypes
35
40
* Auth types represents the authentication type to be used.
36
41
* @param bool $wantedRememberMe
42
+ * @param object $identityProfileRequirements
37
43
*/
38
44
public function __construct (
39
45
array $ wantedAttributes ,
40
46
array $ wantedAuthTypes ,
41
- bool $ wantedRememberMe = false
47
+ bool $ wantedRememberMe = false ,
48
+ $ identityProfileRequirements = null
42
49
) {
43
50
Validation::isArrayOfType ($ wantedAttributes , [WantedAttribute::class], 'wantedAttributes ' );
44
51
$ this ->wantedAttributes = $ wantedAttributes ;
@@ -47,6 +54,7 @@ public function __construct(
47
54
$ this ->wantedAuthTypes = $ wantedAuthTypes ;
48
55
49
56
$ this ->wantedRememberMe = $ wantedRememberMe ;
57
+ $ this ->identityProfileRequirements = $ identityProfileRequirements ;
50
58
}
51
59
52
60
/**
@@ -61,6 +69,7 @@ public function jsonSerialize(): stdClass
61
69
'wanted_auth_types ' => $ this ->wantedAuthTypes ,
62
70
'wanted_remember_me ' => $ this ->wantedRememberMe ,
63
71
'wanted_remember_me_optional ' => false ,
72
+ 'identity_profile_requirements ' => $ this ->identityProfileRequirements ,
64
73
];
65
74
}
66
75
@@ -71,4 +80,14 @@ public function __toString(): string
71
80
{
72
81
return Json::encode ($ this );
73
82
}
83
+
84
+ /**
85
+ * IdentityProfileRequirements requested in the policy
86
+ *
87
+ * @return object|null
88
+ */
89
+ public function getIdentityProfileRequirements ()
90
+ {
91
+ return $ this ->identityProfileRequirements ;
92
+ }
74
93
}
0 commit comments