Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a7bdd4

Browse filesBrowse files
committed
Add an interface for security passports which support attributes
1 parent 7df57da commit 5a7bdd4
Copy full SHA for 5a7bdd4

File tree

3 files changed

+32
-1
lines changed
Filter options

3 files changed

+32
-1
lines changed
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Security\Http\Authenticator\Passport;
13+
14+
/**
15+
* Represents a passport which contains attributes.
16+
*/
17+
interface AttributedPassportInterface extends PassportInterface
18+
{
19+
/**
20+
* @param mixed $value
21+
*/
22+
public function setAttribute(string $name, $value): void;
23+
24+
/**
25+
* @param mixed $default
26+
*
27+
* @return mixed
28+
*/
29+
public function getAttribute(string $name, $default = null): void;
30+
}

‎src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @author Wouter de Jong <wouter@wouterj.nl>
2323
*/
24-
class Passport implements UserPassportInterface
24+
class Passport implements UserPassportInterface, AttributedPassportInterface
2525
{
2626
use PassportTrait;
2727

‎src/Symfony/Component/Security/Http/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* Deprecate not setting the 5th argument (`$exceptionOnNoToken`) of `AccessListener` to `false`
88
* Deprecate `DeauthenticatedEvent`, use `TokenDeauthenticatedEvent` instead
9+
* Add `AttributedPassportInterface`
910

1011
5.3
1112
---

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.