Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simple_oauth-3026121
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
simple_oauth-3026121
Commits
ea800962
Unverified
Commit
ea800962
authored
6 years ago
by
Sergii Bondarenko
Committed by
Mateu Aguiló Bosch
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2934486
by BR0kEN, justinlevi, e0ipso, cilefen: $_Files object is lost during authentication
parent
52a8e4ef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Authentication/Provider/SimpleOauthAuthenticationProvider.php
+5
-2
5 additions, 2 deletions
...entication/Provider/SimpleOauthAuthenticationProvider.php
with
5 additions
and
2 deletions
src/Authentication/Provider/SimpleOauthAuthenticationProvider.php
+
5
−
2
View file @
ea800962
...
...
@@ -71,7 +71,7 @@ class SimpleOauthAuthenticationProvider implements AuthenticationProviderInterfa
public
function
authenticate
(
Request
$request
)
{
// Update the request with the OAuth information.
try
{
$request
=
$this
->
resourceServer
->
validateAuthenticatedRequest
(
$request
);
$
auth_
request
=
$this
->
resourceServer
->
validateAuthenticatedRequest
(
$request
);
}
catch
(
OAuthServerException
$exception
)
{
// Procedural code here is hard to avoid.
...
...
@@ -81,7 +81,7 @@ class SimpleOauthAuthenticationProvider implements AuthenticationProviderInterfa
}
$tokens
=
$this
->
entityTypeManager
->
getStorage
(
'oauth2_token'
)
->
loadByProperties
([
'value'
=>
$request
->
get
(
'oauth_access_token_id'
),
'value'
=>
$
auth_
request
->
get
(
'oauth_access_token_id'
),
]);
$token
=
reset
(
$tokens
);
...
...
@@ -99,6 +99,9 @@ class SimpleOauthAuthenticationProvider implements AuthenticationProviderInterfa
);
}
// Inherit uploaded files for the current request.
/* @link https://www.drupal.org/project/drupal/issues/2934486 */
$request
->
files
->
add
(
$auth_request
->
files
->
all
());
// Set consumer ID header on successful authentication, so negotiators
// will trigger correctly.
$request
->
headers
->
set
(
'X-Consumer-ID'
,
$account
->
getConsumer
()
->
uuid
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment