Now we can get and store the tokens, then load it when start next time.

This commit is contained in:
Tnze
2019-08-29 23:00:01 +08:00
parent 323dc15eec
commit 6a8818910c
3 changed files with 18 additions and 10 deletions

View File

@ -3,7 +3,7 @@ package yggdrasil
import "fmt"
type refreshPayload struct {
tokens
Tokens
SelectedProfile *Profile `json:"selectedProfile,omitempty"`
RequestUser bool `json:"requestUser"`
@ -16,7 +16,7 @@ type refreshPayload struct {
// the user's password in a file
func (a *Access) Refresh(profile *Profile) error {
pl := refreshPayload{
tokens: a.ar.tokens,
Tokens: a.ar.Tokens,
SelectedProfile: profile, //used to change profile, don't use now
RequestUser: true,
}