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

Support refresh token authentication #69

Merged
merged 4 commits into from
Dec 13, 2016
Merged

Conversation

cocojoe
Copy link
Member

@cocojoe cocojoe commented Dec 5, 2016

Also adds method to call delegation.

Closes #55 also fixes #59

@@ -339,6 +371,14 @@ public protocol Authentication: Trackable, Loggable {
- seeAlso: https://tools.ietf.org/html/rfc7636
*/
func tokenExchange(withCode code: String, codeVerifier: String, redirectURI: String) -> Request<Credentials, AuthenticationError>

/**
Authenticate with a refresh_token.
Copy link
Member

Choose a reason for hiding this comment

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

Renew user's credentials with a refresh_token

/**
Authenticate with a refresh_token.

- Parameter token: the clients refresh_token
Copy link
Member

Choose a reason for hiding this comment

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

`- Parameter refreshToken: the client's refresh token obtained on auth

- Parameter token: the clients refresh_token
- Returns: a request that will yield Auth0 user's credentials
*/
func login(withToken token: String) -> Request<Credentials, AuthenticationError>
Copy link
Member

Choose a reason for hiding this comment

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

func renew(withRefreshToken refreshToken: String) -> Request<Credentials, AuthenticationError>

- Parameter token: the clients refresh_token
- Returns: a request that will yield Auth0 user's credentials
*/
func login(withToken token: String) -> Request<Credentials, AuthenticationError>
Copy link
Member

Choose a reason for hiding this comment

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

Needs to be public

Copy link
Member Author

Choose a reason for hiding this comment

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

Can't change to public in protocol, access is inline with other methods and I didn't have any issues accessing in the App ViewController.

@cocojoe cocojoe force-pushed the grant_type_refresh_token branch 2 times, most recently from 53ed8ff to 55541ee Compare December 12, 2016 13:40
@hzalaz hzalaz added this to the 1.1.0 milestone Dec 12, 2016
@hzalaz hzalaz merged commit 6f9b17c into master Dec 13, 2016
@hzalaz hzalaz deleted the grant_type_refresh_token branch December 13, 2016 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing API Delegation for Firebase
2 participants