Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
32a6beae
Commit
32a6beae
authored
Feb 23, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'fix/kobo'
# Conflicts: # cps/kobo.py
parents
146068c9
d30b44ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
kobo_auth.py
cps/kobo_auth.py
+3
-1
SyncToken.py
cps/services/SyncToken.py
+1
-1
No files found.
cps/kobo_auth.py
View file @
32a6beae
...
@@ -26,7 +26,9 @@ When first booting a Kobo device the user must sign into a Kobo (or affiliate) a
...
@@ -26,7 +26,9 @@ When first booting a Kobo device the user must sign into a Kobo (or affiliate) a
Upon successful sign-in, the user is redirected to
Upon successful sign-in, the user is redirected to
https://auth.kobobooks.com/CrossDomainSignIn?id=<some id>
https://auth.kobobooks.com/CrossDomainSignIn?id=<some id>
which serves the following response:
which serves the following response:
<script type='text/javascript'>location.href='kobo://UserAuthenticated?userId=<redacted>&userKey<redacted>&email=<redacted>&returnUrl=https
%3
a
%2
f
%2
fwww.kobo.com';</script>.
<script type='text/javascript'>
location.href='kobo://UserAuthenticated?userId=<redacted>&userKey<redacted>&email=<redacted>&returnUrl=https
%3
a
%2
f
%2
fwww.kobo.com';
</script>
And triggers the insertion of a userKey into the device's User table.
And triggers the insertion of a userKey into the device's User table.
Together, the device's DeviceId and UserKey act as an *irrevocable* authentication
Together, the device's DeviceId and UserKey act as an *irrevocable* authentication
...
...
cps/services/SyncToken.py
View file @
32a6beae
...
@@ -103,7 +103,7 @@ class SyncToken():
...
@@ -103,7 +103,7 @@ class SyncToken():
data_json
=
sync_token_json
[
"data"
]
data_json
=
sync_token_json
[
"data"
]
validate
(
sync_token_json
,
SyncToken
.
data_schema_v1
)
validate
(
sync_token_json
,
SyncToken
.
data_schema_v1
)
except
(
exceptions
.
ValidationError
,
ValueError
)
as
e
:
except
(
exceptions
.
ValidationError
,
ValueError
):
log
.
error
(
"Sync token contents do not follow the expected json schema."
)
log
.
error
(
"Sync token contents do not follow the expected json schema."
)
return
SyncToken
()
return
SyncToken
()
...
...
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