aboutsummaryrefslogtreecommitdiff
path: root/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'account.go')
-rw-r--r--account.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/account.go b/account.go
index 48849c4..393d27f 100644
--- a/account.go
+++ b/account.go
@@ -6,7 +6,6 @@ import (
"crypto/rand"
"crypto/rsa"
"encoding/base64"
- "encoding/json"
"io"
"strings"
@@ -53,16 +52,12 @@ func newAccount(key crypto.PrivateKey) (*Account, error) {
// Signer describes a signing interface
type Signer interface {
- Sign(interface{}, jose.NonceSource) (io.Reader, error)
+ Sign([]byte, jose.NonceSource) (io.Reader, error)
KeyAuth(string) (string, error)
}
// Sign implements Signer interface
-func (a *Account) Sign(v interface{}, n jose.NonceSource) (io.Reader, error) {
- msg, err := json.Marshal(v)
- if err != nil {
- return nil, err
- }
+func (a *Account) Sign(msg []byte, n jose.NonceSource) (io.Reader, error) {
a.signer.SetNonceSource(n)
obj, err := a.signer.Sign(msg)
if err != nil {