Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F2753050
AuthorizationCodeAccessTokens.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
799 B
Referenced Files
None
Subscribers
None
AuthorizationCodeAccessTokens.php
View Options
<?php
namespace
MediaWiki\Extension\OAuth\AuthorizationProvider\Grant
;
use
DateInterval
;
use
Exception
;
use
League\OAuth2\Server\Grant\AuthCodeGrant
;
use
League\OAuth2\Server\Grant\GrantTypeInterface
;
use
MediaWiki\Extension\OAuth\AuthorizationProvider\AccessToken
;
class
AuthorizationCodeAccessTokens
extends
AccessToken
{
/**
* @return GrantTypeInterface
* @throws Exception
*/
protected
function
getGrant
():
GrantTypeInterface
{
$authCodeRepo
=
$this
->
getAuthCodeRepo
();
$refreshTokenRepo
=
$this
->
getRefreshTokenRepo
();
$grant
=
new
AuthCodeGrant
(
$authCodeRepo
,
$refreshTokenRepo
,
new
DateInterval
(
'PT10M'
)
);
if
(
!
$this
->
config
->
get
(
'OAuth2RequireCodeChallengeForPublicClients'
)
)
{
$grant
->
disableRequireCodeChallengeForPublicClients
();
}
return
$grant
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Jul 3, 20:43 (1 d, 9 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
63/1d/63854574a0ac74f89977c18509d9
Default Alt Text
AuthorizationCodeAccessTokens.php (799 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment