code: public synchronized void refresh() throws AuthenticationException {
  		if (authResult == null) {
  			// refresh operation is not available
  			PasswordProvider passwordProvider = tryPasswordLogin();
  			if (passwordProvider == null) {
  				throw new AuthenticationException("no more authentication methods to try");
  			} else {
  				refreshWithPassword(passwordProvider);
  			}
  		} else {
  			try {
  				refreshWithToken(authResult.getClientToken(), authResult.getAccessToken());
  			} catch (AuthenticationException e) {
  				// token login failed
  				PasswordProvider passwordProvider = tryPasswordLogin();
  				if (passwordProvider == null) {
  					throw e;
  				}
  
  				try {
  					refreshWithPassword(passwordProvider);
  				} catch (AuthenticationException e1) {
  					e1.addSuppressed(e);
  					throw e1;
  				}
  			}
  		}
  	}
docs: Tries refreshing the current session.
  <p>
  This method will try refreshing the token. If YggdrasilAuthenticator
  failed to refresh, it will call {@link #tryPasswordLogin()} to ask the
  password for authentication. If no password is available,an
  {@link AuthenticationException} will be thrown.
  <p>
  尝试刷新当前的 session 。这个方法首先尝试使用 token 来刷新 session 。如果失败了， 则调用
  {@link #tryPasswordLogin()} 来要求提供密码，使用密码进行登录。如果又失败了，则抛出一个
  {@link AuthenticationException} 。
  
  @throws AuthenticationException if <code>YggdrasilAuthenticator</code>
  couldn't refresh the current session