aboutsummaryrefslogtreecommitdiff
path: root/account.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-01-04 23:51:46 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-01-04 23:51:46 +0100
commitd534bb3fd336c8f69a7348a36084b487904b5b6a (patch)
treeb052af6d884a2ba98be9a31fbcfafe956ca39201 /account.go
parent74e5ab64d63946c4ac1ce7317af08bc0a378ca93 (diff)
Separate contacts
Diffstat (limited to 'account.go')
-rw-r--r--account.go24
1 files changed, 3 insertions, 21 deletions
diff --git a/account.go b/account.go
index 3fa1ae7..62f1c78 100644
--- a/account.go
+++ b/account.go
@@ -5,7 +5,6 @@ import (
"crypto/rsa"
"encoding/base64"
"io"
- "net/mail"
"strings"
"github.com/square/go-jose"
@@ -16,10 +15,9 @@ const KeySize = 2048
// Account ...
type Account struct {
- contact Contacts
- key *rsa.PrivateKey
- signer jose.Signer
- nonce chan string
+ key *rsa.PrivateKey
+ signer jose.Signer
+ nonce chan string
}
// NewAccount ...
@@ -31,22 +29,6 @@ func NewAccount(key *rsa.PrivateKey) (*Account, error) {
return &Account{key: key, signer: signer}, nil
}
-func (a *Account) AddMail(email string) error {
- m, err := mail.ParseAddress(email)
- if err != nil {
- return err
- }
- a.contact = append(a.contact, Mail(m.Address))
- return nil
-}
-
-func (a *Account) AddPhone(phone string) error {
- if ph := strings.TrimSpace(phone); ph != "" {
- a.contact = append(a.contact, Phone(ph))
- }
- return nil
-}
-
// Signer describes a signing interface
type Signer interface {
Sign([]byte, jose.NonceSource) (io.Reader, error)