Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
caosdb-pylib
Commits
b5647f21
Verified
Commit
b5647f21
authored
1 year ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
REVERT some uninteded changes in auth_token.py
parent
0926a206
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!110
ENH: new `page_length` parameter for execute_query
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosdb/connection/authentication/auth_token.py
+0
-9
0 additions, 9 deletions
src/caosdb/connection/authentication/auth_token.py
with
0 additions
and
9 deletions
src/caosdb/connection/authentication/auth_token.py
+
0
−
9
View file @
b5647f21
...
...
@@ -62,20 +62,12 @@ class AuthTokenAuthenticator(AbstractAuthenticator):
def
__init__
(
self
):
super
(
AuthTokenAuthenticator
,
self
).
__init__
()
self
.
auth_token
=
None
self
.
_initial_one_time_token
=
None
self
.
_connection
=
None
def
login
(
self
):
self
.
_login
()
def
_login
(
self
):
if
self
.
_initial_one_time_token
is
not
None
:
# retry first (this could work if maxReplay > 1)
self
.
auth_token
=
self
.
_initial_one_time_token
headers
=
{
'
Cookie
'
:
auth_token_to_cookie
(
self
.
auth_token
)}
self
.
_connection
.
request
(
method
=
"
DELETE
"
,
path
=
"
logout
"
,
headers
=
headers
)
raise
LoginFailedError
(
"
The authentication token is expired or you
"
"
have been logged out otherwise. The
"
"
auth_token authenticator cannot log in
"
...
...
@@ -95,7 +87,6 @@ class AuthTokenAuthenticator(AbstractAuthenticator):
def
configure
(
self
,
**
config
):
if
"
auth_token
"
in
config
:
self
.
_initial_one_time_token
=
config
.[
"
auth_token
"
]
self
.
auth_token
=
config
[
"
auth_token
"
]
if
"
connection
"
in
config
:
self
.
_connection
=
config
[
"
connection
"
]
...
...
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