// Logout invalidates the token and revoke its access.
// A new Client, using `OpenConnection`, should be created in order to continue after this call.
Logout invalidates the token and revoke its access.
A new Client, using `OpenConnection`, should be created in order to continue after this call.
// Logout invalidates the token and revoke its access . // A new Client using ` OpenConnection ` should be created in order to continue after this call .
func (c *Client) Logout() error {
	if c.Config.Token == "" {
		return ErrCredentialsMissing
	}
	path := logoutPath + c.Config.Token
	resp, err := c.Do(http.MethodGet, path, "", nil)
	if err != nil {
		return err
	}
	return resp.Body.Close()
}
func ( c * Client ) Logout ( ) error { if c . Config . Token == " " { return ErrCredentialsMissing } path := logoutPath + c . Config . Token resp , err := c . Do ( http . MethodGet , path , " " , nil ) if err != nil { return err } return resp . Body . Close ( ) }
Logout invalidates the token and revoke its access.
Logout invalidates the token and revoke its access .