Replacing SAML socketId with publicKey

The backend changes for socketId weren't working with HA clusters so
it was decided to replace socketId with publicKey.

rancher/rancher#444
This commit is contained in:
Cody Jackson 2020-07-20 09:53:16 -07:00
parent fb46fbd927
commit 36d4dd7afd
4 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@ export default Component.extend({
actions: { actions: {
authenticate() { authenticate() {
get(this, 'saml').login(get(this, 'provider'), get(this, 'socketId')).catch( ( err ) => { get(this, 'saml').login(get(this, 'provider'), get(this, 'publicKey')).catch( ( err ) => {
set(this, 'errors', [err.message]) set(this, 'errors', [err.message])
}); });
} }

View File

@ -22,7 +22,7 @@ export default Controller.extend({
router: service(), router: service(),
session: service(), session: service(),
queryParams: ['errorMsg', 'resetPassword', 'errorCode', 'socketId'], queryParams: ['errorMsg', 'resetPassword', 'errorCode', 'publicKey'],
waiting: false, waiting: false,
adWaiting: false, adWaiting: false,
localWaiting: false, localWaiting: false,

View File

@ -39,7 +39,7 @@
{{login-saml {{login-saml
action=(action "started") action=(action "started")
provider="shibboleth" provider="shibboleth"
socketId=socketId publicKey=publicKey
}} }}
{{/if}} {{/if}}
@ -78,7 +78,7 @@
{{login-saml {{login-saml
action=(action "started") action=(action "started")
provider="ping" provider="ping"
socketId=socketId publicKey=publicKey
}} }}
{{/if}} {{/if}}
@ -86,7 +86,7 @@
{{login-saml {{login-saml
action=(action "started") action=(action "started")
provider="adfs" provider="adfs"
socketId=socketId publicKey=publicKey
}} }}
{{/if}} {{/if}}
@ -94,7 +94,7 @@
{{login-saml {{login-saml
action=(action "started") action=(action "started")
provider="okta" provider="okta"
socketId=socketId publicKey=publicKey
}} }}
{{/if}} {{/if}}
@ -102,7 +102,7 @@
{{login-saml {{login-saml
action=(action "started") action=(action "started")
provider="keycloak" provider="keycloak"
socketId=socketId publicKey=publicKey
}} }}
{{/if}} {{/if}}
{{/if}} {{/if}}

View File

@ -9,12 +9,12 @@ export default Service.extend({
app: service(), app: service(),
intl: service(), intl: service(),
login(providerName, socketId) { login(providerName, publicKey) {
const finalUrl = window.location.origin; const finalUrl = window.location.origin;
const provider = get(this, 'access.providers').findBy('id', providerName); const provider = get(this, 'access.providers').findBy('id', providerName);
const args = { const args = {
finalRedirectUrl: finalUrl, finalRedirectUrl: finalUrl,
socketId publicKey
}; };
return provider.doAction('login', args).then( ( resp ) => { return provider.doAction('login', args).then( ( resp ) => {