Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Nextcloud
server
Commits
d6dea09f
Unverified
Commit
d6dea09f
authored
7 years ago
by
Morris Jobke
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #9323 from nextcloud/backport/9322/swift-v3
[swift] Better swift V3 token handling
parents
e0e687f2
1dd71930
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/Files/ObjectStore/SwiftFactory.php
+3
-3
3 additions, 3 deletions
lib/private/Files/ObjectStore/SwiftFactory.php
with
3 additions
and
3 deletions
lib/private/Files/ObjectStore/SwiftFactory.php
+
3
−
3
View file @
d6dea09f
...
...
@@ -56,7 +56,7 @@ class SwiftFactory {
private
function
getCachedToken
(
string
$cacheKey
)
{
$cachedTokenString
=
$this
->
cache
->
get
(
$cacheKey
.
'/token'
);
if
(
$cachedTokenString
)
{
return
json_decode
(
$cachedTokenString
);
return
json_decode
(
$cachedTokenString
,
true
);
}
else
{
return
null
;
}
...
...
@@ -131,9 +131,9 @@ class SwiftFactory {
$cachedToken
=
$this
->
params
[
'cachedToken'
];
$hasValidCachedToken
=
false
;
if
(
is_array
(
$cachedToken
))
{
if
(
\
is_array
(
$cachedToken
)
&&
(
$authService
instanceof
IdentityV3Service
)
)
{
$token
=
$authService
->
generateTokenFromCache
(
$cachedToken
);
if
(
is_null
(
$token
->
catalog
))
{
if
(
\
is_null
(
$token
->
catalog
))
{
$this
->
logger
->
warning
(
'Invalid cached token for swift, no catalog set: '
.
json_encode
(
$cachedToken
));
}
else
if
(
$token
->
hasExpired
())
{
$this
->
logger
->
debug
(
'Cached token for swift expired'
);
...
...
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