Skip to content

Commit 7077862

Browse files
authored
Merge pull request #1477 from Sephster/change-user-to-owner
Update additional attribute name
2 parents b8df2b3 + c357e88 commit 7077862

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.styleci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ enabled:
99
- include
1010
- method_separation
1111
- native_function_casing
12-
- no_blank_lines_between_uses
1312
- no_duplicate_semicolons
1413
- no_multiline_whitespace_before_semicolons
1514
- no_php4_constructor

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Changed additional attribute added from `oauth_user_id` to the more appropriately named `oauth_owner_id` which can encompass either the user ID or client ID (PR #XXX)
10+
811
## [9.2.0] - released 2025-02-15
912
### Added
1013
- Added a new function to the provided ClientTrait, `supportsGrantType` to allow the auth server to issue the response `unauthorized_client` when applicable (PR #1420)

src/AuthorizationValidators/BearerTokenValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function validateAuthorization(ServerRequestInterface $request): ServerRe
130130
return $request
131131
->withAttribute('oauth_access_token_id', $claims->get('jti'))
132132
->withAttribute('oauth_client_id', $claims->get('aud')[0])
133-
->withAttribute('oauth_user_id', $claims->get('sub'))
133+
->withAttribute('oauth_owner_id', $claims->get('sub'))
134134
->withAttribute('oauth_scopes', $claims->get('scopes'));
135135
}
136136
}

tests/ResponseTypes/BearerResponseTypeTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function testDetermineAccessTokenInHeaderValidToken(): void
154154

155155
self::assertEquals('abcdef', $request->getAttribute('oauth_access_token_id'));
156156
self::assertEquals('clientName', $request->getAttribute('oauth_client_id'));
157-
self::assertEquals('123', $request->getAttribute('oauth_user_id'));
157+
self::assertEquals('123', $request->getAttribute('oauth_owner_id'));
158158
self::assertEquals([], $request->getAttribute('oauth_scopes'));
159159
}
160160

0 commit comments

Comments
 (0)