Skip to content

Commit

Permalink
Merge pull request #795 from wasuradananjith/3.2.x
Browse files Browse the repository at this point in the history
[3.2.x] Mandating tokenUrl when configuring OAuth 2.0 security via the params file
  • Loading branch information
wasuradananjith authored Oct 12, 2021
2 parents ff4dbcc + 1b0e47a commit d1a96c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions import-export-cli/impl/importAPI.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,10 @@ func preprocessOAuthSecurityConfigs(envSecurityPerEndpoint *params.OAuthEndpoint
return errors.New("You have enabled OAuth 2.0 endpoint security" +
" but the Client Secret is not found in the api_params.yaml")
}
if envSecurityPerEndpoint.TokenUrl == "" {
return errors.New("You have enabled OAuth 2.0 endpoint security" +
" but Token URL is not found in the api_params.yaml")
}

if strings.EqualFold(strings.ToLower(envSecurityPerEndpoint.GrantType),
strings.ToLower(utils.ClientCredentialsGrantType)) {
Expand Down

0 comments on commit d1a96c7

Please sign in to comment.