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

@ -7,7 +7,7 @@ import (
// Validate checks if an accessToken is usable for authentication with a Minecraft server.
func (a *Access) Validate() (bool, error) {
pl := a.ar.tokens
pl := a.ar.Tokens
resp, err := rawPost("/validate", pl)
if err != nil {
@ -19,7 +19,7 @@ func (a *Access) Validate() (bool, error) {
// Invalidate invalidates accessTokens using a client/access token pair.
func (a *Access) Invalidate() error {
pl := a.ar.tokens
pl := a.ar.Tokens
resp, err := rawPost("/invalidate", pl)
if err != nil {