Merge pull request #516 from hashicorp/feature-oidc-static-callbacks
Add static auth callback pages to admin UI for notifying success or error.
This commit is contained in:
9 files changed
+65
No files matched your search
@@ -1,10 +1,14 @@
|
|||||||
auth:
|
auth:
|
||||||
titles:
|
titles:
|
||||||
no-scopes: No Scopes Available
|
no-scopes: No Scopes Available
|
||||||
|
flow-success: Successful authentication
|
||||||
|
flow-error: Could not authenticate
|
||||||
descriptions:
|
descriptions:
|
||||||
no-scopes: No scopes were found. To authenticate, ask your administrator to create an scope and grant you access.
|
no-scopes: No scopes were found. To authenticate, ask your administrator to create an scope and grant you access.
|
||||||
choose-org: Choose a scope to authenticate.
|
choose-org: Choose a scope to authenticate.
|
||||||
authenticating-with-org: "You are authenticating with {name}."
|
authenticating-with-org: "You are authenticating with {name}."
|
||||||
|
flow-success: You've successfully authenticated. You may now close this window and return to the client.
|
||||||
|
flow-error: Something went wrong while authenticating. Please close this window and try again. If the problem persists, notify your administrator.
|
||||||
origin:
|
origin:
|
||||||
connected-to: Connected to
|
connected-to: Connected to
|
||||||
titles:
|
titles:
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ export default class Router extends EmberRouter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Router.map(function () {
|
Router.map(function () {
|
||||||
|
this.route('authentication-complete');
|
||||||
|
this.route('authentication-error');
|
||||||
|
|
||||||
this.route('scopes', function () {
|
this.route('scopes', function () {
|
||||||
this.route('scope', { path: ':scope_id' }, function () {
|
this.route('scope', { path: ':scope_id' }, function () {
|
||||||
this.route('authenticate', function () {
|
this.route('authenticate', function () {
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import Route from '@ember/routing/route';
|
||||||
|
|
||||||
|
export default class AuthenticationCompleteRoute extends Route {}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import Route from '@ember/routing/route';
|
||||||
|
|
||||||
|
export default class AuthenticationErrorRoute extends Route {}
|
||||||
@@ -4,6 +4,12 @@
|
|||||||
@import 'rose';
|
@import 'rose';
|
||||||
@import 'notify';
|
@import 'notify';
|
||||||
|
|
||||||
|
.rose-layout-global {
|
||||||
|
.rose-layout-global-body {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.rose-layout-centered {
|
.rose-layout-centered {
|
||||||
> .rose-layout-page {
|
> .rose-layout-page {
|
||||||
width: sizing.rems(l) * 18;
|
width: sizing.rems(l) * 18;
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{{page-title (t 'auth.titles.flow-success')}}
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<Rose::Layout::Centered>
|
||||||
|
<Rose::Notification
|
||||||
|
@style="success"
|
||||||
|
@heading={{t "auth.titles.flow-success"}}
|
||||||
|
>
|
||||||
|
{{t "auth.descriptions.flow-success"}}
|
||||||
|
</Rose::Notification>
|
||||||
|
</Rose::Layout::Centered>
|
||||||
|
</main>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{{page-title (t "auth.titles.flow-error")}}
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<Rose::Layout::Centered>
|
||||||
|
<Rose::Notification
|
||||||
|
@style="error"
|
||||||
|
@heading={{t "auth.titles.flow-error"}}
|
||||||
|
>
|
||||||
|
{{t "auth.descriptions.flow-error"}}
|
||||||
|
</Rose::Notification>
|
||||||
|
</Rose::Layout::Centered>
|
||||||
|
</main>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { module, test } from 'qunit';
|
||||||
|
import { setupTest } from 'ember-qunit';
|
||||||
|
|
||||||
|
module('Unit | Route | authentication-complete', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
let route = this.owner.lookup('route:authentication-complete');
|
||||||
|
assert.ok(route);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { module, test } from 'qunit';
|
||||||
|
import { setupTest } from 'ember-qunit';
|
||||||
|
|
||||||
|
module('Unit | Route | authentication-error', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
let route = this.owner.lookup('route:authentication-error');
|
||||||
|
assert.ok(route);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in new issue
Block a user