You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ After the server has been configured it should be used as described in the [OAut
69
69
70
70
## UserEntity
71
71
In order for this library to work properly you will need to add your IdentityProvider to the IdTokenResponse object. This will be used internally to lookup a UserEntity by it's identifier. Additionally your UserEntity must implement the ClaimSetInterface which includes a single method getClaims(). The getClaims() method should return a list of attributes as key/value pairs that can be returned if the proper scope has been defined.
72
-
```
72
+
```php
73
73
use League\OAuth2\Server\Entities\Traits\EntityTrait;
74
74
use League\OAuth2\Server\Entities\UserEntityInterface;
75
75
use OpenIDConnectServer\Entities\ClaimSetInterface;
@@ -90,7 +90,7 @@ class UserEntity implements UserEntityInterface, ClaimSetInterface
90
90
91
91
## ClaimSets
92
92
A ClaimSet is a scope that defines a list of claims.
93
-
```
93
+
```php
94
94
// Example of the profile ClaimSet
95
95
$claimSet = new ClaimSetEntity('profile', [
96
96
'name',
@@ -114,7 +114,7 @@ As you can see from the above, profile lists a set of claims that can be extract
114
114
115
115
### Adding Custom ClaimSets
116
116
At some point you will likely want to include your own group of custom claims. To do this you will need to create a ClaimSetEntity, give it a scope (the value you will include in the scope parameter of your OAuth2 request) and the list of claims it supports.
0 commit comments