This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 672
Implement registering with an email support #1837
Closed
PiotrKozimor
wants to merge
13
commits into
matrix-org:master
from
globekeeper:piotrkozimor/registering-with-an-email-support
+232
−38
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e8161a9
Handle m.login.email.identity auth type in /register endpoint
PiotrKozimor 02efc3e
Configure login and registration flows by client_api section not Derived
PiotrKozimor f645646
WIP: Handle /register/email/requestToken
PiotrKozimor be656cf
Pass request to identity server with context from passed request
PiotrKozimor 1c5fea6
Remove unnecessary config parameter in validateEmailIdentity
PiotrKozimor 15e6056
Fix completed session stage for LoginTypeEmailIdentity
PiotrKozimor 7d9304e
Switch to deprecated Identity API v1 - no authentication required
PiotrKozimor 01ce9ab
Delete duplicated /register/email/requestToken endpoint
PiotrKozimor d975de3
Pass custom certificates via config file to be added to system pool, …
PiotrKozimor c852dc4
Fix tag for Flow struct field
PiotrKozimor c585403
Remove unsused structs
PiotrKozimor 7ebb9c6
Make changes backward compatible - when user provides no flows, defau…
PiotrKozimor ffadf73
Check for errors when closing response bodies
PiotrKozimor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright Piotr Kozimor <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package authtypes | ||
|
||
type InteractiveAuth struct { | ||
// Flows is a slice of flows, which represent one possible way that the client can authenticate a request. | ||
// http://matrix.org/docs/spec/HEAD/client_server/r0.3.0.html#user-interactive-authentication-api | ||
// As long as the generated flows only rely on config file options, | ||
// we can generate them on startup and store them until needed | ||
Flows []Flow `json:"flows"` | ||
|
||
// Params that need to be returned to the client during | ||
// registration in order to complete registration stages. | ||
Params map[string]interface{} `json:"params"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dendrite isn't my project, but:
this endpoint is deprecated by MSC2713 and it's likely that sydent will soon drop support for it.
In general, homeservers should not be delegating responsibility for email address validation to identity servers, since it allows a compromised ID server to be used to take over homeserver accounts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for comment. I think I have misunderstood concept of ID server. It makes sense that homeserver sends email on its own. So ID server would be user after registration to publish association, so that other may find user by email, right? I suppose also that auth stage for login should be also done without ID server. I am right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's right.