Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
social_auth_vk
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
social_auth_vk
Commits
5ff4d358
Commit
5ff4d358
authored
11 months ago
by
David Pashaev
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3119944
by gvso, davps: Use parent's request object in AuthManager
parent
5f69efed
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/VkontakteAuthManager.php
+6
-11
6 additions, 11 deletions
src/VkontakteAuthManager.php
with
6 additions
and
11 deletions
src/VkontakteAuthManager.php
+
6
−
11
View file @
5ff4d358
...
...
@@ -8,9 +8,9 @@ use Drupal\Core\Url;
use
Drupal\social_api
\SocialApiException
;
use
Drupal\social_auth
\AuthManager\OAuth2Manager
;
use
Symfony\Component\HttpFoundation\RequestStack
;
use
VK\OAuth\Scopes\VKOAuthUserScope
;
use
VK\OAuth\VKOAuth
;
use
VK\OAuth\VKOAuthDisplay
;
use
VK\OAuth\Scopes\VKOAuthUserScope
;
use
VK\OAuth\VKOAuthResponseType
;
/**
...
...
@@ -46,13 +46,6 @@ class VkontakteAuthManager extends OAuth2Manager {
*/
protected
$oauth
;
/**
* The currently active request object.
*
* @var \Symfony\Component\HttpFoundation\Request
*/
protected
$request
;
/**
* The secret state for the authentication.
*
...
...
@@ -73,10 +66,12 @@ class VkontakteAuthManager extends OAuth2Manager {
public
function
__construct
(
ConfigFactory
$configFactory
,
LoggerChannelFactoryInterface
$logger_factory
,
RequestStack
$request_stack
)
{
parent
::
__construct
(
$configFactory
->
get
(
'social_auth_vk.settings'
),
$logger_factory
);
parent
::
__construct
(
$configFactory
->
get
(
'social_auth_vk.settings'
),
$logger_factory
,
$request_stack
->
getCurrentRequest
());
$this
->
oauth
=
new
VKOAuth
();
$this
->
request
=
$request_stack
->
getCurrentRequest
();
}
/**
...
...
@@ -145,7 +140,7 @@ class VkontakteAuthManager extends OAuth2Manager {
$scopes
=
array_merge
(
$scopes
,
explode
(
','
,
$extra_scopes
));
}
return
$this
->
oauth
->
getAuthorizeUrl
(
VKOAuthResponseType
::
CODE
,
$client_id
,
$redirect_uri
,
$display
,
$scopes
,
$state
);
return
$this
->
oauth
->
getAuthorizeUrl
(
VKOAuthResponseType
::
CODE
,
(
int
)
$client_id
,
$redirect_uri
,
$display
,
$scopes
,
$state
);
}
/**
...
...
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