Skip to content

Commit

Permalink
remove duplicated function
Browse files Browse the repository at this point in the history
  • Loading branch information
rzandonai committed Feb 15, 2024
1 parent 04b33e4 commit e68ccfc
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ func (v *Validator) Validate(secret Secret) bool {
"confluent-access-token": v.ConfluentAccessToken,
"confluent-secret-key": v.ConfluentAccessToken,
"databricks-api-token": v.DatabricksAPIToken,
"vault-batch-token": v.VaultBashToken,
"vault-service-token": v.VaultBashToken,
"vault-batch-token": v.HashicorpVaultToken,
"vault-service-token": v.HashicorpVaultToken,
"stripe-access-token": v.StripeAccessToken,
"travisci-access-token": v.TravisCIAccessToken,
"telegram-bot-api-token": v.TelegramBotAPIToken,
Expand Down Expand Up @@ -382,15 +382,6 @@ func (v *Validator) HashicorpVaultPassword(secret Secret) bool {
return false
}

func (v *Validator) VaultBashToken(secret Secret) bool {
urlVault := v.FindVaultLink(secret)
headers := map[string]string{
"X-Vault-Token": fmt.Sprintf("%s", secret.Secret),
}
response := v.Get(fmt.Sprintf("%s/v1/auth/token/lookup-self", urlVault), headers)
return v.IsResponseSuccessful(response)
}

func (v *Validator) HerokuAPIKey(secret Secret) bool {
url := "https://api.heroku.com/account"
headers := v.DefaultBearer(secret.Secret)
Expand Down

0 comments on commit e68ccfc

Please sign in to comment.