chore: setup initial oidc polling route (polling to come)

This commit is contained in:
Randall Morey committed 2021-01-22 10:34:05 -05:00
1 parent 900f342894
commit ac92575b36
6 files changed
+22 -3

No files matched your search

+2 -2
View File
@@ -48,8 +48,8 @@ export default class OIDCAuthenticator extends BaseAuthenticator {
* `window.open`, but may be overriden.
* @param {string} url
*/
openExternalOIDCFlow(url) {
window.open(url);
async openExternalOIDCFlow(url) {
await window.open(url);
}
async authenticate(
+3 -1
View File
@@ -10,7 +10,9 @@ Router.map(function () {
this.route('scopes', function () {
this.route('scope', { path: ':scope_id' }, function () {
this.route('authenticate', function () {
this.route('method', { path: ':auth_method_id' }, function() {});
this.route('method', { path: ':auth_method_id' }, function() {
this.route('oidc');
});
});
this.route('scopes', function () {});
@@ -55,6 +55,7 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route {
requestCookies,
{ scope, authMethod }
);
this.transitionTo('scopes.scope.authenticate.method.oidc');
break;
}
}
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';
export default class ScopesScopeAuthenticateMethodOidcRoute extends Route {
}
@@ -0,0 +1 @@
OIDC yay!
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Route | scopes/scope/authenticate/method/oidc', function(hooks) {
setupTest(hooks);
test('it exists', function(assert) {
let route = this.owner.lookup('route:scopes/scope/authenticate/method/oidc');
assert.ok(route);
});
});