Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
daf56655
authored
2022-03-21 17:50:54 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
f5327d6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
src/apps/account/views.py
src/common/mixins.py
src/apps/account/views.py
View file @
daf5665
...
...
@@ -13,10 +13,10 @@ from settings import conf
iwa_url_params
=
{
'scope'
:
'openid'
,
'response_type'
:
'code'
,
'redirect_uri'
:
conf
.
REDIRECT_URI
,
'redirect_uri'
:
conf
.
IWA_
REDIRECT_URI
,
'client_id'
:
conf
.
IWA_CLIENT_ID
}
iwa_url_params_str
=
'&'
.
join
([
'{0}={1}'
.
format
(
k
,
v
)
for
k
,
v
in
iwa_url_params
])
iwa_url_params_str
=
'&'
.
join
([
'{0}={1}'
.
format
(
k
,
v
)
for
k
,
v
in
iwa_url_params
.
items
()
])
iwa_url
=
'{0}authorize?{1}'
.
format
(
conf
.
IWA_URL
,
iwa_url_params_str
)
client_id_base64
=
base64
.
b64encode
(
'{0}:{1}'
.
format
(
conf
.
IWA_CLIENT_ID
,
conf
.
IWA_CLIENT_SECRET
)
.
encode
(
'utf-8'
))
.
decode
(
'utf-8'
)
...
...
src/common/mixins.py
View file @
daf5665
...
...
@@ -121,7 +121,7 @@ class IWABaseView:
'code'
:
code
,
'redirect_uri'
:
redirect_uri
,
}
get_params_str
=
'&'
.
join
([
'{0}={1}'
.
format
(
k
,
v
)
for
k
,
v
in
get_params_dict
])
get_params_str
=
'&'
.
join
([
'{0}={1}'
.
format
(
k
,
v
)
for
k
,
v
in
get_params_dict
.
items
()
])
iwa_token_url
=
'{0}access_token?{1}'
.
format
(
iwa_url_base
,
get_params_str
)
res
=
requests
.
post
(
iwa_token_url
,
headers
=
headers
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment