mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-22 13:37:19 +02:00
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com> Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>
This commit is contained in:
parent
e86989e248
commit
4e1c99c897
4 changed files with 47 additions and 23 deletions
|
@ -105,10 +105,13 @@ func New(opts *config.Options) (*Authorize, error) {
|
|||
|
||||
func validateOptions(o *config.Options) error {
|
||||
if _, err := cryptutil.NewAEADCipherFromBase64(o.SharedKey); err != nil {
|
||||
return fmt.Errorf("bad shared_secret: %w", err)
|
||||
return fmt.Errorf("authorize: bad 'SHARED_SECRET': %w", err)
|
||||
}
|
||||
if err := urlutil.ValidateURL(o.AuthenticateURL); err != nil {
|
||||
return fmt.Errorf("invalid 'AUTHENTICATE_SERVICE_URL': %w", err)
|
||||
return fmt.Errorf("authorize: invalid 'AUTHENTICATE_SERVICE_URL': %w", err)
|
||||
}
|
||||
if err := urlutil.ValidateURL(o.DataBrokerURL); err != nil {
|
||||
return fmt.Errorf("authorize: invalid 'DATABROKER_SERVICE_URL': %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue