2018-04-30 01:35:04 +02:00
|
|
|
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
2017-11-23 07:22:33 +01:00
|
|
|
// Use of this source code is governed by the Apache 2.0
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2018-10-08 03:42:43 +02:00
|
|
|
package ui // import "miniflux.app/ui"
|
2017-11-23 07:22:33 +01:00
|
|
|
|
|
|
|
import (
|
2020-03-08 03:45:19 +01:00
|
|
|
"context"
|
2018-08-25 06:51:50 +02:00
|
|
|
"miniflux.app/config"
|
|
|
|
"miniflux.app/oauth2"
|
2017-11-23 07:22:33 +01:00
|
|
|
)
|
|
|
|
|
2020-03-08 03:45:19 +01:00
|
|
|
func getOAuth2Manager(ctx context.Context) *oauth2.Manager {
|
2017-11-23 07:22:33 +01:00
|
|
|
return oauth2.NewManager(
|
2020-03-08 03:45:19 +01:00
|
|
|
ctx,
|
2019-06-02 03:18:09 +02:00
|
|
|
config.Opts.OAuth2ClientID(),
|
|
|
|
config.Opts.OAuth2ClientSecret(),
|
|
|
|
config.Opts.OAuth2RedirectURL(),
|
2020-03-08 03:45:19 +01:00
|
|
|
config.Opts.OAuth2OidcDiscoveryEndpoint(),
|
2017-11-23 07:22:33 +01:00
|
|
|
)
|
|
|
|
}
|