Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

SSO: Link tokens rather than copying them #2916

Merged
merged 12 commits into from
Sep 10, 2018
Merged

Conversation

nwmac
Copy link
Contributor

@nwmac nwmac commented Aug 28, 2018

Currently, in order to auto-connect a Cloud Foundry when using SSO, we copy the token from the UAA to the Endpoint.

This means they have the same refresh token - so when the access token expires, we will go fetch a new one and also get a new refresh token - we only update one token, so the other is left with a refresh token that is invalid and whichever it is (UAA/CF) will not be able to get a new access token.

This PR changes this and instead of copying, we link the tokens, and ensure we use the refresh/access token from the linked token and refresh that when needed

NOTE: This PR includes the changes in - #2522 which should be merged first.

@cfdreddbot
Copy link

Hey nwmac!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@codecov
Copy link

codecov bot commented Aug 28, 2018

Codecov Report

Merging #2916 into v2-master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           v2-master    #2916      +/-   ##
=============================================
- Coverage      71.36%   71.33%   -0.03%     
=============================================
  Files            605      605              
  Lines          25920    25920              
  Branches        5876     5876              
=============================================
- Hits           18497    18491       -6     
- Misses          7423     7429       +6

@richard-cox richard-cox merged commit f18bc8f into v2-master Sep 10, 2018
@richard-cox richard-cox deleted the token-linking branch September 10, 2018 12:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants