From 8efa7aa299b0488ae4439906482b75df0fb00cc7 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 20 Mar 2023 18:39:08 +0100 Subject: Exports + Python + Server: Remove ShouldRenewButton This is replace with expiry times --- client/server.go | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'client') diff --git a/client/server.go b/client/server.go index f31da2e..6c0b4d2 100644 --- a/client/server.go +++ b/client/server.go @@ -588,19 +588,6 @@ func (c *Client) RenewSession() (err error) { return c.ensureLogin(srv, srvtypes.Tokens{}) } -// ShouldRenewButton returns true if the renew button should be shown -// If there is no server then this returns false and logs with INFO if so -// In other cases it simply checks the expiry time and calculates according to: https://github.com/eduvpn/documentation/blob/b93854dcdd22050d5f23e401619e0165cb8bc591/API.md#session-expiry. -func (c *Client) ShouldRenewButton() bool { - srv, err := c.Servers.GetCurrentServer() - if err != nil { - log.Logger.Infof("no server to renew: %s\nstacktrace:\n%s", err.Error(), err.(*errors.Error).ErrorStack()) - return false - } - - return server.ShouldRenewButton(srv) -} - // ensureLogin logs the user back in if needed. // It runs the FSM transitions to ask for user input. func (c *Client) ensureLogin(srv server.Server, t srvtypes.Tokens) (err error) { -- cgit v1.2.3