Index: Src/GoogleApis.Auth/OAuth2/Responses/TokenResponse.cs =================================================================== --- a/Src/GoogleApis.Auth/OAuth2/Responses/TokenResponse.cs +++ b/Src/GoogleApis.Auth/OAuth2/Responses/TokenResponse.cs @@ -65,29 +65,12 @@ /// public bool IsExpired(IClock clock) { - //TODO(peleyal): consider move it to an extension method - if (!ExpiresInSeconds.HasValue) + if (AccessToken == null || !ExpiresInSeconds.HasValue) { return true; } return Issued.AddSeconds(ExpiresInSeconds.Value + 60) <= clock.Now; } - - /// - /// Copies all properties from the other token, except the other's refresh token property in case it's null. - /// - internal void CopyFrom(TokenResponse other) - { - AccessToken = other.AccessToken; - TokenType = other.TokenType; - ExpiresInSeconds = other.ExpiresInSeconds; - if (other.RefreshToken != null) - { - RefreshToken = other.RefreshToken; - } - Scope = other.Scope; - Issued = other.Issued; - } } } \ No newline at end of file