mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-01 02:57:59 +00:00 
			
		
		
		
	 c15974cbdd
			
		
	
	c15974cbdd
	
	
	
		
			
			Functionality is split into ExternalTokenHelper, which is used if a path is given in a configuration file, and InternalTokenHelper which is used otherwise. The internal helper no longer shells out to the same Vault binary, instead performing the same actions with internal code. This avoids problems using dev mode when there are spaces in paths or when the binary is built in a container without a shell. Fixes #850 among others
		
			
				
	
	
		
			15 lines
		
	
	
		
			427 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			427 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package token
 | |
| 
 | |
| // TokenHelper is an interface that contains basic operations that must be
 | |
| // implemented by a token helper
 | |
| type TokenHelper interface {
 | |
| 	// Path displays a backend-specific path; for the internal helper this
 | |
| 	// is the location of the token stored on disk; for the external helper
 | |
| 	// this is the location of the binary being invoked
 | |
| 	Path() string
 | |
| 
 | |
| 	Erase() error
 | |
| 	Get() (string, error)
 | |
| 	Store(string) error
 | |
| }
 |