Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
93f018e7
Commit
93f018e7
authored
Jun 14, 2023
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_oauth2_authorisation: Factorise MultiFernet instanciation
parent
c5410570
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
bt5/erp5_oauth2_authorisation/DocumentTemplateItem/portal_components/document.erp5.OAuth2AuthorisationServerConnector.py
...nents/document.erp5.OAuth2AuthorisationServerConnector.py
+4
-4
No files found.
bt5/erp5_oauth2_authorisation/DocumentTemplateItem/portal_components/document.erp5.OAuth2AuthorisationServerConnector.py
View file @
93f018e7
...
...
@@ -1022,10 +1022,10 @@ class OAuth2AuthorisationServerConnector(XMLObject):
Only Zope-based request authentication is supported
(ex: "Authorization: Basic ..." request header).
"""
multi_fernet
=
self
.
__getLoginRetryURLMultiFernet
()
# Retrieve posted field, validate signature and extract the url.
try
:
login_retry_url
=
self
.
__getLoginRetryURLMultiFernet
().
decrypt
(
REQUEST
.
form
[
'login_retry_url'
],
)
login_retry_url
=
multi_fernet
.
decrypt
(
REQUEST
.
form
[
'login_retry_url'
])
except
(
fernet
.
InvalidToken
,
TypeError
,
KeyError
):
# No login_retry_url provided or its value is unusable: if this is a GET
# request (trying to display a login form), use the current URL.
...
...
@@ -1039,7 +1039,7 @@ class OAuth2AuthorisationServerConnector(XMLObject):
def
getSignedLoginRetryUrl
():
if
login_retry_url
is
None
:
return
None
return
self
.
__getLoginRetryURLMultiFernet
()
.
encrypt
(
login_retry_url
)
return
multi_fernet
.
encrypt
(
login_retry_url
)
return
_ERP5AuthorisationEndpoint
(
server_connector_path
=
self
.
getPath
(),
zope_request
=
REQUEST
,
...
...
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