Drop unused OktaProvider const, wrap parse error

OktaProvider was dead: the provider-string const is only matched by
OAuth providers (SlackProvider in oauth2.go / connector.go), and an
API-key connector never matches on it.

Wrap the url.Parse error in nextPageURL with %w, like every sibling
driver, instead of dropping it.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-06-04 19:00:58 +02:00
parent d3e8845fac
commit 13bc57b591
2 changed files with 1 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ func (d *OktaDriver) nextPageURL(linkHeader string) (string, error) {
u, err := url.Parse(raw)
if err != nil {
return "", fmt.Errorf("cannot parse okta next-page link")
return "", fmt.Errorf("cannot parse okta next-page link: %w", err)
}
// Pin the next page to the same https origin: reject a scheme downgrade

View File

@@ -22,8 +22,6 @@ import (
"strings"
)
const OktaProvider = "OKTA"
// oktaDomainRe matches a dotted DNS hostname (at least two labels; each
// label 1-63 chars of [a-z0-9-], not starting or ending with a hyphen).
// Okta supports both *.okta.com / *.oktapreview.com orgs and fully custom