mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-09-13 14:29:09 +00:00
feat: adding password expiry
This commit is contained in:
parent
ffcbf94cf4
commit
5262eff022
4 changed files with 95 additions and 7 deletions
12
api/auth.go
12
api/auth.go
|
@ -102,12 +102,22 @@ func (c *Client) Login(ctx context.Context) error {
|
|||
|
||||
c.userID = user.ID
|
||||
|
||||
settings, err := c.GetServerSettings(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Getting Server Settings: %w", err)
|
||||
}
|
||||
|
||||
// after Login, fetch MetadataTypeSettings to finish the Client Setup
|
||||
c.setMetadataTypeSettings(ctx)
|
||||
err = c.setMetadataTypeSettings(ctx, settings)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Setup Metadata Type Settings: %w", err)
|
||||
}
|
||||
|
||||
err = c.setPasswordExpirySettings(ctx, settings)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Setup Password Expiry Settings: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue