-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* adds error handling to auth-jwt component for missing roles and fixes bug where role wasn't being retained when using alternate oidc mount path at login * fixes jwt login bug from auth mount tabs and adds test * updates okta-number-challenge success value to arg in template * adds changelog entry * fixes issues logging in manually with jwt * reverts mistaken change
- Loading branch information
Showing
10 changed files
with
155 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
ui: Fixes oidc/jwt login issue with alternate mount path and jwt login via mount path tab | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
import { settled } from '@ember/test-helpers'; | ||
|
||
module('Unit | Component | auth-form', function (hooks) { | ||
setupTest(hooks); | ||
|
||
test('it should use token for oidc and jwt auth method types when processing form submit', async function (assert) { | ||
assert.expect(4); | ||
|
||
const component = this.owner.lookup('component:auth-form'); | ||
component.reopen({ | ||
methods: [], // eslint-disable-line | ||
// eslint-disable-next-line | ||
authenticate: { | ||
unlinked() { | ||
return { | ||
perform(type, data) { | ||
assert.deepEqual( | ||
type, | ||
'token', | ||
`Token type correctly passed to authenticate method for ${component.providerName}` | ||
); | ||
assert.deepEqual( | ||
data, | ||
{ token: component.token }, | ||
`Token passed to authenticate method for ${component.providerName}` | ||
); | ||
}, | ||
}; | ||
}, | ||
}, | ||
}); | ||
|
||
const event = new Event('submit'); | ||
|
||
for (const type of ['oidc', 'jwt']) { | ||
component.set('selectedAuth', type); | ||
await settled(); | ||
await component.actions.doSubmit.apply(component, [undefined, event, 'foo-bar']); | ||
} | ||
}); | ||
}); |