mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-07 06:03:09 -06:00
Fix a lint error.
This commit is contained in:
parent
f814f9bdf1
commit
ffa527340a
|
|
@ -35,7 +35,7 @@ type oidcIdentityProvider struct {
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func newOIDCIdentityProvider(ctx context.Context, cfg *config.IdentityProvider, hc *http.Client) (*oidcIdentityProvider, error) {
|
func newOIDCIdentityProvider(cfg *config.IdentityProvider, hc *http.Client) (*oidcIdentityProvider, error) {
|
||||||
return &oidcIdentityProvider{
|
return &oidcIdentityProvider{
|
||||||
oauth2IdentityProvider: &oauth2IdentityProvider{
|
oauth2IdentityProvider: &oauth2IdentityProvider{
|
||||||
cfg: cfg,
|
cfg: cfg,
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ func NewAuthenticator(ctx context.Context, cfg *config.SSO) (*Authenticator, err
|
||||||
|
|
||||||
switch pcfg.Type {
|
switch pcfg.Type {
|
||||||
case config.SSOTypeOIDC:
|
case config.SSOTypeOIDC:
|
||||||
p, err := newOIDCIdentityProvider(ctx, &pcfg, hc)
|
p, err := newOIDCIdentityProvider(&pcfg, hc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to create OpenID Connect provider %q: %w", pcfg.ID, err)
|
return nil, fmt.Errorf("failed to create OpenID Connect provider %q: %w", pcfg.ID, err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ func SSOCallback(
|
||||||
util.GetLogger(ctx).WithField("localpart", result.SuggestedUserID).WithField("ssoIdentifier", result.Identifier).Info("SSO registering account")
|
util.GetLogger(ctx).WithField("localpart", result.SuggestedUserID).WithField("ssoIdentifier", result.Identifier).Info("SSO registering account")
|
||||||
localpart = result.SuggestedUserID
|
localpart = result.SuggestedUserID
|
||||||
if localpart == "" {
|
if localpart == "" {
|
||||||
util.GetLogger(ctx).WithError(err).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")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue