If an expired cached token is initialized, expiration time is ignored #24

Merged
merged 3 commits into from Sep 5, 2011

Conversation

Projects
None yet
2 participants
Contributor

k7d commented Jul 18, 2011

PhAuthenticationToken init method was setting token's expiry date to nil if secondsToExpiry was negative.

However PhFacebook.m is assuming that token is valid when expiry is nil:

if (_authToken.expiry == nil || [[_authToken.expiry laterDate: [NSDate date]] isEqual: _authToken.expiry])
    validToken = YES;
Contributor

k7d commented Jul 18, 2011

Just noticed this was introduced in pull request #16. So possibly this fix as-it-is may break something else... didn't have time to investigate yet. Maybe you have other ideas how to fix it?

philippec added a commit that referenced this pull request Sep 5, 2011

Merge pull request #24 from k7d/cached-token-expiry
If an expired cached token is initialized, expiration time is ignored.

Also fixes self = [super init] assignments.

@philippec philippec merged commit 81365fa into philippec:master Sep 5, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment