-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support deployments using Matrix Authentication Service #577
base: main
Are you sure you want to change the base?
Conversation
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.
Overall looks good to me - thanks! A few code style things to look at.
If you get a chance to add tests for the lock commands in particular, that would be good too.
} | ||
} | ||
|
||
public async deactivateMasUser(userId: string): Promise<void> { |
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.
slight inconsistency in naming: is it MAS
or Mas
in functions? (either is fine - we should match existing styles if there's examples).
await axios({ | ||
method: "post", | ||
url: url, | ||
headers: { | ||
"User-Agent": "Mjolnir", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Authorization": `Bearer ${accessToken.token.access_token}`, | ||
}, | ||
}); |
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.
moving the axios calls to a doRequest
function would be best, so if we need to update something it's a single code site. The getAccessToken()
call can be in that function too.
/deactivate
,/admin
,/lock
,/unlock
) if MAS is in useAlso adds support for locking users in both MAS and non-MAS deployments.