photoprism/internal/config/oidc.go

24 lines
440 B
Go
Raw Normal View History

2021-09-08 12:17:44 +02:00
package config
import "net/url"
func (c *Config) OidcIssuerUrl() *url.URL {
if c.Options().OidcIssuer == "" {
return nil
}
res, err := url.Parse(c.Options().OidcIssuer)
if err != nil {
2021-09-08 14:41:28 +02:00
log.Debugf("error parsing oidc issuer url: %q", err)
return nil
2021-09-08 12:17:44 +02:00
}
return res
}
func (c *Config) OidcClientId() string {
return c.Options().OidcClientID
}
func (c *Config) OidcClientSecret() string {
return c.Options().OidcClientSecret
}