Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
938b6c4e
Commit
938b6c4e
authored
Dec 19, 2013
by
Paul Klimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Google open id default params added.
parent
de83e4dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
AuthAction.php
extensions/yii/authclient/AuthAction.php
+2
-2
OpenId.php
extensions/yii/authclient/OpenId.php
+2
-3
GoogleOpenId.php
extensions/yii/authclient/clients/GoogleOpenId.php
+12
-1
No files found.
extensions/yii/authclient/AuthAction.php
View file @
938b6c4e
...
...
@@ -25,7 +25,7 @@ class AuthAction extends Action
/**
* @var string name of the auth client collection application component.
*/
public
$clientCollection
;
public
$clientCollection
=
'auth'
;
/**
* @var string name of the GET param, which is used to passed auth client id to this action.
*/
...
...
@@ -227,7 +227,7 @@ class AuthAction extends Action
break
;
}
}
else
{
$provider
->
identity
=
$provider
->
authUrl
;
// Setting identifier
//
$provider->identity = $provider->authUrl; // Setting identifier
$request
=
Yii
::
$app
->
getRequest
();
$provider
->
realm
=
$request
->
getHostInfo
();
$provider
->
returnUrl
=
$provider
->
realm
.
$request
->
getUrl
();
// getting return URL
...
...
extensions/yii/authclient/OpenId.php
View file @
938b6c4e
...
...
@@ -540,7 +540,7 @@ class OpenId extends Component implements ClientInterface
$counts
=
[];
$required
=
[];
$optional
=
[];
foreach
([
'required'
,
'optional'
]
as
$type
)
{
foreach
([
'required
Attributes
'
,
'optional'
]
as
$type
)
{
foreach
(
$this
->
$type
as
$alias
=>
$field
)
{
if
(
is_int
(
$alias
))
{
$alias
=
strtr
(
$field
,
'/'
,
'_'
);
...
...
@@ -626,7 +626,6 @@ class OpenId extends Component implements ClientInterface
$params
[
'openid.identity'
]
=
$this
->
identity
;
$params
[
'openid.claimed_id'
]
=
$this
->
claimed_id
;
}
return
$this
->
buildUrl
(
parse_url
(
$this
->
server
),
[
'query'
=>
http_build_query
(
$params
,
''
,
'&'
)]);
}
...
...
@@ -747,7 +746,7 @@ class OpenId extends Component implements ClientInterface
protected
function
getSregAttributes
()
{
$attributes
=
array
()
;
$attributes
=
[]
;
$sregToAx
=
array_flip
(
self
::
$axToSregMap
);
foreach
(
$this
->
data
as
$key
=>
$value
)
{
$keyMatch
=
'openid_sreg_'
;
...
...
extensions/yii/authclient/clients/GoogleOpenId.php
View file @
938b6c4e
...
...
@@ -17,5 +17,15 @@ use yii\authclient\OpenId;
*/
class
GoogleOpenId
extends
OpenId
{
public
function
init
()
{
parent
::
init
();
$this
->
setIdentity
(
'https://www.google.com/accounts/o8/id'
);
$this
->
requiredAttributes
=
[
'namePerson/first'
,
'namePerson/last'
,
'contact/email'
,
'pref/language'
,
];
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment