mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Fix m'mistakes
This commit is contained in:
@@ -172,12 +172,12 @@ func (t *TokenParams) ParseTokenFields(req *logical.Request, d *framework.FieldD
|
||||
t.TokenType = tokenType
|
||||
}
|
||||
|
||||
if t.TokenType == "batch" {
|
||||
if t.Period != 0 {
|
||||
return errors.New("'token_type' cannot be 'batch' when set to generate periodic tokens")
|
||||
if t.TokenType == logical.TokenTypeBatch || t.TokenType == logical.TokenTypeDefaultBatch {
|
||||
if t.TokenPeriod != 0 {
|
||||
return errors.New("'token_type' cannot be 'batch' or 'default_batch' when set to generate periodic tokens")
|
||||
}
|
||||
if t.TokenNumUses != 0 {
|
||||
return errors.New("'token_type' cannot be 'batch' when set to generate tokens with limited use count")
|
||||
return errors.New("'token_type' cannot be 'batch' or 'default_batch' when set to generate tokens with limited use count")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user