Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4111692
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
Tue, Aug 18, 22:28 (1 d, 5 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6a/b4/61e0195d2dd259af4922ab7423ac
Default Alt Text
AuthorizationCodeAccessTokens.php (799 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment