412eec7f5d
* 6 new components for new login/logout flow, plus SSO support UI Components: 1. AuthDialog: Wraps/orchestrates AuthForm and AuthProfile 2. AuthForm: Authorization form shown when logged out. 3. AuthProfile: Simple presentational component to show the users 'Profile' 4. OidcSelect: A 'select' component for selecting an OIDC provider, dynamically uses either a single select menu or multiple buttons depending on the amount of providers Data Components: 1. JwtSource: Given an OIDC provider URL this component will request a token from the provider and fire an donchange event when it has been retrieved. Used by TokenSource. 2. TokenSource: Given a oidc provider name or a Consul SecretID, TokenSource will use whichever method/API requests required to retrieve Consul ACL Token, which is emitted to the onchange event handler. Very basic README documentation included here, which is likely to be refined somewhat. * CSS required for new auth/SSO UI components * Remaining app code required to tie the new auth/SSO work together * CSS code required to help tie the auth/SSO work together * Test code in order to get current tests passing with new auth/SSO flow ..plus extremely basics/skipped rendering tests for the new components * Treat the secret received from the server as the truth Previously we've always treated what the user typed as the truth, this breaks down when using SSO as the user doesn't type anything to retrieve a token. Therefore we change this so that we use the secret in the API response as the truth. * Make sure removing an dom tree from a buffer only removes its own tree
80 lines
1.4 KiB
SCSS
80 lines
1.4 KiB
SCSS
/* layout */
|
|
%app-view {
|
|
position: relative;
|
|
}
|
|
%app-view-title {
|
|
display: flex;
|
|
align-items: center;
|
|
white-space: nowrap;
|
|
}
|
|
%app-view-actions {
|
|
margin-left: auto;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
}
|
|
%app-view-header dl {
|
|
float: left;
|
|
}
|
|
/* units */
|
|
%app-view {
|
|
margin-top: 50px;
|
|
}
|
|
/* give anything after the header a bit of room */
|
|
%app-view-header + div > *:first-child {
|
|
margin-top: 1.8em;
|
|
}
|
|
%app-view-title {
|
|
padding-bottom: 0.2em;
|
|
}
|
|
%app-view-title > :not(:last-child) {
|
|
margin-right: 8px;
|
|
}
|
|
%app-view-actions {
|
|
margin-top: 9px;
|
|
}
|
|
%app-view-actions > *:not(:last-child) {
|
|
margin-right: 12px;
|
|
}
|
|
%app-view-header dl {
|
|
margin-top: 19px;
|
|
margin-bottom: 23px;
|
|
margin-right: 50px;
|
|
}
|
|
|
|
/* content */
|
|
%app-view-content h2 {
|
|
padding-bottom: 0.2em;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
%app-view-error > div {
|
|
padding: 1px 0 30px 0;
|
|
}
|
|
%app-view-content-empty {
|
|
margin-top: 0;
|
|
padding: 50px;
|
|
text-align: center;
|
|
}
|
|
/* this should probably be its own component */
|
|
%app-view-content div > dl {
|
|
position: relative;
|
|
}
|
|
%app-view-content div > dl > dt {
|
|
position: absolute;
|
|
}
|
|
%app-view-content div > dl > dt {
|
|
width: 140px;
|
|
}
|
|
%app-view-content div > dl > dd {
|
|
padding-left: 140px;
|
|
}
|
|
%app-view-content div > dl > * {
|
|
min-height: 1em;
|
|
margin-bottom: 0.4em;
|
|
}
|
|
/* */
|
|
/* TODO: Think about an %app-form or similar */
|
|
%app-view-content fieldset:not(.freetext-filter) {
|
|
padding-bottom: 0.3em;
|
|
margin-bottom: 2em;
|
|
}
|