forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
account.go
32 lines (27 loc) · 872 Bytes
/
account.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
package service
import (
"github.com/keybase/client/go/engine"
"github.com/keybase/client/go/libkb"
keybase1 "github.com/keybase/client/go/protocol"
rpc "github.com/keybase/go-framed-msgpack-rpc"
"golang.org/x/net/context"
)
type AccountHandler struct {
*BaseHandler
libkb.Contextified
}
func NewAccountHandler(xp rpc.Transporter, g *libkb.GlobalContext) *AccountHandler {
return &AccountHandler{
BaseHandler: NewBaseHandler(xp),
Contextified: libkb.NewContextified(g),
}
}
func (h *AccountHandler) PassphraseChange(_ context.Context, arg keybase1.PassphraseChangeArg) error {
eng := engine.NewPassphraseChange(&arg, h.G())
ctx := &engine.Context{
SecretUI: h.getSecretUI(arg.SessionID),
}
return engine.RunEngine(eng, ctx)
}