mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-07 06:03:09 -06:00
Fix two lint errors.
This commit is contained in:
parent
4da104c5c3
commit
dba1965c8b
|
|
@ -224,7 +224,7 @@ func SSOCallback(
|
||||||
if localpart == "" {
|
if localpart == "" {
|
||||||
util.GetLogger(ctx).WithField("ssoIdentifier", result.Identifier).Info("no suggested user ID from SSO provider")
|
util.GetLogger(ctx).WithField("ssoIdentifier", result.Identifier).Info("no suggested user ID from SSO provider")
|
||||||
var res uapi.QueryNumericLocalpartResponse
|
var res uapi.QueryNumericLocalpartResponse
|
||||||
if err := userAPI.QueryNumericLocalpart(ctx, &res); err != nil {
|
if err = userAPI.QueryNumericLocalpart(ctx, &res); err != nil {
|
||||||
util.GetLogger(ctx).WithError(err).WithField("ssoIdentifier", result.Identifier).Error("failed to generate numeric localpart")
|
util.GetLogger(ctx).WithError(err).WithField("ssoIdentifier", result.Identifier).Error("failed to generate numeric localpart")
|
||||||
return jsonerror.InternalServerError()
|
return jsonerror.InternalServerError()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -466,6 +466,7 @@ func Test_SSO(t *testing.T) {
|
||||||
t.Log("Retrieve localpart for association")
|
t.Log("Retrieve localpart for association")
|
||||||
|
|
||||||
gotLocalpart, err := db.GetLocalpartForSSO(ctx, ns, issuer, subject)
|
gotLocalpart, err := db.GetLocalpartForSSO(ctx, ns, issuer, subject)
|
||||||
|
assert.NoError(t, err, "unable to get localpart for SSO subject")
|
||||||
assert.Equal(t, aliceLocalpart, gotLocalpart)
|
assert.Equal(t, aliceLocalpart, gotLocalpart)
|
||||||
|
|
||||||
t.Log("Remove SSO association")
|
t.Log("Remove SSO association")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue