// Save a private key inside a key ID collection under the given collection. func (s *fdbStore) saveKeyUnderID(c *fdb.Collection, privateKey crypto.PrivateKey) (keyID string, err error) { keyID, err = determineKeyIDFromKey(privateKey) if err != nil { return } err = s.saveKey(c.Collection(keyID), privateKey) return }
func (s *fdbStore) validateAuthorizations(account *Account, c *fdb.Collection) error { ac := c.Collection("authorizations") auths, err := ac.List() if err != nil { return err } for _, auth := range auths { auc := ac.Collection(auth) err := s.validateAuthorization(account, auth, auc) log.Errore(err, "failed to load authorization, ignoring: ", auth) } return nil }
func (s *fdbStore) validateAuthorizations(account *Account, c *fdb.Collection) error { ac := c.Collection("authorizations") auths, err := ac.List() if err != nil { return err } for _, auth := range auths { auc := ac.Collection(auth) err := s.validateAuthorization(account, auth, auc) if err != nil { return err } } return nil }