Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Add AS support to common.MakeAuthAPI#427

Merged
APwhitehat merged 9 commits intomatrix-org:masterfrom
APwhitehat:add_ASsupport_AuthAPI
Jul 16, 2018
Merged

Add AS support to common.MakeAuthAPI#427
APwhitehat merged 9 commits intomatrix-org:masterfrom
APwhitehat:add_ASsupport_AuthAPI

Conversation

@APwhitehat
Copy link
Copy Markdown
Contributor

@APwhitehat APwhitehat commented Mar 15, 2018

  • Integrate Add app service authentication functions #433 into common.MakeAuthAPI
  • Update clientapi.routing to utilize the AS support.
  • Make other Components work ok with the new common.MakeAuthAPI, Add "TODO" to help their migration.

@erikjohnston
Copy link
Copy Markdown
Member

Couple of comments:

  1. We probably want to refactor MakeAuthAPI, its got too many parameters as it is and its confusing
  2. I wonder if we should make an authtypes.Device for AS users?

@APwhitehat
Copy link
Copy Markdown
Contributor Author

  1. I agree.
  2. I thought AS users do not have a device. Did you mean a dummy device with AS service's AccessToken & userID ?

@APwhitehat
Copy link
Copy Markdown
Contributor Author

Once matrix-org/gomatrixserverlib#92 gets merged, we can remove the "AS_Device" with a const.

@APwhitehat APwhitehat requested a review from erikjohnston June 4, 2018 15:41
@erikjohnston erikjohnston self-assigned this Jun 4, 2018
Make clientapi utilize the same

Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
device if present

Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
@APwhitehat APwhitehat force-pushed the add_ASsupport_AuthAPI branch from 8d252a5 to 2a2a439 Compare June 7, 2018 14:12
@anoadragon453
Copy link
Copy Markdown
Member

API endpoints such as this one:

profile, err := accountDB.GetProfileByLocalpart(req.Context(), localpart)

still check for information from the accountDB, which fails due to an account not actually existing.

What do you think of the solution of just creating a sender_localpart account on startup for each appservice if it doesn't already exist?

@anoadragon453
Copy link
Copy Markdown
Member

So #505 solves the generate AS sender_localpart user problem. It may or may not replace any commits on this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants