3e1e0b604f
This adds the oauth2 provider `oidc`. It needs an additional argument, the OIDC discovery endpoint to figure out where the auth and token URLs are. Configuration is similar to setting up the Google Authentication with these changes: * `OAUTH2_PROVIDER = oidc` * `OAUTH2_OIDC_DISCOVERY_ENDPOINT = https://auth.exampe.org/discovery`
21 lines
524 B
Go
21 lines
524 B
Go
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
|
// Use of this source code is governed by the Apache 2.0
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package ui // import "miniflux.app/ui"
|
|
|
|
import (
|
|
"context"
|
|
"miniflux.app/config"
|
|
"miniflux.app/oauth2"
|
|
)
|
|
|
|
func getOAuth2Manager(ctx context.Context) *oauth2.Manager {
|
|
return oauth2.NewManager(
|
|
ctx,
|
|
config.Opts.OAuth2ClientID(),
|
|
config.Opts.OAuth2ClientSecret(),
|
|
config.Opts.OAuth2RedirectURL(),
|
|
config.Opts.OAuth2OidcDiscoveryEndpoint(),
|
|
)
|
|
}
|