mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-05 21:23:10 -06:00
Fix a lint warning.
This commit is contained in:
parent
ffa527340a
commit
b8844fb1e2
|
|
@ -35,7 +35,7 @@ type oidcIdentityProvider struct {
|
|||
mu sync.Mutex
|
||||
}
|
||||
|
||||
func newOIDCIdentityProvider(cfg *config.IdentityProvider, hc *http.Client) (*oidcIdentityProvider, error) {
|
||||
func newOIDCIdentityProvider(cfg *config.IdentityProvider, hc *http.Client) *oidcIdentityProvider {
|
||||
return &oidcIdentityProvider{
|
||||
oauth2IdentityProvider: &oauth2IdentityProvider{
|
||||
cfg: cfg,
|
||||
|
|
@ -48,7 +48,7 @@ func newOIDCIdentityProvider(cfg *config.IdentityProvider, hc *http.Client) (*oi
|
|||
displayNamePath: "name",
|
||||
suggestedUserIDPath: "preferred_username",
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (p *oidcIdentityProvider) AuthorizationURL(ctx context.Context, callbackURL, nonce string) (string, error) {
|
||||
|
|
|
|||
|
|
@ -46,11 +46,7 @@ func NewAuthenticator(ctx context.Context, cfg *config.SSO) (*Authenticator, err
|
|||
|
||||
switch pcfg.Type {
|
||||
case config.SSOTypeOIDC:
|
||||
p, err := newOIDCIdentityProvider(&pcfg, hc)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create OpenID Connect provider %q: %w", pcfg.ID, err)
|
||||
}
|
||||
a.providers[pcfg.ID] = p
|
||||
a.providers[pcfg.ID] = newOIDCIdentityProvider(&pcfg, hc)
|
||||
case config.SSOTypeGitHub:
|
||||
a.providers[pcfg.ID] = newGitHubIdentityProvider(&pcfg, hc)
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue