Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
esap-userprofile-python-client
Manage
Activity
Members
Labels
Plan
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
ESCAPE WP5
esap-userprofile-python-client
Commits
f58333db
Commit
f58333db
authored
2 years ago
by
Yan Grange
Browse files
Options
Downloads
Patches
Plain Diff
Fix small typo in the client code
parent
6d426c4f
Branches
Branches containing commit
No related tags found
1 merge request
!14
Fix small typo in the client code
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
esap_client/shopping_client.py
+1
-1
1 addition, 1 deletion
esap_client/shopping_client.py
with
1 addition
and
1 deletion
esap_client/shopping_client.py
+
1
−
1
View file @
f58333db
...
@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__)
...
@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__)
def
is_valid_token
(
token
:
str
)
->
bool
:
def
is_valid_token
(
token
:
str
)
->
bool
:
"""
Check that the given token has not expired
"""
"""
Check that the given token has not expired
"""
try
:
try
:
self
data
=
token
.
split
(
"
.
"
)[
1
]
data
=
token
.
split
(
"
.
"
)[
1
]
padded
=
data
+
"
=
"
*
divmod
(
len
(
data
),
4
)[
1
]
padded
=
data
+
"
=
"
*
divmod
(
len
(
data
),
4
)[
1
]
payload
=
json
.
loads
(
base64
.
urlsafe_b64decode
(
padded
))
payload
=
json
.
loads
(
base64
.
urlsafe_b64decode
(
padded
))
return
payload
[
"
exp
"
]
>
int
(
time
.
time
())
+
10
return
payload
[
"
exp
"
]
>
int
(
time
.
time
())
+
10
...
...
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