Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Timo Ley
synapse
Commits
f8b9ead3
Unverified
Commit
f8b9ead3
authored
4 years ago
by
Patrick Cloke
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Advertise the token login type when OpenID Connect is enabled. (#7631)
parent
11de8436
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/7631.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/7631.bugfix
synapse/rest/client/v1/login.py
+3
-8
3 additions, 8 deletions
synapse/rest/client/v1/login.py
with
4 additions
and
8 deletions
changelog.d/7631.bugfix
0 → 100644
+
1
−
0
View file @
f8b9ead3
Advertise the `m.login.token` login flow when OpenID Connect is enabled.
This diff is collapsed.
Click to expand it.
synapse/rest/client/v1/login.py
+
3
−
8
View file @
f8b9ead3
...
@@ -99,25 +99,20 @@ class LoginRestServlet(RestServlet):
...
@@ -99,25 +99,20 @@ class LoginRestServlet(RestServlet):
flows
.
append
({
"
type
"
:
LoginRestServlet
.
JWT_TYPE
})
flows
.
append
({
"
type
"
:
LoginRestServlet
.
JWT_TYPE
})
if
self
.
cas_enabled
:
if
self
.
cas_enabled
:
flows
.
append
({
"
type
"
:
LoginRestServlet
.
SSO_TYPE
})
# we advertise CAS for backwards compat, though MSC1721 renamed it
# we advertise CAS for backwards compat, though MSC1721 renamed it
# to SSO.
# to SSO.
flows
.
append
({
"
type
"
:
LoginRestServlet
.
CAS_TYPE
})
flows
.
append
({
"
type
"
:
LoginRestServlet
.
CAS_TYPE
})
if
self
.
cas_enabled
or
self
.
saml2_enabled
or
self
.
oidc_enabled
:
flows
.
append
({
"
type
"
:
LoginRestServlet
.
SSO_TYPE
})
# While its valid for us to advertise this login type generally,
# While its valid for us to advertise this login type generally,
# synapse currently only gives out these tokens as part of the
# synapse currently only gives out these tokens as part of the
#
CAS
login flow.
#
SSO
login flow.
# Generally we don't want to advertise login flows that clients
# Generally we don't want to advertise login flows that clients
# don't know how to implement, since they (currently) will always
# don't know how to implement, since they (currently) will always
# fall back to the fallback API if they don't understand one of the
# fall back to the fallback API if they don't understand one of the
# login flow types returned.
# login flow types returned.
flows
.
append
({
"
type
"
:
LoginRestServlet
.
TOKEN_TYPE
})
flows
.
append
({
"
type
"
:
LoginRestServlet
.
TOKEN_TYPE
})
elif
self
.
saml2_enabled
:
flows
.
append
({
"
type
"
:
LoginRestServlet
.
SSO_TYPE
})
flows
.
append
({
"
type
"
:
LoginRestServlet
.
TOKEN_TYPE
})
elif
self
.
oidc_enabled
:
flows
.
append
({
"
type
"
:
LoginRestServlet
.
SSO_TYPE
})
flows
.
extend
(
flows
.
extend
(
({
"
type
"
:
t
}
for
t
in
self
.
auth_handler
.
get_supported_login_types
())
({
"
type
"
:
t
}
for
t
in
self
.
auth_handler
.
get_supported_login_types
())
...
...
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