mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-22 21:47:16 +02:00
options: s/shared-key/shared secret (#2257)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
41804ef0ba
commit
c5f90e40f3
1 changed files with 3 additions and 3 deletions
|
@ -535,7 +535,7 @@ func (o *Options) Validate() error {
|
|||
|
||||
_, err := o.GetSharedKey()
|
||||
if err != nil {
|
||||
return fmt.Errorf("config: invalid shared-key: %w", err)
|
||||
return fmt.Errorf("config: invalid shared secret: %w", err)
|
||||
}
|
||||
|
||||
if o.AuthenticateURLString != "" {
|
||||
|
@ -929,10 +929,10 @@ func (o *Options) GetSharedKey() ([]byte, error) {
|
|||
sharedKey = randomSharedKey
|
||||
}
|
||||
if sharedKey == "" {
|
||||
return nil, errors.New("empty shared-key")
|
||||
return nil, errors.New("empty shared secret")
|
||||
}
|
||||
if strings.TrimSpace(sharedKey) != sharedKey {
|
||||
return nil, errors.New("shared-key contains whitespace")
|
||||
return nil, errors.New("shared secret contains whitespace")
|
||||
}
|
||||
return base64.StdEncoding.DecodeString(sharedKey)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue