config: use config.Config instead of config.Options everywhere

This commit is contained in:
Caleb Doxsey 2022-08-26 15:39:50 -06:00
parent 5f51510e91
commit 1b80e8a6c2
40 changed files with 484 additions and 412 deletions

View file

@ -7,8 +7,8 @@ import (
"github.com/pomerium/pomerium/internal/urlutil"
)
func defaultGetIdentityProvider(options *config.Options, idpID string) (identity.Authenticator, error) {
authenticateURL, err := options.GetAuthenticateURL()
func defaultGetIdentityProvider(cfg *config.Config, idpID string) (identity.Authenticator, error) {
authenticateURL, err := cfg.Options.GetAuthenticateURL()
if err != nil {
return nil, err
}
@ -17,9 +17,9 @@ func defaultGetIdentityProvider(options *config.Options, idpID string) (identity
if err != nil {
return nil, err
}
redirectURL.Path = options.AuthenticateCallbackPath
redirectURL.Path = cfg.Options.AuthenticateCallbackPath
idp, err := options.GetIdentityProviderForID(idpID)
idp, err := cfg.Options.GetIdentityProviderForID(idpID)
if err != nil {
return nil, err
}