File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
src/Symfony/Component/Security/Http/Authenticator/Passport Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,11 @@ class Passport implements UserPassportInterface
28
28
29
29
protected $ user ;
30
30
31
+ private $ attributes = [];
32
+
31
33
/**
32
34
* @param CredentialsInterface $credentials the credentials to check for this authentication, use
33
- * SelfValidatingPassport if no credentials should be checked.
35
+ * SelfValidatingPassport if no credentials should be checked
34
36
* @param BadgeInterface[] $badges
35
37
*/
36
38
public function __construct (UserInterface $ user , CredentialsInterface $ credentials , array $ badges = [])
@@ -47,4 +49,22 @@ public function getUser(): UserInterface
47
49
{
48
50
return $ this ->user ;
49
51
}
52
+
53
+ /**
54
+ * @param mixed $value
55
+ */
56
+ public function setAttribute (string $ name , $ value ): void
57
+ {
58
+ $ this ->attributes [$ name ] = $ value ;
59
+ }
60
+
61
+ /**
62
+ * @param mixed $default
63
+ *
64
+ * @return mixed
65
+ */
66
+ public function getAttribute (string $ name , $ default = null )
67
+ {
68
+ return $ this ->attributes [$ name ] ?? $ default ;
69
+ }
50
70
}
You can’t perform that action at this time.
0 commit comments