mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
Update deps, and adjust usage of go-uuid to match new return values
This commit is contained in:
@@ -56,11 +56,18 @@ func (b *backend) pathRoleCreateRead(
|
||||
if len(displayName) > 26 {
|
||||
displayName = displayName[:26]
|
||||
}
|
||||
username := fmt.Sprintf("%s-%s", displayName, uuid.GenerateUUID())
|
||||
userUUID, err := uuid.GenerateUUID()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
username := fmt.Sprintf("%s-%s", displayName, userUUID)
|
||||
if len(username) > 63 {
|
||||
username = username[:63]
|
||||
}
|
||||
password := uuid.GenerateUUID()
|
||||
password, err := uuid.GenerateUUID()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
expiration := time.Now().UTC().
|
||||
Add(lease.Lease + time.Duration((float64(lease.Lease) * 0.1))).
|
||||
Format("2006-01-02 15:04:05-0700")
|
||||
|
||||
Reference in New Issue
Block a user