RingCentral.Platform.LoggedIn C# (CSharp) Method

LoggedIn() public method

Determines if Access is valid and returns the boolean result. If access is not valid but refresh token is valid then a refresh is issued.
public LoggedIn ( ) : bool
return bool
        public bool LoggedIn()
        {
            if (Auth.IsAccessTokenValid())
            {
                return true;
            }

            if (Auth.IsRefreshTokenValid())
            {
                //obtain a mutual-exclusion lock for the thisLock object, execute statement and then release the lock.
                lock (refreshLock)
                {
                    Refresh();
                    return true;
                }
            }

            return false;
        }