Picking up on @zachmargolis work, and fixing review comments - #191
Conversation
| /*! @file OIDLogoutResponse.m | ||
| @brief AppAuth iOS SDK | ||
| @copyright | ||
| Copyright 2015 Google Inc. All Rights Reserved. |
There was a problem hiding this comment.
Update all instances 2015 Google Inc. All Rights Reserved. -> 2017 The AppAuth Authors.
|
|
||
| /*! @brief Designated initializer. | ||
| @param request The serviced request. | ||
| @param parameters The decoded parameters returned from the Server. |
There was a problem hiding this comment.
what endpoint is this? rather than "from the Server" we should say "from the XYZ endpoint".
There was a problem hiding this comment.
Good point, will rewrite soon!
|
Thanks for addressing the review comments from #138. I think this is nearly good to go, but I have a few questions: 1/ 2/ 3/ |
|
Re 1/: I signed. Thanks for picking this back up! |
|
Re 1/: signed as well. Thanks! 2/ I'm doing it right now. Will update the PR in several hours. I'll also rename everything from 3/ We are using okta's oidc, and they, in theory, support the end session flow. We plan to use it in production, as soon as we get it working. This pull request is interesting for us to have it available in the near future |
|
We are also in demand of this feature and I was about to test it with a Keycloak IDC instance. I tried to integrate the fork using Carthage. However, I discovered the newly added files are not attached to all the framework targets. This makes the new functionality unavailable for Carthage users. To me it is unclear who should construct an |
Codecov Report
@@ Coverage Diff @@
## dev-logout #191 +/- ##
==============================================
+ Coverage 68.03% 68.23% +0.19%
==============================================
Files 40 43 +3
Lines 3898 4039 +141
Branches 73 73
==============================================
+ Hits 2652 2756 +104
- Misses 1244 1281 +37
Partials 2 2
Continue to review full report at Codecov.
|
|
@dgommers I have updated the pull request adding the targets and fixing the Docs. I am currently renaming it from EDIT: contrary to my initial thoughts, the End Session API should be presented to the user in a web page, so the OP should (according to the spec) ask if the end-user whether he wants to logout. IF the user, in the web page says YES, the webpage is redirected to the logout callback parameter that is already implemented. This flow is possible by using EDIT2: after further investigation, this looks like it will need a similar protocol to |
|
Thanks for signing the CLA all!
Yes, you're right. Previously there was only one place a user-agent (browser / SFAuthenticationSession) was used, now there will be multiple. So whatever way you implement this, the one thing I'm definitely going to be looking for is having the "open URL in user agent / callback" part reused in both cases – I hope there's a good way to generalize that code. Regarding when we integrate this into master, I think it makes sense to merge this feature into master only when it's usable (models + controller). Do you want a mega PR with the models + controller, OR, we could merge this into a development branch so you can start a new PR with the controller. A development branch still enables people to test it via Carthage/CocoaPods if they specify the branch so that could be useful. |
|
Got it, thanks. Good to hear that logic can be shared with the Suggestion: A separate protocol for such Let me know if I can be of any help. I am keeping an eye on this thread. |
0768aab to
47d8460
Compare
|
I agree with you William, it makes a lot of sense to split this into 2 pull requests. I've renamed the request/response/test classes, and squashed the 3 commits. I'll start working on the other PR right away. EDIT: I forgot to update the framework headers. Updating PR now |
ecb6535 to
e50f457
Compare
|
OK, are you ready for me to merge this into a development branch for logout? |
|
Yes we are! But the PR is set to merge to the master branch, and I don't see any development branches in the repository, let me know if I need to create this branch and update the PR |
|
I created "dev-logout" can you point the PR at that? Also can you reword your commit message to describe the actual changes that are going in? Feel free to credit Zach in the body of the message, but I think the first line should focus on the code changes. #196 can go direct to master, but the rest we can merge into dev-logout until it's complete. |
e50f457 to
527f6ec
Compare
|
Done, and done! |
| #import "OIDTokenResponse.h" | ||
| #import "OIDTokenUtilities.h" | ||
| #import "OIDURLSessionProvider.h" | ||
| #import "OIDEndSessionRequest.h" |
There was a problem hiding this comment.
Imports should be in alphabetical order, can you address in a subsequent commit? Here and the framework header.
|
@luksfarris @WilliamDenniss Thanks for this logout feature, my understanding is that, after the PR 196 is done, there is going to a new class method (say. authStateByPresentingEndSessionEndpointRequest) in OIDAuthState which returns the callback with EndSessionEndpointResponse. Is this correct or can you clarify on how the SFAuthenticationSession / browser be invoked for the logout flow? |
|
@jaishankar with the other pull request you saw, we'd have the ability to create non authentication external user agent requests. This allows us to create a new Logout FlowSession, and have it called in a class method in OIDAuthState. How the browser will be invoked, is an open question. SFAuthenticationSession has a terrible user experience, because every time you open it, it asks for a "Sign In" confirmation (therefore our plan of "generic" requests looks and feels weird. With @WilliamDenniss 's implementation of external browsers, we now have other possibilities |
From @zachmargolis:
I've picked his work, and fixed the comments made by @WilliamDenniss