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: {
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])
});
}

View File

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

View File

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

View File

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