Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bingo
Oauth2 Server
Commits
80bc291c
Unverified
Commit
80bc291c
authored
7 years ago
by
Andrew Millington
Browse files
Options
Download
Email Patches
Plain Diff
Added null checks before calling set functions
parent
143afc95
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
5 deletions
+16
-5
src/Entities/AuthCodeEntityInterface.php
src/Entities/AuthCodeEntityInterface.php
+1
-1
src/Grant/AbstractGrant.php
src/Grant/AbstractGrant.php
+4
-1
src/Grant/AuthCodeGrant.php
src/Grant/AuthCodeGrant.php
+5
-1
src/Grant/ImplicitGrant.php
src/Grant/ImplicitGrant.php
+5
-1
src/RequestTypes/AuthorizationRequest.php
src/RequestTypes/AuthorizationRequest.php
+1
-1
No files found.
src/Entities/AuthCodeEntityInterface.php
View file @
80bc291c
...
...
@@ -17,7 +17,7 @@ interface AuthCodeEntityInterface extends TokenInterface
public
function
getRedirectUri
();
/**
* @param string
|null
$uri
* @param string $uri
*/
public
function
setRedirectUri
(
$uri
);
}
This diff is collapsed.
Click to expand it.
src/Grant/AbstractGrant.php
View file @
80bc291c
...
...
@@ -407,7 +407,10 @@ abstract class AbstractGrant implements GrantTypeInterface
$authCode
->
setExpiryDateTime
((
new
\
DateTime
())
->
add
(
$authCodeTTL
));
$authCode
->
setClient
(
$client
);
$authCode
->
setUserIdentifier
(
$userIdentifier
);
$authCode
->
setRedirectUri
(
$redirectUri
);
if
(
$redirectUri
!==
null
)
{
$authCode
->
setRedirectUri
(
$redirectUri
);
}
foreach
(
$scopes
as
$scope
)
{
$authCode
->
addScope
(
$scope
);
...
...
This diff is collapsed.
Click to expand it.
src/Grant/AuthCodeGrant.php
View file @
80bc291c
...
...
@@ -270,7 +270,11 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
$authorizationRequest
->
setGrantTypeId
(
$this
->
getIdentifier
());
$authorizationRequest
->
setClient
(
$client
);
$authorizationRequest
->
setRedirectUri
(
$redirectUri
);
$authorizationRequest
->
setState
(
$stateParameter
);
if
(
$stateParameter
!==
null
)
{
$authorizationRequest
->
setState
(
$stateParameter
);
}
$authorizationRequest
->
setScopes
(
$scopes
);
if
(
$this
->
enableCodeExchangeProof
===
true
)
{
...
...
This diff is collapsed.
Click to expand it.
src/Grant/ImplicitGrant.php
View file @
80bc291c
...
...
@@ -177,7 +177,11 @@ class ImplicitGrant extends AbstractAuthorizeGrant
$authorizationRequest
->
setGrantTypeId
(
$this
->
getIdentifier
());
$authorizationRequest
->
setClient
(
$client
);
$authorizationRequest
->
setRedirectUri
(
$redirectUri
);
$authorizationRequest
->
setState
(
$stateParameter
);
if
(
$stateParameter
!==
null
)
{
$authorizationRequest
->
setState
(
$stateParameter
);
}
$authorizationRequest
->
setScopes
(
$finalizedScopes
);
return
$authorizationRequest
;
...
...
This diff is collapsed.
Click to expand it.
src/RequestTypes/AuthorizationRequest.php
View file @
80bc291c
...
...
@@ -183,7 +183,7 @@ class AuthorizationRequest
}
/**
* @param string
|null
$state
* @param string $state
*/
public
function
setState
(
$state
)
{
...
...
This diff is collapsed.
Click to expand it.
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