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

AMBARI-26307: Knox SSO fails to login into Ambari #3941

Merged
merged 2 commits into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ambari-web/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ App.Router = Em.Router.extend({
var dfd = $.Deferred();
var self = this;
var auth = App.db.getAuthenticated();
this.getClusterDataRequest().always(function (xhr) {
if (xhr) {
this.getClusterDataRequest().always(function (xhr, textStatus, jqXHRorErrorThrown) {
JiaLiangC marked this conversation as resolved.
Show resolved Hide resolved
if (xhr && textStatus == 'success') {
// if server knows the user and user authenticated by UI
if (auth) {
dfd.resolve(self.get('loggedIn'));
// if server knows the user but UI don't, check the response header
// and try to authorize
} else if (xhr.getResponseHeader('User')) {
var user = xhr.getResponseHeader('User');
} else if (jqXHRorErrorThrown.getResponseHeader('User')) {
var user = jqXHRorErrorThrown.getResponseHeader('User');
JiaLiangC marked this conversation as resolved.
Show resolved Hide resolved
App.ajax.send({
name: 'router.afterLogin',
sender: self,
Expand Down