mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-09-13 14:29:09 +00:00
allow empty Client for Registration
This commit is contained in:
parent
279d245d86
commit
3f4ed25a83
3 changed files with 39 additions and 16 deletions
|
@ -57,6 +57,10 @@ func (c *Client) CheckSession(ctx context.Context) bool {
|
|||
// Login gets a Session and CSRF Token from Passbolt and Stores them in the Clients Cookie Jar
|
||||
func (c *Client) Login(ctx context.Context) error {
|
||||
|
||||
if c.userPrivateKey == "" {
|
||||
return fmt.Errorf("Client has no Private Key")
|
||||
}
|
||||
|
||||
privateKeyObj, err := crypto.NewKeyFromArmored(c.userPrivateKey)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Parsing User Private Key: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue