photoprism/internal/config/oidc.go

23 lines
410 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 {
panic("oidc: malformed issuer url")
}
return res
}
func (c *Config) OidcClientId() string {
return c.Options().OidcClientID
}
func (c *Config) OidcClientSecret() string {
return c.Options().OidcClientSecret
}