mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Move CLI token helper to api module (#25744)
* Move command/config + command/token to api/cliconfig + api/tokenhelper * Remove unused functions and unused import * Simplify and inline function copied from SDK * Delete unused duplicated/forwarding config implementation from command package * Delete unused code, unexport API surface that's only used internally to the package * Fix up license headers * Add changelog * Tweak .gitignore to track hcl files in testdata/ folders
This commit is contained in:
@@ -15,14 +15,14 @@ import (
|
||||
"github.com/hashicorp/cli"
|
||||
"github.com/hashicorp/go-cleanhttp"
|
||||
"github.com/hashicorp/vault/api"
|
||||
"github.com/hashicorp/vault/command/config"
|
||||
"github.com/hashicorp/vault/command/token"
|
||||
"github.com/hashicorp/vault/api/cliconfig"
|
||||
"github.com/hashicorp/vault/api/tokenhelper"
|
||||
)
|
||||
|
||||
// DefaultTokenHelper returns the token helper that is configured for Vault.
|
||||
// This helper should only be used for non-server CLI commands.
|
||||
func DefaultTokenHelper() (token.TokenHelper, error) {
|
||||
return config.DefaultTokenHelper()
|
||||
func DefaultTokenHelper() (tokenhelper.TokenHelper, error) {
|
||||
return cliconfig.DefaultTokenHelper()
|
||||
}
|
||||
|
||||
// RawField extracts the raw field from the given data and returns it as a
|
||||
|
||||
Reference in New Issue
Block a user