Skip to content

Commit

Permalink
Merge branch 'fix_authenticated' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Krisztian Szabo committed Mar 20, 2015
2 parents 765f880 + e9b87dc commit e264c22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/mkto_rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def debug=(bool)
end

def authenticated?
!@token.empty?
!@token.empty? && token_valid?
end

def token_valid?
return Time.now < @valid_until
end

# used for testing only
Expand Down

0 comments on commit e264c22

Please sign in to comment.