Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit access token invalidation #43

Merged
merged 3 commits into from
Feb 23, 2015

Conversation

felixvisee
Copy link
Contributor

An access token is invalidated by setting its expiration date to 1 January 1970, GMT.

Closes #40.

Felix Jendrusch added 2 commits February 23, 2015 09:46
An access token is invalidated by setting its expiration date to 1
January 1970, GMT.

Closes #40.
///
/// :returns: A new access token with this access token's values for
/// properties where new ones are not provided.
public func copy(accessToken: String? = nil, tokenType: String? = nil, expiresAt: NSDate?? = nil, refreshToken: String?? = nil) -> OAuthAccessToken {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing tests for public function

@felixvisee
Copy link
Contributor Author

There is a slight feeling of this being a hack and thoughts about adding something like state to an access token: .Valid, .Invalid, .Expired

@tibr
Copy link
Contributor

tibr commented Feb 23, 2015

Agreed, adding state would certainly be less hacky.

@felixvisee
Copy link
Contributor Author

However, we would have to store that state and it's kind of non-spec.

@tibr
Copy link
Contributor

tibr commented Feb 23, 2015

Right. I think storing it internally wouldn't be a problem though because we don't differ from the spec in our external behavior.

tibr added a commit that referenced this pull request Feb 23, 2015
…token

Add explicit access token invalidation
@tibr tibr merged commit dec67aa into develop Feb 23, 2015
@tibr tibr deleted the feature/40-invalidate-access-token branch February 23, 2015 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants