├── React ├── .eslintignore ├── public │ ├── favicon.ico │ ├── apple-icon.png │ └── manifest.json ├── jsconfig.json ├── src │ ├── assets │ │ ├── img │ │ │ ├── mask.png │ │ │ ├── cover.jpeg │ │ │ ├── favicon.png │ │ │ ├── login.jpeg │ │ │ ├── new_logo.png │ │ │ ├── apple-icon.png │ │ │ ├── faces │ │ │ │ └── marc.jpg │ │ │ ├── reactlogo.png │ │ │ ├── register.jpeg │ │ │ ├── sidebar-1.jpg │ │ │ ├── sidebar-2.jpg │ │ │ ├── sidebar-3.jpg │ │ │ ├── sidebar-4.jpg │ │ │ └── tim_80x80.png │ │ ├── github │ │ │ ├── edge.png │ │ │ ├── html.png │ │ │ ├── map.jpg │ │ │ ├── opera.png │ │ │ ├── vuejs.png │ │ │ ├── angular.png │ │ │ ├── aspnet.png │ │ │ ├── chrome.png │ │ │ ├── firefox.png │ │ │ ├── safari.png │ │ │ ├── tables.jpg │ │ │ ├── dashboard.jpg │ │ │ ├── md-react.gif │ │ │ ├── userprofile.jpg │ │ │ ├── notifications.jpg │ │ │ ├── opt_md_thumbnail.jpg │ │ │ ├── opt_mdr_thumbnail.jpg │ │ │ ├── opt_md_vue_thumbnail.jpg │ │ │ ├── opt_md_angular_thumbnail.jpg │ │ │ └── react.svg │ │ └── jss │ │ │ └── material-dashboard-react │ │ │ ├── components │ │ │ ├── cardBodyStyle.js │ │ │ ├── cardIconStyle.js │ │ │ ├── cardAvatarStyle.js │ │ │ ├── cardStyle.js │ │ │ ├── typographyStyle.js │ │ │ ├── footerStyle.js │ │ │ ├── cardFooterStyle.js │ │ │ ├── infoStyle.js │ │ │ ├── tasksStyle.js │ │ │ ├── customInputStyle.js │ │ │ ├── tableStyle.js │ │ │ ├── customTabsStyle.js │ │ │ └── headerStyle.js │ │ │ ├── cardImagesStyles.js │ │ │ ├── layouts │ │ │ ├── adminStyle.js │ │ │ ├── rtlStyle.js │ │ │ └── authStyle.js │ │ │ ├── tooltipStyle.js │ │ │ ├── views │ │ │ ├── iconsStyle.js │ │ │ ├── loginPageStyle.js │ │ │ ├── registerPageStyle.js │ │ │ ├── dashboardStyle.js │ │ │ └── rtlStyle.js │ │ │ └── checkboxAdnRadioStyle.js │ ├── reducers │ │ ├── index.js │ │ └── authReducer.js │ ├── utils │ │ ├── axiosHeaders.js │ │ ├── authProvider.js │ │ └── protectedRoute.js │ ├── actions │ │ ├── types.js │ │ └── authActions.js │ ├── store.js │ ├── components │ │ ├── Typography │ │ │ ├── Info.js │ │ │ ├── Muted.js │ │ │ ├── Danger.js │ │ │ ├── Primary.js │ │ │ ├── Success.js │ │ │ ├── Warning.js │ │ │ └── Quote.js │ │ ├── Grid │ │ │ ├── GridItem.js │ │ │ └── GridContainer.js │ │ ├── Card │ │ │ ├── CardBody.js │ │ │ ├── CardAvatar.js │ │ │ ├── CardIcon.js │ │ │ ├── Card.js │ │ │ ├── CardFooter.js │ │ │ └── CardHeader.js │ │ ├── InfoArea │ │ │ └── InfoArea.js │ │ ├── Snackbar │ │ │ ├── SnackbarContent.js │ │ │ └── Snackbar.js │ │ ├── Footer │ │ │ └── Footer.js │ │ ├── CustomButtons │ │ │ └── Button.js │ │ └── Navbars │ │ │ └── Navbar.js │ ├── index.js │ ├── variables │ │ └── general.js │ ├── App.js │ └── services │ │ └── oauth.js ├── .env ├── documentation │ └── assets │ │ └── img │ │ ├── mask.png │ │ ├── cover.jpeg │ │ ├── favicon.png │ │ ├── new_logo.png │ │ ├── apple-icon.png │ │ ├── faces │ │ └── marc.jpg │ │ ├── reactlogo.png │ │ ├── sidebar-1.jpg │ │ ├── sidebar-2.jpg │ │ ├── sidebar-3.jpg │ │ ├── sidebar-4.jpg │ │ └── tim_80x80.png ├── Dockerfile ├── CHANGELOG.md ├── .babelrc ├── .eslintrc.js ├── ISSUE_TEMPLATE.md ├── bower.json └── LICENSE.md ├── IdentityServer ├── Views │ ├── _ViewStart.cshtml │ ├── _ViewImports.cshtml │ ├── Account │ │ ├── AccessDenied.cshtml │ │ ├── Logout.cshtml │ │ └── LoggedOut.cshtml │ ├── Device │ │ ├── Success.cshtml │ │ └── UserCodeCapture.cshtml │ ├── Shared │ │ ├── _ValidationSummary.cshtml │ │ ├── Redirect.cshtml │ │ ├── _Layout.cshtml │ │ ├── _Nav.cshtml │ │ ├── _ScopeListItem.cshtml │ │ └── Error.cshtml │ ├── Home │ │ └── Index.cshtml │ └── Diagnostics │ │ └── Index.cshtml ├── wwwroot │ ├── lib │ │ ├── bootstrap │ │ │ └── scss │ │ │ │ ├── utilities │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _overflow.scss │ │ │ │ ├── _screenreaders.scss │ │ │ │ ├── _visibility.scss │ │ │ │ ├── _shadows.scss │ │ │ │ ├── _float.scss │ │ │ │ ├── _align.scss │ │ │ │ ├── _background.scss │ │ │ │ ├── _stretched-link.scss │ │ │ │ ├── _sizing.scss │ │ │ │ ├── _position.scss │ │ │ │ ├── _display.scss │ │ │ │ ├── _embed.scss │ │ │ │ ├── _borders.scss │ │ │ │ ├── _text.scss │ │ │ │ └── _spacing.scss │ │ │ │ ├── _media.scss │ │ │ │ ├── mixins │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _size.scss │ │ │ │ ├── _lists.scss │ │ │ │ ├── _text-truncate.scss │ │ │ │ ├── _resize.scss │ │ │ │ ├── _visibility.scss │ │ │ │ ├── _alert.scss │ │ │ │ ├── _text-hide.scss │ │ │ │ ├── _badge.scss │ │ │ │ ├── _nav-divider.scss │ │ │ │ ├── _transition.scss │ │ │ │ ├── _float.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _text-emphasis.scss │ │ │ │ ├── _reset-text.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _box-shadow.scss │ │ │ │ ├── _deprecate.scss │ │ │ │ ├── _background-variant.scss │ │ │ │ ├── _hover.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── _table-row.scss │ │ │ │ ├── _image.scss │ │ │ │ ├── _border-radius.scss │ │ │ │ ├── _caret.scss │ │ │ │ ├── _grid-framework.scss │ │ │ │ ├── _gradients.scss │ │ │ │ └── _grid.scss │ │ │ │ ├── _transitions.scss │ │ │ │ ├── bootstrap-reboot.scss │ │ │ │ ├── _jumbotron.scss │ │ │ │ ├── _utilities.scss │ │ │ │ ├── _root.scss │ │ │ │ ├── bootstrap-grid.scss │ │ │ │ ├── bootstrap.scss │ │ │ │ ├── _close.scss │ │ │ │ ├── _toasts.scss │ │ │ │ ├── _code.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _spinners.scss │ │ │ │ ├── _images.scss │ │ │ │ ├── _progress.scss │ │ │ │ ├── _badge.scss │ │ │ │ ├── _alert.scss │ │ │ │ ├── _breadcrumb.scss │ │ │ │ ├── _grid.scss │ │ │ │ └── _pagination.scss │ │ └── jquery │ │ │ ├── LICENSE.txt │ │ │ └── README.md │ ├── js │ │ ├── signin-redirect.js │ │ └── signout-redirect.js │ ├── icon.jpg │ ├── icon.png │ ├── favicon.ico │ └── css │ │ ├── site.min.css │ │ ├── site.css │ │ └── site.scss ├── AspIdUsers.db ├── appsettings.json ├── Quickstart │ ├── Account │ │ ├── UpdateProfileModel.cs │ │ ├── UpdatePasswordModel.cs │ │ ├── LogoutInputModel.cs │ │ ├── RedirectViewModel.cs │ │ ├── LogoutViewModel.cs │ │ ├── ExternalProvider.cs │ │ ├── RegisterViewModel.cs │ │ ├── LoginInputModel.cs │ │ ├── AccountOptions.cs │ │ ├── LoggedOutViewModel.cs │ │ ├── LoginViewModel.cs │ │ ├── PasswordController.cs │ │ ├── ProfileController.cs │ │ └── RegisterController.cs │ ├── Device │ │ ├── DeviceAuthorizationInputModel.cs │ │ └── DeviceAuthorizationViewModel.cs │ ├── Consent │ │ ├── ScopeViewModel.cs │ │ ├── ConsentInputModel.cs │ │ ├── ConsentViewModel.cs │ │ ├── ProcessConsentResult.cs │ │ └── ConsentOptions.cs │ ├── Home │ │ ├── ErrorViewModel.cs │ │ └── HomeController.cs │ ├── Grants │ │ └── GrantsViewModel.cs │ ├── Extensions.cs │ ├── Diagnostics │ │ ├── DiagnosticsController.cs │ │ └── DiagnosticsViewModel.cs │ └── TestUsers.cs ├── Properties │ └── launchSettings.json ├── Models │ └── ApplicationUser.cs ├── Dockerfile ├── Data │ └── ApplicationDbContext.cs ├── IdentityServer.csproj ├── tempkey.jwk └── Config.cs ├── CHANGELOG.md ├── ISSUE_TEMPLATE.md ├── docker-compose.yml ├── LICENSE ├── .github └── workflows │ └── main.yml └── CreativeTim.sln /React/.eslintignore: -------------------------------------------------------------------------------- 1 | !.eslintrc.js 2 | documentation/ 3 | build/ 4 | -------------------------------------------------------------------------------- /IdentityServer/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.0.0] 2020-10-10 2 | ### Original Release 3 | - based on Material Dashboard React **v1.9.0** 4 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_clearfix.scss: -------------------------------------------------------------------------------- 1 | .clearfix { 2 | @include clearfix(); 3 | } 4 | -------------------------------------------------------------------------------- /React/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/public/favicon.ico -------------------------------------------------------------------------------- /IdentityServer/AspIdUsers.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/IdentityServer/AspIdUsers.db -------------------------------------------------------------------------------- /IdentityServer/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServerHost.Quickstart.UI 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /React/public/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/public/apple-icon.png -------------------------------------------------------------------------------- /IdentityServer/wwwroot/js/signin-redirect.js: -------------------------------------------------------------------------------- 1 | window.location.href = document.querySelector("meta[http-equiv=refresh]").getAttribute("data-url"); 2 | -------------------------------------------------------------------------------- /React/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "src", 4 | "paths": { 5 | "*": ["src/*"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /React/src/assets/img/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/mask.png -------------------------------------------------------------------------------- /IdentityServer/wwwroot/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/IdentityServer/wwwroot/icon.jpg -------------------------------------------------------------------------------- /IdentityServer/wwwroot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/IdentityServer/wwwroot/icon.png -------------------------------------------------------------------------------- /React/src/assets/github/edge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/edge.png -------------------------------------------------------------------------------- /React/src/assets/github/html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/html.png -------------------------------------------------------------------------------- /React/src/assets/github/map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/map.jpg -------------------------------------------------------------------------------- /React/src/assets/github/opera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/opera.png -------------------------------------------------------------------------------- /React/src/assets/github/vuejs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/vuejs.png -------------------------------------------------------------------------------- /React/src/assets/img/cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/cover.jpeg -------------------------------------------------------------------------------- /React/src/assets/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/favicon.png -------------------------------------------------------------------------------- /React/src/assets/img/login.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/login.jpeg -------------------------------------------------------------------------------- /React/src/assets/img/new_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/new_logo.png -------------------------------------------------------------------------------- /IdentityServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/IdentityServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /React/.env: -------------------------------------------------------------------------------- 1 | #.env 2 | REACT_APP_AUTH_SERVER_URL="http://localhost:5000" 3 | REACT_APP_CLIENT_URL="http://localhost:3000" 4 | REACT_APP_CLIENT_ID="react.client" -------------------------------------------------------------------------------- /React/src/assets/github/angular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/angular.png -------------------------------------------------------------------------------- /React/src/assets/github/aspnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/aspnet.png -------------------------------------------------------------------------------- /React/src/assets/github/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/chrome.png -------------------------------------------------------------------------------- /React/src/assets/github/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/firefox.png -------------------------------------------------------------------------------- /React/src/assets/github/safari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/safari.png -------------------------------------------------------------------------------- /React/src/assets/github/tables.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/tables.jpg -------------------------------------------------------------------------------- /React/src/assets/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/apple-icon.png -------------------------------------------------------------------------------- /React/src/assets/img/faces/marc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/faces/marc.jpg -------------------------------------------------------------------------------- /React/src/assets/img/reactlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/reactlogo.png -------------------------------------------------------------------------------- /React/src/assets/img/register.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/register.jpeg -------------------------------------------------------------------------------- /React/src/assets/img/sidebar-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/sidebar-1.jpg -------------------------------------------------------------------------------- /React/src/assets/img/sidebar-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/sidebar-2.jpg -------------------------------------------------------------------------------- /React/src/assets/img/sidebar-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/sidebar-3.jpg -------------------------------------------------------------------------------- /React/src/assets/img/sidebar-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/sidebar-4.jpg -------------------------------------------------------------------------------- /React/src/assets/img/tim_80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/img/tim_80x80.png -------------------------------------------------------------------------------- /React/src/assets/github/dashboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/dashboard.jpg -------------------------------------------------------------------------------- /React/src/assets/github/md-react.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/md-react.gif -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_media.scss: -------------------------------------------------------------------------------- 1 | .media { 2 | display: flex; 3 | align-items: flex-start; 4 | } 5 | 6 | .media-body { 7 | flex: 1; 8 | } 9 | -------------------------------------------------------------------------------- /React/documentation/assets/img/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/mask.png -------------------------------------------------------------------------------- /React/src/assets/github/userprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/userprofile.jpg -------------------------------------------------------------------------------- /React/documentation/assets/img/cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/cover.jpeg -------------------------------------------------------------------------------- /React/documentation/assets/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/favicon.png -------------------------------------------------------------------------------- /React/documentation/assets/img/new_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/new_logo.png -------------------------------------------------------------------------------- /React/src/assets/github/notifications.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/notifications.jpg -------------------------------------------------------------------------------- /React/documentation/assets/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/apple-icon.png -------------------------------------------------------------------------------- /React/documentation/assets/img/faces/marc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/faces/marc.jpg -------------------------------------------------------------------------------- /React/documentation/assets/img/reactlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/reactlogo.png -------------------------------------------------------------------------------- /React/documentation/assets/img/sidebar-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/sidebar-1.jpg -------------------------------------------------------------------------------- /React/documentation/assets/img/sidebar-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/sidebar-2.jpg -------------------------------------------------------------------------------- /React/documentation/assets/img/sidebar-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/sidebar-3.jpg -------------------------------------------------------------------------------- /React/documentation/assets/img/sidebar-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/sidebar-4.jpg -------------------------------------------------------------------------------- /React/documentation/assets/img/tim_80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/documentation/assets/img/tim_80x80.png -------------------------------------------------------------------------------- /React/src/assets/github/opt_md_thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/opt_md_thumbnail.jpg -------------------------------------------------------------------------------- /React/src/assets/github/opt_mdr_thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/opt_mdr_thumbnail.jpg -------------------------------------------------------------------------------- /IdentityServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Data Source=AspIdUsers.db;" 4 | }, 5 | "ReactClientUrl": "http://localhost:3000" 6 | } -------------------------------------------------------------------------------- /React/src/assets/github/opt_md_vue_thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/opt_md_vue_thumbnail.jpg -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &::after { 3 | display: block; 4 | clear: both; 5 | content: ""; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /React/src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import authReducer from './authReducer'; 3 | 4 | export default combineReducers({ 5 | auth: authReducer 6 | }) -------------------------------------------------------------------------------- /React/src/assets/github/opt_md_angular_thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-dashboard-react-aspnet/HEAD/React/src/assets/github/opt_md_angular_thumbnail.jpg -------------------------------------------------------------------------------- /React/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12.10.0 2 | 3 | WORKDIR /usr/app 4 | 5 | COPY package*.json ./ 6 | 7 | RUN npm ci -qy 8 | 9 | COPY . . 10 | 11 | EXPOSE 3000 12 | 13 | CMD ["npm", "start"] -------------------------------------------------------------------------------- /React/src/utils/axiosHeaders.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | export function setAuthHeader(token) { 4 | axios.defaults.headers.common['Authorization'] = token ? 'Bearer ' + token : '' 5 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_overflow.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $value in $overflows { 4 | .overflow-#{$value} { overflow: $value !important; } 5 | } 6 | -------------------------------------------------------------------------------- /IdentityServer/Views/Account/AccessDenied.cshtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Access Denied

5 |

You do not have access to that resource.

6 |
7 |
-------------------------------------------------------------------------------- /IdentityServer/Views/Device/Success.cshtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Success

5 |

You have successfully authorized the device

6 |
7 |
8 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/js/signout-redirect.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("load", function () { 2 | var a = document.querySelector("a.PostLogoutRedirectUri"); 3 | if (a) { 4 | window.location = a.href; 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_size.scss: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | @mixin size($width, $height: $width) { 4 | width: $width; 5 | height: $height; 6 | @include deprecate("`size()`", "v4.3.0", "v5"); 7 | } 8 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_screenreaders.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Screenreaders 3 | // 4 | 5 | .sr-only { 6 | @include sr-only(); 7 | } 8 | 9 | .sr-only-focusable { 10 | @include sr-only-focusable(); 11 | } 12 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_lists.scss: -------------------------------------------------------------------------------- 1 | // Lists 2 | 3 | // Unstyled keeps list items block level, just removes default browser padding and list-style 4 | @mixin list-unstyled() { 5 | padding-left: 0; 6 | list-style: none; 7 | } 8 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_text-truncate.scss: -------------------------------------------------------------------------------- 1 | // Text truncate 2 | // Requires inline-block or block for proper styling 3 | 4 | @mixin text-truncate() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /React/src/actions/types.js: -------------------------------------------------------------------------------- 1 | export const STORE_USER = 'STORE_USER' 2 | export const USER_SIGNED_OUT = 'USER_SIGNED_OUT' 3 | export const USER_EXPIRED = 'USER_EXPIRED' 4 | export const STORE_USER_ERROR = 'STORE_USER_ERROR' 5 | export const LOADING_USER = 'LOADING_USER' -------------------------------------------------------------------------------- /IdentityServer/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |
4 | Error 5 |
6 |
7 | } -------------------------------------------------------------------------------- /React/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [1.0.0] 2020-09-27 4 | ### Original Release 5 | - Added Material-UI as base framework 6 | - Added ASP.NET Core 3.1 as back-end framework 7 | - Added design and components from Material Dashboard React v1.9.0 by Creative Tim 8 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_resize.scss: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | @mixin resizable($direction) { 4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 5 | resize: $direction; // Options: horizontal, vertical, both 6 | } 7 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Visibility 4 | 5 | @mixin invisible($visibility) { 6 | visibility: $visibility !important; 7 | @include deprecate("`invisible()`", "v4.3.0", "v5"); 8 | } 9 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Visibility utilities 5 | // 6 | 7 | .visible { 8 | visibility: visible !important; 9 | } 10 | 11 | .invisible { 12 | visibility: hidden !important; 13 | } 14 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/UpdateProfileModel.cs: -------------------------------------------------------------------------------- 1 | namespace IdentityServer.Quickstart.Account 2 | { 3 | public class UpdateProfileModel 4 | { 5 | public string CurrentUserName { get; set; } 6 | public string NewUserName { get; set; } 7 | public string Email { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /React/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | "plugins": [ 4 | "transform-class-properties", 5 | "transform-react-jsx", 6 | "transform-object-rest-spread", 7 | ["module-resolver", { 8 | "root": ["./src"] 9 | }], 10 | ["import-rename", {"^(.*)\\.jsx$": "$1"}] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_shadows.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .shadow-sm { box-shadow: $box-shadow-sm !important; } 4 | .shadow { box-shadow: $box-shadow !important; } 5 | .shadow-lg { box-shadow: $box-shadow-lg !important; } 6 | .shadow-none { box-shadow: none !important; } 7 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/UpdatePasswordModel.cs: -------------------------------------------------------------------------------- 1 | namespace IdentityServer.Quickstart.Account 2 | { 3 | public class UpdatePasswordModel 4 | { 5 | public string UserName { get; set; } 6 | public string CurrentPassword { get; set; } 7 | 8 | public string NewPassword { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_alert.scss: -------------------------------------------------------------------------------- 1 | @mixin alert-variant($background, $border, $color) { 2 | color: $color; 3 | @include gradient-bg($background); 4 | border-color: $border; 5 | 6 | hr { 7 | border-top-color: darken($border, 5%); 8 | } 9 | 10 | .alert-link { 11 | color: darken($color, 10%); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /React/src/store.js: -------------------------------------------------------------------------------- 1 | import { createStore, compose } from 'redux'; 2 | import rootReducer from './reducers' 3 | 4 | const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; 5 | const initialState = {} 6 | 7 | const store = createStore( 8 | rootReducer, 9 | initialState, 10 | composeEnhancers() 11 | ) 12 | 13 | export default store; -------------------------------------------------------------------------------- /React/src/utils/authProvider.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useRef } from 'react'; 2 | 3 | export default function AuthProvider({ userManager: manager, store, children }) { 4 | 5 | let userManager = useRef(); 6 | 7 | useEffect(() => { 8 | userManager.current = manager 9 | }, [manager, store]); 10 | 11 | return ( 12 | React.Children.only(children) 13 | ) 14 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_transitions.scss: -------------------------------------------------------------------------------- 1 | .fade { 2 | @include transition($transition-fade); 3 | 4 | &:not(.show) { 5 | opacity: 0; 6 | } 7 | } 8 | 9 | .collapse { 10 | &:not(.show) { 11 | display: none; 12 | } 13 | } 14 | 15 | .collapsing { 16 | position: relative; 17 | height: 0; 18 | overflow: hidden; 19 | @include transition($transition-collapse); 20 | } 21 | -------------------------------------------------------------------------------- /React/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/LogoutInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class LogoutInputModel 8 | { 9 | public string LogoutId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/RedirectViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | 6 | namespace IdentityServerHost.Quickstart.UI 7 | { 8 | public class RedirectViewModel 9 | { 10 | public string RedirectUrl { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 1 | .body-container{margin-top:60px;padding-bottom:40px;}.welcome-page li{list-style:none;padding:4px;}.logged-out-page iframe{display:none;width:0;height:0;}.grants-page .card{margin-top:20px;border-bottom:1px solid #d3d3d3;}.grants-page .card .card-title{font-size:120%;font-weight:bold;}.grants-page .card .card-title img{width:100px;height:100px;}.grants-page .card label{font-weight:bold;} -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_text-hide.scss: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | @mixin text-hide($ignore-warning: false) { 3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword 4 | font: 0/0 a; 5 | color: transparent; 6 | text-shadow: none; 7 | background-color: transparent; 8 | border: 0; 9 | 10 | @include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning); 11 | } 12 | -------------------------------------------------------------------------------- /React/src/assets/github/react.svg: -------------------------------------------------------------------------------- 1 | 2 | React Logo 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /IdentityServer/Views/Shared/Redirect.cshtml: -------------------------------------------------------------------------------- 1 | @model RedirectViewModel 2 | 3 |
4 |
5 |

You are now being returned to the application

6 |

Once complete, you may close this tab.

7 |
8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/LogoutViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class LogoutViewModel : LogoutInputModel 8 | { 9 | public bool ShowLogoutPrompt { get; set; } = true; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/cardBodyStyle.js: -------------------------------------------------------------------------------- 1 | const cardBodyStyle = { 2 | cardBody: { 3 | padding: "0.9375rem 20px", 4 | flex: "1 1 auto", 5 | WebkitBoxFlex: "1", 6 | position: "relative" 7 | }, 8 | cardBodyPlain: { 9 | paddingLeft: "5px", 10 | paddingRight: "5px" 11 | }, 12 | cardBodyProfile: { 13 | marginTop: "15px" 14 | } 15 | }; 16 | 17 | export default cardBodyStyle; 18 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Device/DeviceAuthorizationInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class DeviceAuthorizationInputModel : ConsentInputModel 8 | { 9 | public string UserCode { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_badge.scss: -------------------------------------------------------------------------------- 1 | @mixin badge-variant($bg) { 2 | color: color-yiq($bg); 3 | background-color: $bg; 4 | 5 | @at-root a#{&} { 6 | @include hover-focus() { 7 | color: color-yiq($bg); 8 | background-color: darken($bg, 10%); 9 | } 10 | 11 | &:focus, 12 | &.focus { 13 | outline: 0; 14 | box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /React/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: "babel-eslint", 3 | env: { 4 | es6: true, 5 | node: true, 6 | browser: true 7 | }, 8 | parserOptions: { 9 | ecmaVersion: 6, 10 | sourceType: "module", 11 | ecmaFeatures: { 12 | jsx: true 13 | } 14 | }, 15 | plugins: ["react"], 16 | extends: [ 17 | "eslint:recommended", 18 | "plugin:react/recommended", 19 | "plugin:prettier/recommended" 20 | ] 21 | }; 22 | -------------------------------------------------------------------------------- /React/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/ExternalProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class ExternalProvider 8 | { 9 | public string DisplayName { get; set; } 10 | public string AuthenticationScheme { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_nav-divider.scss: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y, $ignore-warning: false) { 6 | height: 0; 7 | margin: $margin-y 0; 8 | overflow: hidden; 9 | border-top: 1px solid $color; 10 | @include deprecate("The `nav-divider()` mixin", "v4.4.0", "v5", $ignore-warning); 11 | } 12 | -------------------------------------------------------------------------------- /React/src/utils/protectedRoute.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Route, Redirect } from 'react-router-dom' 3 | import { useSelector } from 'react-redux' 4 | 5 | function ProtectedRoute({ children, component: Component, ...rest }) { 6 | const user = useSelector(state => state.auth.user) 7 | 8 | return user 9 | ? () 10 | : () 11 | } 12 | 13 | export default ProtectedRoute -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $breakpoint in map-keys($grid-breakpoints) { 4 | @include media-breakpoint-up($breakpoint) { 5 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 6 | 7 | .float#{$infix}-left { float: left !important; } 8 | .float#{$infix}-right { float: right !important; } 9 | .float#{$infix}-none { float: none !important; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /IdentityServer/Views/Account/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @model LogoutViewModel 2 | 3 |
4 |
5 |

Logout

6 |

Would you like to logut of IdentityServer?

7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_transition.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable property-blacklist 2 | @mixin transition($transition...) { 3 | @if $enable-transitions { 4 | @if length($transition) == 0 { 5 | transition: $transition-base; 6 | } @else { 7 | transition: $transition; 8 | } 9 | } 10 | 11 | @if $enable-prefers-reduced-motion-media-query { 12 | @media (prefers-reduced-motion: reduce) { 13 | transition: none; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Device/DeviceAuthorizationViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class DeviceAuthorizationViewModel : ConsentViewModel 8 | { 9 | public string UserCode { get; set; } 10 | public bool ConfirmUserCode { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_align.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .align-baseline { vertical-align: baseline !important; } // Browser default 4 | .align-top { vertical-align: top !important; } 5 | .align-middle { vertical-align: middle !important; } 6 | .align-bottom { vertical-align: bottom !important; } 7 | .align-text-bottom { vertical-align: text-bottom !important; } 8 | .align-text-top { vertical-align: text-top !important; } 9 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @mixin float-left() { 4 | float: left !important; 5 | @include deprecate("The `float-left` mixin", "v4.3.0", "v5"); 6 | } 7 | @mixin float-right() { 8 | float: right !important; 9 | @include deprecate("The `float-right` mixin", "v4.3.0", "v5"); 10 | } 11 | @mixin float-none() { 12 | float: none !important; 13 | @include deprecate("The `float-none` mixin", "v4.3.0", "v5"); 14 | } 15 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/bootstrap-reboot.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | 9 | @import "functions"; 10 | @import "variables"; 11 | @import "mixins"; 12 | @import "reboot"; 13 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | padding: $jumbotron-padding ($jumbotron-padding / 2); 3 | margin-bottom: $jumbotron-padding; 4 | color: $jumbotron-color; 5 | background-color: $jumbotron-bg; 6 | @include border-radius($border-radius-lg); 7 | 8 | @include media-breakpoint-up(sm) { 9 | padding: ($jumbotron-padding * 2) $jumbotron-padding; 10 | } 11 | } 12 | 13 | .jumbotron-fluid { 14 | padding-right: 0; 15 | padding-left: 0; 16 | @include border-radius(0); 17 | } 18 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_background.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $color, $value in $theme-colors { 4 | @include bg-variant(".bg-#{$color}", $value, true); 5 | } 6 | 7 | @if $enable-gradients { 8 | @each $color, $value in $theme-colors { 9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 10 | } 11 | } 12 | 13 | .bg-white { 14 | background-color: $white !important; 15 | } 16 | 17 | .bg-transparent { 18 | background-color: transparent !important; 19 | } 20 | -------------------------------------------------------------------------------- /IdentityServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "SelfHost": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "http://localhost:5001" 10 | }, 11 | "Docker": { 12 | "commandName": "Docker", 13 | "launchBrowser": true, 14 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", 15 | "publishAllPorts": true, 16 | "useSSL": true 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_stretched-link.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Stretched link 3 | // 4 | 5 | .stretched-link { 6 | &::after { 7 | position: absolute; 8 | top: 0; 9 | right: 0; 10 | bottom: 0; 11 | left: 0; 12 | z-index: 1; 13 | // Just in case `pointer-events: none` is set on a parent 14 | pointer-events: auto; 15 | content: ""; 16 | // IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color 17 | background-color: rgba(0, 0, 0, 0); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /IdentityServer/Models/ApplicationUser.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | 3 | namespace IdentityServer.Models 4 | { 5 | // Add profile data for application users by adding properties to the ApplicationUser class 6 | public class ApplicationUser : IdentityUser 7 | { 8 | public ApplicationUser() { } 9 | 10 | public ApplicationUser(string email) 11 | { 12 | base.UserName = email; //use the username as email address 13 | base.Email = email; 14 | base.EmailConfirmed = true; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_list-group.scss: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | @mixin list-group-item-variant($state, $background, $color) { 4 | .list-group-item-#{$state} { 5 | color: $color; 6 | background-color: $background; 7 | 8 | &.list-group-item-action { 9 | @include hover-focus() { 10 | color: $color; 11 | background-color: darken($background, 5%); 12 | } 13 | 14 | &.active { 15 | color: $white; 16 | background-color: $color; 17 | border-color: $color; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_text-emphasis.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Typography 4 | 5 | @mixin text-emphasis-variant($parent, $color, $ignore-warning: false) { 6 | #{$parent} { 7 | color: $color !important; 8 | } 9 | @if $emphasized-link-hover-darken-percentage != 0 { 10 | a#{$parent} { 11 | @include hover-focus() { 12 | color: darken($color, $emphasized-link-hover-darken-percentage) !important; 13 | } 14 | } 15 | } 16 | @include deprecate("`text-emphasis-variant()`", "v4.4.0", "v5", $ignore-warning); 17 | } 18 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/RegisterViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace IdentityServer.Quickstart.Account 4 | { 5 | public class RegisterViewModel 6 | { 7 | [Required] 8 | public string Email { get; set; } 9 | [Required] 10 | [DataType(DataType.Password)] 11 | public string Password { get; set; } 12 | [Required] 13 | [DataType(DataType.Password)] 14 | [Compare("Password")] 15 | public string ConfirmPassword { get; set; } 16 | public string ReturnUrl { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_reset-text.scss: -------------------------------------------------------------------------------- 1 | @mixin reset-text() { 2 | font-family: $font-family-base; 3 | // We deliberately do NOT reset font-size or word-wrap. 4 | font-style: normal; 5 | font-weight: $font-weight-normal; 6 | line-height: $line-height-base; 7 | text-align: left; // Fallback for where `start` is not supported 8 | text-align: start; 9 | text-decoration: none; 10 | text-shadow: none; 11 | text-transform: none; 12 | letter-spacing: normal; 13 | word-break: normal; 14 | word-spacing: normal; 15 | white-space: normal; 16 | line-break: auto; 17 | } 18 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { 4 | .page-link { 5 | padding: $padding-y $padding-x; 6 | @include font-size($font-size); 7 | line-height: $line-height; 8 | } 9 | 10 | .page-item { 11 | &:first-child { 12 | .page-link { 13 | @include border-left-radius($border-radius); 14 | } 15 | } 16 | &:last-child { 17 | .page-link { 18 | @include border-right-radius($border-radius); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/align"; 2 | @import "utilities/background"; 3 | @import "utilities/borders"; 4 | @import "utilities/clearfix"; 5 | @import "utilities/display"; 6 | @import "utilities/embed"; 7 | @import "utilities/flex"; 8 | @import "utilities/float"; 9 | @import "utilities/overflow"; 10 | @import "utilities/position"; 11 | @import "utilities/screenreaders"; 12 | @import "utilities/shadows"; 13 | @import "utilities/sizing"; 14 | @import "utilities/stretched-link"; 15 | @import "utilities/spacing"; 16 | @import "utilities/text"; 17 | @import "utilities/visibility"; 18 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_sizing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Width and height 4 | 5 | @each $prop, $abbrev in (width: w, height: h) { 6 | @each $size, $length in $sizes { 7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; } 8 | } 9 | } 10 | 11 | .mw-100 { max-width: 100% !important; } 12 | .mh-100 { max-height: 100% !important; } 13 | 14 | // Viewport additional helpers 15 | 16 | .min-vw-100 { min-width: 100vw !important; } 17 | .min-vh-100 { min-height: 100vh !important; } 18 | 19 | .vw-100 { width: 100vw !important; } 20 | .vh-100 { height: 100vh !important; } 21 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Consent/ScopeViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class ScopeViewModel 8 | { 9 | public string Value { get; set; } 10 | public string DisplayName { get; set; } 11 | public string Description { get; set; } 12 | public bool Emphasize { get; set; } 13 | public bool Required { get; set; } 14 | public bool Checked { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/LoginInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | namespace IdentityServerHost.Quickstart.UI 8 | { 9 | public class LoginInputModel 10 | { 11 | [Required] 12 | public string Username { get; set; } 13 | [Required] 14 | public string Password { get; set; } 15 | public bool RememberLogin { get; set; } 16 | public string ReturnUrl { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Home/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityServer4.Models; 6 | 7 | namespace IdentityServerHost.Quickstart.UI 8 | { 9 | public class ErrorViewModel 10 | { 11 | public ErrorViewModel() 12 | { 13 | } 14 | 15 | public ErrorViewModel(string error) 16 | { 17 | Error = new ErrorMessage { Error = error }; 18 | } 19 | 20 | public ErrorMessage Error { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | identityserver: 5 | image: identityserver 6 | container_name: identityserver 7 | build: 8 | context: ./IdentityServer/ 9 | dockerfile: Dockerfile 10 | ports: 11 | - "5000:5000" 12 | 13 | react: 14 | image: react 15 | container_name: react 16 | build: 17 | context: ./React/ 18 | dockerfile: Dockerfile 19 | command: npm start 20 | ports: 21 | - "3000:3000" 22 | environment: 23 | - REACT_APP_AUTH_SERVER_URL=http://localhost:5000 24 | - REACT_APP_CLIENT_URL=http://localhost:3000 25 | - REACT_APP_CLIENT_ID=react.client -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Consent/ConsentInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System.Collections.Generic; 6 | 7 | namespace IdentityServerHost.Quickstart.UI 8 | { 9 | public class ConsentInputModel 10 | { 11 | public string Button { get; set; } 12 | public IEnumerable ScopesConsented { get; set; } 13 | public bool RememberConsent { get; set; } 14 | public string ReturnUrl { get; set; } 15 | public string Description { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | @if $enable-shadows { 3 | $result: (); 4 | 5 | @if (length($shadow) == 1) { 6 | // We can pass `@include box-shadow(none);` 7 | $result: $shadow; 8 | } @else { 9 | // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;` 10 | @for $i from 1 through length($shadow) { 11 | @if nth($shadow, $i) != "none" { 12 | $result: append($result, nth($shadow, $i), "comma"); 13 | } 14 | } 15 | } 16 | @if (length($result) > 0) { 17 | box-shadow: $result; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_position.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Common values 4 | @each $position in $positions { 5 | .position-#{$position} { position: $position !important; } 6 | } 7 | 8 | // Shorthand 9 | 10 | .fixed-top { 11 | position: fixed; 12 | top: 0; 13 | right: 0; 14 | left: 0; 15 | z-index: $zindex-fixed; 16 | } 17 | 18 | .fixed-bottom { 19 | position: fixed; 20 | right: 0; 21 | bottom: 0; 22 | left: 0; 23 | z-index: $zindex-fixed; 24 | } 25 | 26 | .sticky-top { 27 | @supports (position: sticky) { 28 | position: sticky; 29 | top: 0; 30 | z-index: $zindex-sticky; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_display.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Utilities for common `display` values 5 | // 6 | 7 | @each $breakpoint in map-keys($grid-breakpoints) { 8 | @include media-breakpoint-up($breakpoint) { 9 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 10 | 11 | @each $value in $displays { 12 | .d#{$infix}-#{$value} { display: $value !important; } 13 | } 14 | } 15 | } 16 | 17 | 18 | // 19 | // Utilities for toggling `display` in print 20 | // 21 | 22 | @media print { 23 | @each $value in $displays { 24 | .d-print-#{$value} { display: $value !important; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /React/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "material-dashboard-react", 3 | "homepage": "https://github.com/creativetimofficial/material-dashboard-react", 4 | "authors": [ 5 | "creative-tim" 6 | ], 7 | "description": "A Badass Material-UI Kit based on Material Design", 8 | "main": "public/index.html", 9 | "keywords": [ 10 | "material", 11 | "design", 12 | "material-ui", 13 | "material", 14 | "design", 15 | "google", 16 | "twitter" 17 | ], 18 | "license": "Creative TIM License", 19 | "ignore": [ 20 | "**/.*", 21 | "node_modules", 22 | "bower_components", 23 | "test", 24 | "tests", 25 | "build" 26 | ], 27 | "private": true 28 | } 29 | -------------------------------------------------------------------------------- /React/src/components/Typography/Info.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | // @material-ui/core components 4 | import { makeStyles } from "@material-ui/core/styles"; 5 | // core components 6 | import styles from "assets/jss/material-dashboard-react/components/typographyStyle.js"; 7 | 8 | const useStyles = makeStyles(styles); 9 | 10 | export default function Info(props) { 11 | const classes = useStyles(); 12 | const { children } = props; 13 | return ( 14 |
15 | {children} 16 |
17 | ); 18 | } 19 | 20 | Info.propTypes = { 21 | children: PropTypes.node 22 | }; 23 | -------------------------------------------------------------------------------- /React/src/components/Typography/Muted.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | // @material-ui/core components 4 | import { makeStyles } from "@material-ui/core/styles"; 5 | // core components 6 | import styles from "assets/jss/material-dashboard-react/components/typographyStyle.js"; 7 | 8 | const useStyles = makeStyles(styles); 9 | 10 | export default function Muted(props) { 11 | const classes = useStyles(); 12 | const { children } = props; 13 | return ( 14 |
15 | {children} 16 |
17 | ); 18 | } 19 | 20 | Muted.propTypes = { 21 | children: PropTypes.node 22 | }; 23 | -------------------------------------------------------------------------------- /React/src/components/Typography/Danger.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | // @material-ui/core components 4 | import { makeStyles } from "@material-ui/core/styles"; 5 | // core components 6 | import styles from "assets/jss/material-dashboard-react/components/typographyStyle.js"; 7 | 8 | const useStyles = makeStyles(styles); 9 | 10 | export default function Danger(props) { 11 | const classes = useStyles(); 12 | const { children } = props; 13 | return ( 14 |
15 | {children} 16 |
17 | ); 18 | } 19 | 20 | Danger.propTypes = { 21 | children: PropTypes.node 22 | }; 23 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_deprecate.scss: -------------------------------------------------------------------------------- 1 | // Deprecate mixin 2 | // 3 | // This mixin can be used to deprecate mixins or functions. 4 | // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to 5 | // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap) 6 | @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) { 7 | @if ($enable-deprecation-messages != false and $ignore-warning != true) { 8 | @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}."; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /React/src/components/Typography/Primary.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | // @material-ui/core components 4 | import { makeStyles } from "@material-ui/core/styles"; 5 | // core components 6 | import styles from "assets/jss/material-dashboard-react/components/typographyStyle.js"; 7 | 8 | const useStyles = makeStyles(styles); 9 | 10 | export default function Primary(props) { 11 | const classes = useStyles(); 12 | const { children } = props; 13 | return ( 14 |
15 | {children} 16 |
17 | ); 18 | } 19 | 20 | Primary.propTypes = { 21 | children: PropTypes.node 22 | }; 23 | -------------------------------------------------------------------------------- /React/src/components/Typography/Success.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | // @material-ui/core components 4 | import { makeStyles } from "@material-ui/core/styles"; 5 | // core components 6 | import styles from "assets/jss/material-dashboard-react/components/typographyStyle.js"; 7 | 8 | const useStyles = makeStyles(styles); 9 | 10 | export default function Success(props) { 11 | const classes = useStyles(); 12 | const { children } = props; 13 | return ( 14 |
15 | {children} 16 |
17 | ); 18 | } 19 | 20 | Success.propTypes = { 21 | children: PropTypes.node 22 | }; 23 | -------------------------------------------------------------------------------- /React/src/components/Typography/Warning.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | // @material-ui/core components 4 | import { makeStyles } from "@material-ui/core/styles"; 5 | // core components 6 | import styles from "assets/jss/material-dashboard-react/components/typographyStyle.js"; 7 | 8 | const useStyles = makeStyles(styles); 9 | 10 | export default function Warning(props) { 11 | const classes = useStyles(); 12 | const { children } = props; 13 | return ( 14 |
15 | {children} 16 |
17 | ); 18 | } 19 | 20 | Warning.propTypes = { 21 | children: PropTypes.node 22 | }; 23 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/cardImagesStyles.js: -------------------------------------------------------------------------------- 1 | const cardImagesStyles = { 2 | cardImgTop: { 3 | width: "100%", 4 | borderTopLeftRadius: "calc(.25rem - 1px)", 5 | borderTopRightRadius: "calc(.25rem - 1px)" 6 | }, 7 | cardImgBottom: { 8 | width: "100%", 9 | borderBottomRightRadius: "calc(.25rem - 1px)", 10 | borderBottomLeftRadius: "calc(.25rem - 1px)" 11 | }, 12 | cardImgOverlay: { 13 | position: "absolute", 14 | top: "0", 15 | right: "0", 16 | bottom: "0", 17 | left: "0", 18 | padding: "1.25rem" 19 | }, 20 | cardImg: { 21 | width: "100%", 22 | borderRadius: "calc(.25rem - 1px)" 23 | } 24 | }; 25 | 26 | export default cardImagesStyles; 27 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Contextual backgrounds 4 | 5 | @mixin bg-variant($parent, $color, $ignore-warning: false) { 6 | #{$parent} { 7 | background-color: $color !important; 8 | } 9 | a#{$parent}, 10 | button#{$parent} { 11 | @include hover-focus() { 12 | background-color: darken($color, 10%) !important; 13 | } 14 | } 15 | @include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning); 16 | } 17 | 18 | @mixin bg-gradient-variant($parent, $color) { 19 | #{$parent} { 20 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | .body-container { 2 | margin-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .welcome-page li { 7 | list-style: none; 8 | padding: 4px; 9 | } 10 | 11 | .logged-out-page iframe { 12 | display: none; 13 | width: 0; 14 | height: 0; 15 | } 16 | 17 | .grants-page .card { 18 | margin-top: 20px; 19 | border-bottom: 1px solid lightgray; 20 | } 21 | 22 | .grants-page .card .card-title { 23 | font-size: 120%; 24 | font-weight: bold; 25 | } 26 | 27 | .grants-page .card .card-title img { 28 | width: 100px; 29 | height: 100px; 30 | } 31 | 32 | .grants-page .card label { 33 | font-weight: bold; 34 | } 35 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_root.scss: -------------------------------------------------------------------------------- 1 | // Do not forget to update getting-started/theming.md! 2 | :root { 3 | // Custom variable values only support SassScript inside `#{}`. 4 | @each $color, $value in $colors { 5 | --#{$color}: #{$value}; 6 | } 7 | 8 | @each $color, $value in $theme-colors { 9 | --#{$color}: #{$value}; 10 | } 11 | 12 | @each $bp, $value in $grid-breakpoints { 13 | --breakpoint-#{$bp}: #{$value}; 14 | } 15 | 16 | // Use `inspect` for lists so that quoted items keep the quotes. 17 | // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 18 | --font-family-sans-serif: #{inspect($font-family-sans-serif)}; 19 | --font-family-monospace: #{inspect($font-family-monospace)}; 20 | } 21 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/bootstrap-grid.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grid v4.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | html { 9 | box-sizing: border-box; 10 | -ms-overflow-style: scrollbar; 11 | } 12 | 13 | *, 14 | *::before, 15 | *::after { 16 | box-sizing: inherit; 17 | } 18 | 19 | @import "functions"; 20 | @import "variables"; 21 | 22 | @import "mixins/breakpoints"; 23 | @import "mixins/grid-framework"; 24 | @import "mixins/grid"; 25 | 26 | @import "grid"; 27 | @import "utilities/display"; 28 | @import "utilities/flex"; 29 | @import "utilities/spacing"; 30 | -------------------------------------------------------------------------------- /React/src/components/Grid/GridItem.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library to set properties for components 3 | import PropTypes from "prop-types"; 4 | // @material-ui/core components 5 | import { makeStyles } from "@material-ui/core/styles"; 6 | import Grid from "@material-ui/core/Grid"; 7 | 8 | const styles = { 9 | grid: { 10 | padding: "0 15px !important" 11 | } 12 | }; 13 | 14 | const useStyles = makeStyles(styles); 15 | 16 | export default function GridItem(props) { 17 | const classes = useStyles(); 18 | const { children, ...rest } = props; 19 | return ( 20 | 21 | {children} 22 | 23 | ); 24 | } 25 | 26 | GridItem.propTypes = { 27 | children: PropTypes.node 28 | }; 29 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Consent/ConsentViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System.Collections.Generic; 6 | 7 | namespace IdentityServerHost.Quickstart.UI 8 | { 9 | public class ConsentViewModel : ConsentInputModel 10 | { 11 | public string ClientName { get; set; } 12 | public string ClientUrl { get; set; } 13 | public string ClientLogoUrl { get; set; } 14 | public bool AllowRememberConsent { get; set; } 15 | 16 | public IEnumerable IdentityScopes { get; set; } 17 | public IEnumerable ApiScopes { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /IdentityServer/Views/Device/UserCodeCapture.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 |
4 |
5 |

User Code

6 |

Please enter the code displayed on your device.

7 |
8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 | 16 | 17 |
18 | 19 | 20 |
21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/AccountOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System; 6 | 7 | namespace IdentityServerHost.Quickstart.UI 8 | { 9 | public class AccountOptions 10 | { 11 | public static bool AllowLocalLogin = true; 12 | public static bool AllowRememberLogin = true; 13 | public static TimeSpan RememberMeLoginDuration = TimeSpan.FromDays(30); 14 | 15 | public static bool ShowLogoutPrompt = false; 16 | public static bool AutomaticRedirectAfterSignOut = true; 17 | 18 | public static string InvalidCredentialsErrorMessage = "Invalid username or password"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/LoggedOutViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class LoggedOutViewModel 8 | { 9 | public string PostLogoutRedirectUri { get; set; } 10 | public string ClientName { get; set; } 11 | public string SignOutIframeUrl { get; set; } 12 | 13 | public bool AutomaticRedirectAfterSignOut { get; set; } 14 | 15 | public string LogoutId { get; set; } 16 | public bool TriggerExternalSignout => ExternalAuthenticationScheme != null; 17 | public string ExternalAuthenticationScheme { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Consent/ProcessConsentResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityServer4.Models; 6 | 7 | namespace IdentityServerHost.Quickstart.UI 8 | { 9 | public class ProcessConsentResult 10 | { 11 | public bool IsRedirect => RedirectUri != null; 12 | public string RedirectUri { get; set; } 13 | public Client Client { get; set; } 14 | 15 | public bool ShowView => ViewModel != null; 16 | public ConsentViewModel ViewModel { get; set; } 17 | 18 | public bool HasValidationError => ValidationError != null; 19 | public string ValidationError { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /React/src/components/Grid/GridContainer.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library to set properties for components 3 | import PropTypes from "prop-types"; 4 | // @material-ui/core components 5 | import { makeStyles } from "@material-ui/core/styles"; 6 | import Grid from "@material-ui/core/Grid"; 7 | 8 | const styles = { 9 | grid: { 10 | margin: "0 -15px !important", 11 | width: "unset" 12 | } 13 | }; 14 | 15 | const useStyles = makeStyles(styles); 16 | 17 | export default function GridContainer(props) { 18 | const classes = useStyles(); 19 | const { children, ...rest } = props; 20 | return ( 21 | 22 | {children} 23 | 24 | ); 25 | } 26 | 27 | GridContainer.propTypes = { 28 | children: PropTypes.node 29 | }; 30 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/css/site.scss: -------------------------------------------------------------------------------- 1 | .body-container { 2 | margin-top: 60px; 3 | padding-bottom:40px; 4 | } 5 | 6 | .welcome-page { 7 | li { 8 | list-style: none; 9 | padding: 4px; 10 | } 11 | } 12 | 13 | .logged-out-page { 14 | iframe { 15 | display: none; 16 | width: 0; 17 | height: 0; 18 | } 19 | } 20 | 21 | .grants-page { 22 | .card { 23 | margin-top: 20px; 24 | border-bottom: 1px solid lightgray; 25 | 26 | .card-title { 27 | img { 28 | width: 100px; 29 | height: 100px; 30 | } 31 | 32 | font-size: 120%; 33 | font-weight: bold; 34 | } 35 | 36 | label { 37 | font-weight: bold; 38 | } 39 | } 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Consent/ConsentOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public class ConsentOptions 8 | { 9 | public static bool EnableOfflineAccess = true; 10 | public static string OfflineAccessDisplayName = "Offline Access"; 11 | public static string OfflineAccessDescription = "Access to your applications and resources, even when you are offline"; 12 | 13 | public static readonly string MustChooseOneErrorMessage = "You must pick at least one permission"; 14 | public static readonly string InvalidSelectionErrorMessage = "Invalid selection"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /React/src/components/Typography/Quote.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | // @material-ui/core components 4 | import { makeStyles } from "@material-ui/core/styles"; 5 | // core components 6 | import styles from "assets/jss/material-dashboard-react/components/typographyStyle.js"; 7 | 8 | const useStyles = makeStyles(styles); 9 | 10 | export default function Quote(props) { 11 | const classes = useStyles(); 12 | const { text, author } = props; 13 | return ( 14 |
15 |

{text}

16 | {author} 17 |
18 | ); 19 | } 20 | 21 | Quote.propTypes = { 22 | text: PropTypes.node, 23 | author: PropTypes.node 24 | }; 25 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/cardIconStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | warningCardHeader, 3 | successCardHeader, 4 | dangerCardHeader, 5 | infoCardHeader, 6 | primaryCardHeader, 7 | roseCardHeader, 8 | grayColor 9 | } from "assets/jss/material-dashboard-react.js"; 10 | 11 | const cardIconStyle = { 12 | cardIcon: { 13 | "&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader": { 14 | borderRadius: "3px", 15 | backgroundColor: grayColor[0], 16 | padding: "15px", 17 | marginTop: "-20px", 18 | marginRight: "15px", 19 | float: "left" 20 | } 21 | }, 22 | warningCardHeader, 23 | successCardHeader, 24 | dangerCardHeader, 25 | infoCardHeader, 26 | primaryCardHeader, 27 | roseCardHeader 28 | }; 29 | 30 | export default cardIconStyle; 31 | -------------------------------------------------------------------------------- /IdentityServer/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base 4 | WORKDIR /app 5 | EXPOSE 5000 6 | 7 | FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build 8 | WORKDIR /src 9 | COPY ["IdentityServer.csproj", "IdentityServer/"] 10 | 11 | RUN dotnet restore "IdentityServer/IdentityServer.csproj" 12 | COPY . IdentityServer 13 | WORKDIR "/src/IdentityServer" 14 | RUN dotnet build "IdentityServer.csproj" -c Release -o /app/build 15 | 16 | FROM build AS publish 17 | RUN dotnet publish "IdentityServer.csproj" -c Release -o /app/publish 18 | 19 | FROM base AS final 20 | WORKDIR /app 21 | COPY --from=publish /app/publish . 22 | ENV ASPNETCORE_URLS http://*:5000 23 | ENTRYPOINT ["dotnet", "IdentityServer.dll"] -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/layouts/adminStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | drawerWidth, 3 | transition, 4 | container 5 | } from "assets/jss/material-dashboard-react.js"; 6 | 7 | const appStyle = theme => ({ 8 | wrapper: { 9 | position: "relative", 10 | top: "0", 11 | height: "100vh" 12 | }, 13 | mainPanel: { 14 | [theme.breakpoints.up("md")]: { 15 | width: `calc(100% - ${drawerWidth}px)` 16 | }, 17 | overflow: "auto", 18 | position: "relative", 19 | float: "right", 20 | ...transition, 21 | maxHeight: "100%", 22 | width: "100%", 23 | overflowScrolling: "touch" 24 | }, 25 | content: { 26 | marginTop: "70px", 27 | padding: "30px 15px", 28 | minHeight: "calc(100vh - 123px)" 29 | }, 30 | container, 31 | map: { 32 | marginTop: "70px" 33 | } 34 | }); 35 | 36 | export default appStyle; 37 | -------------------------------------------------------------------------------- /IdentityServer/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | using IdentityServer.Models; 4 | 5 | namespace IdentityServer.Data 6 | { 7 | public class ApplicationDbContext : IdentityDbContext 8 | { 9 | public ApplicationDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | } 13 | 14 | protected override void OnModelCreating(ModelBuilder builder) 15 | { 16 | base.OnModelCreating(builder); 17 | // Customize the ASP.NET Identity model and override the defaults if needed. 18 | // For example, you can rename the ASP.NET Identity table names and more. 19 | // Add your customizations after calling base.OnModelCreating(builder); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /React/src/reducers/authReducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | USER_SIGNED_OUT, 3 | STORE_USER_ERROR, 4 | USER_EXPIRED, 5 | STORE_USER, 6 | LOADING_USER, 7 | } from "../actions/types"; 8 | 9 | const initialState = { 10 | user: null, 11 | isLoadingUser: false, 12 | }; 13 | 14 | export default function (state = initialState, action) { 15 | switch (action.type) { 16 | case STORE_USER: 17 | return { 18 | ...state, 19 | isLoadingUser: false, 20 | user: action.payload, 21 | }; 22 | case LOADING_USER: 23 | return { 24 | ...state, 25 | isLoadingUser: true, 26 | }; 27 | case USER_EXPIRED: 28 | case STORE_USER_ERROR: 29 | case USER_SIGNED_OUT: 30 | return { 31 | ...state, 32 | user: null, 33 | isLoadingUser: false, 34 | }; 35 | default: 36 | return state; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/layouts/rtlStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | drawerWidth, 3 | transition, 4 | container 5 | } from "assets/jss/material-dashboard-react.js"; 6 | 7 | const appStyle = theme => ({ 8 | wrapper: { 9 | position: "relative", 10 | top: "0", 11 | height: "100vh", 12 | direction: "rtl" 13 | }, 14 | mainPanel: { 15 | [theme.breakpoints.up("md")]: { 16 | width: `calc(100% - ${drawerWidth}px)` 17 | }, 18 | overflow: "auto", 19 | position: "relative", 20 | float: "left", 21 | ...transition, 22 | maxHeight: "100%", 23 | width: "100%", 24 | overflowScrolling: "touch" 25 | }, 26 | content: { 27 | marginTop: "70px", 28 | padding: "30px 15px", 29 | minHeight: "calc(100vh - 123px)" 30 | }, 31 | container, 32 | map: { 33 | marginTop: "70px" 34 | } 35 | }); 36 | 37 | export default appStyle; 38 | -------------------------------------------------------------------------------- /React/src/actions/authActions.js: -------------------------------------------------------------------------------- 1 | import { 2 | STORE_USER, 3 | USER_SIGNED_OUT, 4 | USER_EXPIRED, 5 | STORE_USER_ERROR, 6 | LOADING_USER 7 | } from './types' 8 | import store from "store"; 9 | import { loadUserFromStorage } from "../services/oauth"; 10 | 11 | export function storeUser(user) { 12 | return { 13 | type: STORE_USER, 14 | payload: user 15 | } 16 | } 17 | 18 | export function loadingUser() { 19 | return { 20 | type: LOADING_USER 21 | } 22 | } 23 | 24 | export function storeUserError() { 25 | return { 26 | type: STORE_USER_ERROR 27 | } 28 | } 29 | 30 | export function userExpired() { 31 | return { 32 | type: USER_EXPIRED 33 | } 34 | } 35 | 36 | export function userSignedOut() { 37 | localStorage.removeItem("access_token"); 38 | loadUserFromStorage(store); 39 | return { 40 | type: USER_SIGNED_OUT 41 | } 42 | } -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/cardAvatarStyle.js: -------------------------------------------------------------------------------- 1 | import { hexToRgb, blackColor } from "assets/jss/material-dashboard-react.js"; 2 | 3 | const cardAvatarStyle = { 4 | cardAvatar: { 5 | "&$cardAvatarProfile img": { 6 | width: "100%", 7 | height: "auto" 8 | } 9 | }, 10 | cardAvatarProfile: { 11 | maxWidth: "130px", 12 | maxHeight: "130px", 13 | margin: "-50px auto 0", 14 | borderRadius: "50%", 15 | overflow: "hidden", 16 | padding: "0", 17 | boxShadow: 18 | "0 16px 38px -12px rgba(" + 19 | hexToRgb(blackColor) + 20 | ", 0.56), 0 4px 25px 0px rgba(" + 21 | hexToRgb(blackColor) + 22 | ", 0.12), 0 8px 10px -5px rgba(" + 23 | hexToRgb(blackColor) + 24 | ", 0.2)", 25 | "&$cardAvatarPlain": { 26 | marginTop: "0" 27 | } 28 | }, 29 | cardAvatarPlain: {} 30 | }; 31 | 32 | export default cardAvatarStyle; 33 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_hover.scss: -------------------------------------------------------------------------------- 1 | // Hover mixin and `$enable-hover-media-query` are deprecated. 2 | // 3 | // Originally added during our alphas and maintained during betas, this mixin was 4 | // designed to prevent `:hover` stickiness on iOS-an issue where hover styles 5 | // would persist after initial touch. 6 | // 7 | // For backward compatibility, we've kept these mixins and updated them to 8 | // always return their regular pseudo-classes instead of a shimmed media query. 9 | // 10 | // Issue: https://github.com/twbs/bootstrap/issues/25195 11 | 12 | @mixin hover() { 13 | &:hover { @content; } 14 | } 15 | 16 | @mixin hover-focus() { 17 | &:hover, 18 | &:focus { 19 | @content; 20 | } 21 | } 22 | 23 | @mixin plain-hover-focus() { 24 | &, 25 | &:hover, 26 | &:focus { 27 | @content; 28 | } 29 | } 30 | 31 | @mixin hover-focus-active() { 32 | &:hover, 33 | &:focus, 34 | &:active { 35 | @content; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /React/src/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | ========================================================= 4 | * Material Dashboard React ASP.NET - v1.0.0 based on Material Dashboard React - v1.9.0 5 | ========================================================= 6 | 7 | * Product Page: https://www.creative-tim.com/product/material-dashboard-react-asp-net 8 | * Copyright 2020 Creative Tim (https://www.creative-tim.com) 9 | * Licensed under MIT (https://github.com/creativetimofficial/material-dashboard-react-asp-net/blob/master/LICENSE.md) 10 | 11 | * Coded by Creative Tim 12 | 13 | ========================================================= 14 | 15 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 16 | 17 | */ 18 | import React from "react"; 19 | import ReactDOM from "react-dom"; 20 | 21 | import App from './App'; 22 | 23 | import "assets/css/material-dashboard-react.css?v=1.0.0"; 24 | 25 | ReactDOM.render(, document.getElementById('root')); 26 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Only display content to screen readers 2 | // 3 | // See: https://a11yproject.com/posts/how-to-hide-content/ 4 | // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ 5 | 6 | @mixin sr-only() { 7 | position: absolute; 8 | width: 1px; 9 | height: 1px; 10 | padding: 0; 11 | margin: -1px; // Fix for https://github.com/twbs/bootstrap/issues/25686 12 | overflow: hidden; 13 | clip: rect(0, 0, 0, 0); 14 | white-space: nowrap; 15 | border: 0; 16 | } 17 | 18 | // Use in conjunction with .sr-only to only display content when it's focused. 19 | // 20 | // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 21 | // 22 | // Credit: HTML5 Boilerplate 23 | 24 | @mixin sr-only-focusable() { 25 | &:active, 26 | &:focus { 27 | position: static; 28 | width: auto; 29 | height: auto; 30 | overflow: visible; 31 | clip: auto; 32 | white-space: normal; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_table-row.scss: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | @mixin table-row-variant($state, $background, $border: null) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table-#{$state} { 7 | &, 8 | > th, 9 | > td { 10 | background-color: $background; 11 | } 12 | 13 | @if $border != null { 14 | th, 15 | td, 16 | thead th, 17 | tbody + tbody { 18 | border-color: $border; 19 | } 20 | } 21 | } 22 | 23 | // Hover states for `.table-hover` 24 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 25 | .table-hover { 26 | $hover-background: darken($background, 5%); 27 | 28 | .table-#{$state} { 29 | @include hover() { 30 | background-color: $hover-background; 31 | 32 | > td, 33 | > th { 34 | background-color: $hover-background; 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Grants/GrantsViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | namespace IdentityServerHost.Quickstart.UI 9 | { 10 | public class GrantsViewModel 11 | { 12 | public IEnumerable Grants { get; set; } 13 | } 14 | 15 | public class GrantViewModel 16 | { 17 | public string ClientId { get; set; } 18 | public string ClientName { get; set; } 19 | public string ClientUrl { get; set; } 20 | public string ClientLogoUrl { get; set; } 21 | public string Description { get; set; } 22 | public DateTime Created { get; set; } 23 | public DateTime? Expires { get; set; } 24 | public IEnumerable IdentityGrantNames { get; set; } 25 | public IEnumerable ApiGrantNames { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /IdentityServer/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | IdentityServer4 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | @RenderBody() 22 |
23 |
24 | 25 | 26 | 27 | 28 | @RenderSection("scripts", required: false) 29 | 30 | 31 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_embed.scss: -------------------------------------------------------------------------------- 1 | // Credit: Nicolas Gallagher and SUIT CSS. 2 | 3 | .embed-responsive { 4 | position: relative; 5 | display: block; 6 | width: 100%; 7 | padding: 0; 8 | overflow: hidden; 9 | 10 | &::before { 11 | display: block; 12 | content: ""; 13 | } 14 | 15 | .embed-responsive-item, 16 | iframe, 17 | embed, 18 | object, 19 | video { 20 | position: absolute; 21 | top: 0; 22 | bottom: 0; 23 | left: 0; 24 | width: 100%; 25 | height: 100%; 26 | border: 0; 27 | } 28 | } 29 | 30 | @each $embed-responsive-aspect-ratio in $embed-responsive-aspect-ratios { 31 | $embed-responsive-aspect-ratio-x: nth($embed-responsive-aspect-ratio, 1); 32 | $embed-responsive-aspect-ratio-y: nth($embed-responsive-aspect-ratio, 2); 33 | 34 | .embed-responsive-#{$embed-responsive-aspect-ratio-x}by#{$embed-responsive-aspect-ratio-y} { 35 | &::before { 36 | padding-top: percentage($embed-responsive-aspect-ratio-y / $embed-responsive-aspect-ratio-x); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/tooltipStyle.js: -------------------------------------------------------------------------------- 1 | import { blackColor, hexToRgb } from "assets/jss/material-dashboard-react.js"; 2 | 3 | const tooltipStyle = { 4 | tooltip: { 5 | padding: "10px 15px", 6 | minWidth: "130px", 7 | lineHeight: "1.7em", 8 | border: "none", 9 | borderRadius: "3px", 10 | boxShadow: 11 | "0 8px 10px 1px rgba(" + 12 | hexToRgb(blackColor) + 13 | ", 0.14), 0 3px 14px 2px rgba(" + 14 | hexToRgb(blackColor) + 15 | ", 0.12), 0 5px 5px -3px rgba(" + 16 | hexToRgb(blackColor) + 17 | ", 0.2)", 18 | maxWidth: "200px", 19 | textAlign: "center", 20 | fontFamily: '"Helvetica Neue",Helvetica,Arial,sans-serif', 21 | fontSize: "12px", 22 | fontStyle: "normal", 23 | fontWeight: "400", 24 | textShadow: "none", 25 | textTransform: "none", 26 | letterSpacing: "normal", 27 | wordBreak: "normal", 28 | wordSpacing: "normal", 29 | wordWrap: "normal", 30 | whiteSpace: "normal", 31 | lineBreak: "auto" 32 | } 33 | }; 34 | export default tooltipStyle; 35 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using IdentityServer4.Models; 3 | using Microsoft.AspNetCore.Mvc; 4 | 5 | namespace IdentityServerHost.Quickstart.UI 6 | { 7 | public static class Extensions 8 | { 9 | /// 10 | /// Checks if the redirect URI is for a native client. 11 | /// 12 | /// 13 | public static bool IsNativeClient(this AuthorizationRequest context) 14 | { 15 | return !context.RedirectUri.StartsWith("https", StringComparison.Ordinal) 16 | && !context.RedirectUri.StartsWith("http", StringComparison.Ordinal); 17 | } 18 | 19 | public static IActionResult LoadingPage(this Controller controller, string viewName, string redirectUri) 20 | { 21 | controller.HttpContext.Response.StatusCode = 200; 22 | controller.HttpContext.Response.Headers["Location"] = ""; 23 | 24 | return controller.View(viewName, new RedirectViewModel { RedirectUrl = redirectUri }); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /IdentityServer/Views/Shared/_Nav.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServer4.Extensions 2 | 3 | @{ 4 | string name = null; 5 | if (!true.Equals(ViewData["signed-out"])) 6 | { 7 | name = Context.User?.GetDisplayName(); 8 | } 9 | } 10 | 11 | 34 | -------------------------------------------------------------------------------- /IdentityServer/Views/Shared/_ScopeListItem.cshtml: -------------------------------------------------------------------------------- 1 | @model ScopeViewModel 2 | 3 |
  • 4 | 24 | @if (Model.Required) 25 | { 26 | (required) 27 | } 28 | @if (Model.Description != null) 29 | { 30 | 33 | } 34 |
  • -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Diagnostics/DiagnosticsController.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNetCore.Authentication; 8 | using Microsoft.AspNetCore.Authorization; 9 | using Microsoft.AspNetCore.Mvc; 10 | 11 | namespace IdentityServerHost.Quickstart.UI 12 | { 13 | [SecurityHeaders] 14 | [Authorize] 15 | public class DiagnosticsController : Controller 16 | { 17 | public async Task Index() 18 | { 19 | var localAddresses = new string[] { "127.0.0.1", "::1", HttpContext.Connection.LocalIpAddress.ToString() }; 20 | if (!localAddresses.Contains(HttpContext.Connection.RemoteIpAddress.ToString())) 21 | { 22 | return NotFound(); 23 | } 24 | 25 | var model = new DiagnosticsViewModel(await HttpContext.AuthenticateAsync()); 26 | return View(model); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Creative Tim 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /React/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Creative Tim 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | @import "functions"; 9 | @import "variables"; 10 | @import "mixins"; 11 | @import "root"; 12 | @import "reboot"; 13 | @import "type"; 14 | @import "images"; 15 | @import "code"; 16 | @import "grid"; 17 | @import "tables"; 18 | @import "forms"; 19 | @import "buttons"; 20 | @import "transitions"; 21 | @import "dropdown"; 22 | @import "button-group"; 23 | @import "input-group"; 24 | @import "custom-forms"; 25 | @import "nav"; 26 | @import "navbar"; 27 | @import "card"; 28 | @import "breadcrumb"; 29 | @import "pagination"; 30 | @import "badge"; 31 | @import "jumbotron"; 32 | @import "alert"; 33 | @import "progress"; 34 | @import "media"; 35 | @import "list-group"; 36 | @import "close"; 37 | @import "toasts"; 38 | @import "modal"; 39 | @import "tooltip"; 40 | @import "popover"; 41 | @import "carousel"; 42 | @import "spinners"; 43 | @import "utilities"; 44 | @import "print"; 45 | -------------------------------------------------------------------------------- /IdentityServer/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | 3 | @{ 4 | var error = Model?.Error?.Error; 5 | var errorDescription = Model?.Error?.ErrorDescription; 6 | var request_id = Model?.Error?.RequestId; 7 | } 8 | 9 |
    10 |
    11 |

    Error

    12 |
    13 | 14 |
    15 |
    16 |
    17 | Sorry, there was an error 18 | 19 | @if (error != null) 20 | { 21 | 22 | 23 | : @error 24 | 25 | 26 | 27 | if (errorDescription != null) 28 | { 29 |
    @errorDescription
    30 | } 31 | } 32 |
    33 | 34 | @if (request_id != null) 35 | { 36 |
    Request Id: @request_id
    37 | } 38 |
    39 |
    40 |
    41 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/views/iconsStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | boxShadow, 3 | whiteColor, 4 | grayColor, 5 | hexToRgb 6 | } from "assets/jss/material-dashboard-react.js"; 7 | 8 | const iconsStyle = { 9 | iframe: { 10 | width: "100%", 11 | height: "500px", 12 | border: "0", 13 | ...boxShadow 14 | }, 15 | iframeContainer: { 16 | margin: "0 -20px 0" 17 | }, 18 | cardCategoryWhite: { 19 | "&,& a,& a:hover,& a:focus": { 20 | color: "rgba(" + hexToRgb(whiteColor) + ",.62)", 21 | margin: "0", 22 | fontSize: "14px", 23 | marginTop: "0", 24 | marginBottom: "0" 25 | }, 26 | "& a,& a:hover,& a:focus": { 27 | color: whiteColor 28 | } 29 | }, 30 | cardTitleWhite: { 31 | color: whiteColor, 32 | marginTop: "0px", 33 | minHeight: "auto", 34 | fontWeight: "300", 35 | fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", 36 | marginBottom: "3px", 37 | textDecoration: "none", 38 | "& small": { 39 | color: grayColor[1], 40 | fontWeight: "400", 41 | lineHeight: "1" 42 | } 43 | } 44 | }; 45 | 46 | export default iconsStyle; 47 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_close.scss: -------------------------------------------------------------------------------- 1 | .close { 2 | float: right; 3 | @include font-size($close-font-size); 4 | font-weight: $close-font-weight; 5 | line-height: 1; 6 | color: $close-color; 7 | text-shadow: $close-text-shadow; 8 | opacity: .5; 9 | 10 | // Override 's hover style 11 | @include hover() { 12 | color: $close-color; 13 | text-decoration: none; 14 | } 15 | 16 | &:not(:disabled):not(.disabled) { 17 | @include hover-focus() { 18 | opacity: .75; 19 | } 20 | } 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | 28 | // stylelint-disable-next-line selector-no-qualifying-type 29 | button.close { 30 | padding: 0; 31 | background-color: transparent; 32 | border: 0; 33 | appearance: none; 34 | } 35 | 36 | // Future-proof disabling of clicks on `` elements 37 | 38 | // stylelint-disable-next-line selector-no-qualifying-type 39 | a.close.disabled { 40 | pointer-events: none; 41 | } 42 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/cardStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | blackColor, 3 | whiteColor, 4 | hexToRgb 5 | } from "assets/jss/material-dashboard-react.js"; 6 | 7 | const cardStyle = { 8 | card: { 9 | border: "0", 10 | marginBottom: "30px", 11 | marginTop: "30px", 12 | borderRadius: "6px", 13 | color: "rgba(" + hexToRgb(blackColor) + ", 0.87)", 14 | background: whiteColor, 15 | width: "100%", 16 | boxShadow: "0 1px 4px 0 rgba(" + hexToRgb(blackColor) + ", 0.14)", 17 | position: "relative", 18 | display: "flex", 19 | flexDirection: "column", 20 | minWidth: "0", 21 | wordWrap: "break-word", 22 | fontSize: ".875rem" 23 | }, 24 | cardPlain: { 25 | background: "transparent", 26 | boxShadow: "none" 27 | }, 28 | cardProfile: { 29 | marginTop: "30px", 30 | textAlign: "center" 31 | }, 32 | cardChart: { 33 | "& p": { 34 | marginTop: "0px", 35 | paddingTop: "0px" 36 | } 37 | }, 38 | cardLogin: { 39 | transform: "translate3d(" + hexToRgb(blackColor) + ")", 40 | transition: "all 300ms linear" 41 | } 42 | }; 43 | 44 | export default cardStyle; 45 | -------------------------------------------------------------------------------- /React/src/variables/general.js: -------------------------------------------------------------------------------- 1 | // ############################## 2 | // // // Tasks for TasksCard - see Dashboard view 3 | // ############################# 4 | 5 | var bugs = [ 6 | 'Sign contract for "What are conference organizers afraid of?"', 7 | "Lines From Great Russian Literature? Or E-mails From My Boss?", 8 | "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", 9 | "Create 4 Invisible User Experiences you Never Knew About" 10 | ]; 11 | var website = [ 12 | "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", 13 | 'Sign contract for "What are conference organizers afraid of?"' 14 | ]; 15 | var server = [ 16 | "Lines From Great Russian Literature? Or E-mails From My Boss?", 17 | "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", 18 | 'Sign contract for "What are conference organizers afraid of?"' 19 | ]; 20 | 21 | module.exports = { 22 | // these 3 are used to create the tasks lists in TasksCard - Dashboard view 23 | bugs, 24 | website, 25 | server 26 | }; 27 | -------------------------------------------------------------------------------- /React/src/components/Card/CardBody.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library that concatenates classes 3 | import classNames from "classnames"; 4 | // nodejs library to set properties for components 5 | import PropTypes from "prop-types"; 6 | // @material-ui/core components 7 | import { makeStyles } from "@material-ui/core/styles"; 8 | // @material-ui/icons 9 | 10 | // core components 11 | import styles from "assets/jss/material-dashboard-react/components/cardBodyStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function CardBody(props) { 16 | const classes = useStyles(); 17 | const { className, children, plain, profile, ...rest } = props; 18 | const cardBodyClasses = classNames({ 19 | [classes.cardBody]: true, 20 | [classes.cardBodyPlain]: plain, 21 | [classes.cardBodyProfile]: profile, 22 | [className]: className !== undefined 23 | }); 24 | return ( 25 |
    26 | {children} 27 |
    28 | ); 29 | } 30 | 31 | CardBody.propTypes = { 32 | className: PropTypes.string, 33 | plain: PropTypes.bool, 34 | profile: PropTypes.bool, 35 | children: PropTypes.node 36 | }; 37 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors, https://js.foundation/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Diagnostics/DiagnosticsViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityModel; 6 | using Microsoft.AspNetCore.Authentication; 7 | using Newtonsoft.Json; 8 | using System.Collections.Generic; 9 | using System.Text; 10 | 11 | namespace IdentityServerHost.Quickstart.UI 12 | { 13 | public class DiagnosticsViewModel 14 | { 15 | public DiagnosticsViewModel(AuthenticateResult result) 16 | { 17 | AuthenticateResult = result; 18 | 19 | if (result.Properties.Items.ContainsKey("client_list")) 20 | { 21 | var encoded = result.Properties.Items["client_list"]; 22 | var bytes = Base64Url.Decode(encoded); 23 | var value = Encoding.UTF8.GetString(bytes); 24 | 25 | Clients = JsonConvert.DeserializeObject(value); 26 | } 27 | } 28 | 29 | public AuthenticateResult AuthenticateResult { get; } 30 | public IEnumerable Clients { get; } = new List(); 31 | } 32 | } -------------------------------------------------------------------------------- /React/src/components/Card/CardAvatar.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library that concatenates classes 3 | import classNames from "classnames"; 4 | // nodejs library to set properties for components 5 | import PropTypes from "prop-types"; 6 | // @material-ui/core components 7 | import { makeStyles } from "@material-ui/core/styles"; 8 | // @material-ui/icons 9 | // core components 10 | 11 | import styles from "assets/jss/material-dashboard-react/components/cardAvatarStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function CardAvatar(props) { 16 | const classes = useStyles(); 17 | const { children, className, plain, profile, ...rest } = props; 18 | const cardAvatarClasses = classNames({ 19 | [classes.cardAvatar]: true, 20 | [classes.cardAvatarProfile]: profile, 21 | [classes.cardAvatarPlain]: plain, 22 | [className]: className !== undefined 23 | }); 24 | return ( 25 |
    26 | {children} 27 |
    28 | ); 29 | } 30 | 31 | CardAvatar.propTypes = { 32 | children: PropTypes.node.isRequired, 33 | className: PropTypes.string, 34 | profile: PropTypes.bool, 35 | plain: PropTypes.bool 36 | }; 37 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_toasts.scss: -------------------------------------------------------------------------------- 1 | .toast { 2 | max-width: $toast-max-width; 3 | overflow: hidden; // cheap rounded corners on nested items 4 | @include font-size($toast-font-size); 5 | color: $toast-color; 6 | background-color: $toast-background-color; 7 | background-clip: padding-box; 8 | border: $toast-border-width solid $toast-border-color; 9 | box-shadow: $toast-box-shadow; 10 | backdrop-filter: blur(10px); 11 | opacity: 0; 12 | @include border-radius($toast-border-radius); 13 | 14 | &:not(:last-child) { 15 | margin-bottom: $toast-padding-x; 16 | } 17 | 18 | &.showing { 19 | opacity: 1; 20 | } 21 | 22 | &.show { 23 | display: block; 24 | opacity: 1; 25 | } 26 | 27 | &.hide { 28 | display: none; 29 | } 30 | } 31 | 32 | .toast-header { 33 | display: flex; 34 | align-items: center; 35 | padding: $toast-padding-y $toast-padding-x; 36 | color: $toast-header-color; 37 | background-color: $toast-header-background-color; 38 | background-clip: padding-box; 39 | border-bottom: $toast-border-width solid $toast-header-border-color; 40 | } 41 | 42 | .toast-body { 43 | padding: $toast-padding-x; // apply to both vertical and horizontal 44 | } 45 | -------------------------------------------------------------------------------- /React/src/components/Card/CardIcon.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library that concatenates classes 3 | import classNames from "classnames"; 4 | // nodejs library to set properties for components 5 | import PropTypes from "prop-types"; 6 | // @material-ui/core components 7 | import { makeStyles } from "@material-ui/core/styles"; 8 | // @material-ui/icons 9 | 10 | // core components 11 | import styles from "assets/jss/material-dashboard-react/components/cardIconStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function CardIcon(props) { 16 | const classes = useStyles(); 17 | const { className, children, color, ...rest } = props; 18 | const cardIconClasses = classNames({ 19 | [classes.cardIcon]: true, 20 | [classes[color + "CardHeader"]]: color, 21 | [className]: className !== undefined 22 | }); 23 | return ( 24 |
    25 | {children} 26 |
    27 | ); 28 | } 29 | 30 | CardIcon.propTypes = { 31 | className: PropTypes.string, 32 | color: PropTypes.oneOf([ 33 | "warning", 34 | "success", 35 | "danger", 36 | "info", 37 | "primary", 38 | "rose" 39 | ]), 40 | children: PropTypes.node 41 | }; 42 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | 9 | namespace IdentityServerHost.Quickstart.UI 10 | { 11 | public class LoginViewModel : LoginInputModel 12 | { 13 | public bool AllowRememberLogin { get; set; } = true; 14 | public bool EnableLocalLogin { get; set; } = true; 15 | 16 | public IEnumerable ExternalProviders { get; set; } = Enumerable.Empty(); 17 | public IEnumerable VisibleExternalProviders => ExternalProviders.Where(x => !String.IsNullOrWhiteSpace(x.DisplayName)); 18 | 19 | public bool IsExternalLoginOnly => EnableLocalLogin == false && ExternalProviders?.Count() == 1; 20 | public string ExternalLoginScheme => IsExternalLoginOnly ? ExternalProviders?.SingleOrDefault()?.AuthenticationScheme : null; 21 | 22 | public string ClientUri { get; set; } 23 | public string ClientRegisterUrl { get { return $"{ClientUri}/register"; } } 24 | } 25 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_code.scss: -------------------------------------------------------------------------------- 1 | // Inline code 2 | code { 3 | @include font-size($code-font-size); 4 | color: $code-color; 5 | word-wrap: break-word; 6 | 7 | // Streamline the style when inside anchors to avoid broken underline and more 8 | a > & { 9 | color: inherit; 10 | } 11 | } 12 | 13 | // User input typically entered via keyboard 14 | kbd { 15 | padding: $kbd-padding-y $kbd-padding-x; 16 | @include font-size($kbd-font-size); 17 | color: $kbd-color; 18 | background-color: $kbd-bg; 19 | @include border-radius($border-radius-sm); 20 | @include box-shadow($kbd-box-shadow); 21 | 22 | kbd { 23 | padding: 0; 24 | @include font-size(100%); 25 | font-weight: $nested-kbd-font-weight; 26 | @include box-shadow(none); 27 | } 28 | } 29 | 30 | // Blocks of code 31 | pre { 32 | display: block; 33 | @include font-size($code-font-size); 34 | color: $pre-color; 35 | 36 | // Account for some code outputs that place code tags in pre tags 37 | code { 38 | @include font-size(inherit); 39 | color: inherit; 40 | word-break: normal; 41 | } 42 | } 43 | 44 | // Enable scrollable blocks of code 45 | .pre-scrollable { 46 | max-height: $pre-scrollable-max-height; 47 | overflow-y: scroll; 48 | } 49 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/typographyStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | defaultFont, 3 | primaryColor, 4 | infoColor, 5 | successColor, 6 | warningColor, 7 | dangerColor, 8 | grayColor 9 | } from "assets/jss/material-dashboard-react.js"; 10 | 11 | const typographyStyle = { 12 | defaultFontStyle: { 13 | ...defaultFont, 14 | fontSize: "14px" 15 | }, 16 | defaultHeaderMargins: { 17 | marginTop: "20px", 18 | marginBottom: "10px" 19 | }, 20 | quote: { 21 | padding: "10px 20px", 22 | margin: "0 0 20px", 23 | fontSize: "17.5px", 24 | borderLeft: "5px solid " + grayColor[10] 25 | }, 26 | quoteText: { 27 | margin: "0 0 10px", 28 | fontStyle: "italic" 29 | }, 30 | quoteAuthor: { 31 | display: "block", 32 | fontSize: "80%", 33 | lineHeight: "1.42857143", 34 | color: grayColor[1] 35 | }, 36 | mutedText: { 37 | color: grayColor[1] 38 | }, 39 | primaryText: { 40 | color: primaryColor[0] 41 | }, 42 | infoText: { 43 | color: infoColor[0] 44 | }, 45 | successText: { 46 | color: successColor[0] 47 | }, 48 | warningText: { 49 | color: warningColor[0] 50 | }, 51 | dangerText: { 52 | color: dangerColor[0] 53 | } 54 | }; 55 | 56 | export default typographyStyle; 57 | -------------------------------------------------------------------------------- /IdentityServer/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Diagnostics 2 | 3 | @{ 4 | var version = FileVersionInfo.GetVersionInfo(typeof(IdentityServer4.Hosting.IdentityServerMiddleware).Assembly.Location).ProductVersion.Split('+').First(); 5 | } 6 | 7 |
    8 |

    9 | 10 | Welcome to IdentityServer4 11 | (version @version) 12 |

    13 | 14 |
    32 |
    33 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/footerStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | defaultFont, 3 | container, 4 | primaryColor, 5 | grayColor 6 | } from "assets/jss/material-dashboard-react.js"; 7 | 8 | const footerStyle = { 9 | block: { 10 | color: "inherit", 11 | padding: "15px", 12 | textTransform: "uppercase", 13 | borderRadius: "3px", 14 | textDecoration: "none", 15 | position: "relative", 16 | display: "block", 17 | ...defaultFont, 18 | fontWeight: "500", 19 | fontSize: "12px" 20 | }, 21 | left: { 22 | float: "left!important", 23 | display: "block" 24 | }, 25 | right: { 26 | padding: "15px 0", 27 | margin: "0", 28 | fontSize: "14px", 29 | float: "right!important" 30 | }, 31 | footer: { 32 | bottom: "0", 33 | borderTop: "1px solid " + grayColor[11], 34 | padding: "15px 0", 35 | ...defaultFont 36 | }, 37 | container, 38 | a: { 39 | color: primaryColor, 40 | textDecoration: "none", 41 | backgroundColor: "transparent" 42 | }, 43 | list: { 44 | marginBottom: "0", 45 | padding: "0", 46 | marginTop: "0" 47 | }, 48 | inlineBlock: { 49 | display: "inline-block", 50 | padding: "0px", 51 | width: "auto" 52 | } 53 | }; 54 | export default footerStyle; 55 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Toggles 2 | // 3 | // Used in conjunction with global variables to enable certain theme features. 4 | 5 | // Vendor 6 | @import "vendor/rfs"; 7 | 8 | // Deprecate 9 | @import "mixins/deprecate"; 10 | 11 | // Utilities 12 | @import "mixins/breakpoints"; 13 | @import "mixins/hover"; 14 | @import "mixins/image"; 15 | @import "mixins/badge"; 16 | @import "mixins/resize"; 17 | @import "mixins/screen-reader"; 18 | @import "mixins/size"; 19 | @import "mixins/reset-text"; 20 | @import "mixins/text-emphasis"; 21 | @import "mixins/text-hide"; 22 | @import "mixins/text-truncate"; 23 | @import "mixins/visibility"; 24 | 25 | // Components 26 | @import "mixins/alert"; 27 | @import "mixins/buttons"; 28 | @import "mixins/caret"; 29 | @import "mixins/pagination"; 30 | @import "mixins/lists"; 31 | @import "mixins/list-group"; 32 | @import "mixins/nav-divider"; 33 | @import "mixins/forms"; 34 | @import "mixins/table-row"; 35 | 36 | // Skins 37 | @import "mixins/background-variant"; 38 | @import "mixins/border-radius"; 39 | @import "mixins/box-shadow"; 40 | @import "mixins/gradients"; 41 | @import "mixins/transition"; 42 | 43 | // Layout 44 | @import "mixins/clearfix"; 45 | @import "mixins/grid-framework"; 46 | @import "mixins/grid"; 47 | @import "mixins/float"; 48 | -------------------------------------------------------------------------------- /React/src/components/Card/Card.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library that concatenates classes 3 | import classNames from "classnames"; 4 | // nodejs library to set properties for components 5 | import PropTypes from "prop-types"; 6 | // @material-ui/core components 7 | import { makeStyles } from "@material-ui/core/styles"; 8 | // @material-ui/icons 9 | 10 | // core components 11 | import styles from "assets/jss/material-dashboard-react/components/cardStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function Card(props) { 16 | const classes = useStyles(); 17 | const { className, children, plain, profile, chart, login, ...rest } = props; 18 | const cardClasses = classNames({ 19 | [classes.card]: true, 20 | [classes.cardPlain]: plain, 21 | [classes.cardProfile]: profile, 22 | [classes.cardChart]: chart, 23 | [classes.cardLogin]: login, 24 | [className]: className !== undefined, 25 | }); 26 | return ( 27 |
    28 | {children} 29 |
    30 | ); 31 | } 32 | 33 | Card.propTypes = { 34 | className: PropTypes.string, 35 | plain: PropTypes.bool, 36 | profile: PropTypes.bool, 37 | chart: PropTypes.bool, 38 | login: PropTypes.bool, 39 | children: PropTypes.node, 40 | }; 41 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/views/loginPageStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | containerAuth, 3 | cardTitle, 4 | whiteColor, 5 | grayColor 6 | } from "assets/jss/material-dashboard-react.js"; 7 | 8 | const loginPageStyle = theme => ({ 9 | container: { 10 | ...containerAuth, 11 | zIndex: "4", 12 | [theme.breakpoints.down("sm")]: { 13 | paddingBottom: "100px" 14 | } 15 | }, 16 | cardTitle: { 17 | ...cardTitle, 18 | color: whiteColor 19 | }, 20 | textCenter: { 21 | textAlign: "center" 22 | }, 23 | justifyContentCenter: { 24 | justifyContent: "center !important" 25 | }, 26 | customButtonClass: { 27 | "&,&:focus,&:hover": { 28 | color: whiteColor 29 | }, 30 | marginLeft: "5px", 31 | marginRight: "5px" 32 | }, 33 | inputAdornment: { 34 | marginRight: "18px" 35 | }, 36 | inputAdornmentIcon: { 37 | color: grayColor[6] 38 | }, 39 | cardHidden: { 40 | opacity: "0", 41 | transform: "translate3d(0, -60px, 0)" 42 | }, 43 | cardHeader: { 44 | marginBottom: "20px" 45 | }, 46 | socialLine: { 47 | padding: "0.9375rem 0" 48 | } 49 | }); 50 | 51 | export default loginPageStyle; -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/cardFooterStyle.js: -------------------------------------------------------------------------------- 1 | import { grayColor } from "assets/jss/material-dashboard-react.js"; 2 | 3 | const cardFooterStyle = { 4 | cardFooter: { 5 | padding: "0", 6 | paddingTop: "10px", 7 | margin: "0 15px 10px", 8 | borderRadius: "0", 9 | justifyContent: "space-between", 10 | alignItems: "center", 11 | display: "flex", 12 | backgroundColor: "transparent", 13 | border: "0" 14 | }, 15 | cardFooterProfile: { 16 | marginTop: "-15px" 17 | }, 18 | cardFooterPlain: { 19 | paddingLeft: "5px", 20 | paddingRight: "5px", 21 | backgroundColor: "transparent" 22 | }, 23 | cardFooterStats: { 24 | borderTop: "1px solid " + grayColor[10], 25 | marginTop: "20px", 26 | "& svg": { 27 | position: "relative", 28 | top: "4px", 29 | marginRight: "3px", 30 | marginLeft: "3px", 31 | width: "16px", 32 | height: "16px" 33 | }, 34 | "& .fab,& .fas,& .far,& .fal,& .material-icons": { 35 | fontSize: "16px", 36 | position: "relative", 37 | top: "4px", 38 | marginRight: "3px", 39 | marginLeft: "3px" 40 | } 41 | }, 42 | cardFooterChart: { 43 | borderTop: "1px solid " + grayColor[10] 44 | } 45 | }; 46 | 47 | export default cardFooterStyle; 48 | -------------------------------------------------------------------------------- /React/src/components/InfoArea/InfoArea.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | 4 | // @material-ui/core components 5 | import { makeStyles } from "@material-ui/core/styles"; 6 | 7 | import styles from "assets/jss/material-dashboard-react/components/infoStyle"; 8 | 9 | const useStyles = makeStyles(styles); 10 | 11 | export default function InfoArea(props) { 12 | const classes = useStyles(); 13 | const { title, description, iconColor } = props; 14 | return ( 15 |
    16 |
    17 | 18 |
    19 |
    20 |

    {title}

    21 |

    {description}

    22 |
    23 |
    24 | ); 25 | } 26 | 27 | InfoArea.defaultProps = { 28 | iconColor: "gray" 29 | }; 30 | 31 | InfoArea.propTypes = { 32 | icon: PropTypes.object.isRequired, 33 | title: PropTypes.string.isRequired, 34 | description: PropTypes.string.isRequired, 35 | iconColor: PropTypes.oneOf([ 36 | "primary", 37 | "warning", 38 | "danger", 39 | "success", 40 | "info", 41 | "rose", 42 | "gray" 43 | ]) 44 | }; 45 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/checkboxAdnRadioStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | primaryColor, 3 | blackColor, 4 | hexToRgb 5 | } from "assets/jss/material-dashboard-react.js"; 6 | 7 | const checkboxAdnRadioStyle = { 8 | root: { 9 | padding: "13px", 10 | "&:hover": { 11 | backgroundColor: "unset" 12 | } 13 | }, 14 | labelRoot: { 15 | marginLeft: "-14px" 16 | }, 17 | checked: { 18 | color: primaryColor[0] + "!important" 19 | }, 20 | checkedIcon: { 21 | width: "20px", 22 | height: "20px", 23 | border: "1px solid rgba(" + hexToRgb(blackColor) + ", .54)", 24 | borderRadius: "3px" 25 | }, 26 | uncheckedIcon: { 27 | width: "0px", 28 | height: "0px", 29 | padding: "10px", 30 | border: "1px solid rgba(" + hexToRgb(blackColor) + ", .54)", 31 | borderRadius: "3px" 32 | }, 33 | radio: { 34 | color: primaryColor[0] + "!important" 35 | }, 36 | radioChecked: { 37 | width: "20px", 38 | height: "20px", 39 | border: "1px solid " + primaryColor[0], 40 | borderRadius: "50%" 41 | }, 42 | radioUnchecked: { 43 | width: "0px", 44 | height: "0px", 45 | padding: "10px", 46 | border: "1px solid rgba(" + hexToRgb(blackColor) + ", .54)", 47 | borderRadius: "50%" 48 | } 49 | }; 50 | 51 | export default checkboxAdnRadioStyle; 52 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_spinners.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Rotating border 3 | // 4 | 5 | @keyframes spinner-border { 6 | to { transform: rotate(360deg); } 7 | } 8 | 9 | .spinner-border { 10 | display: inline-block; 11 | width: $spinner-width; 12 | height: $spinner-height; 13 | vertical-align: text-bottom; 14 | border: $spinner-border-width solid currentColor; 15 | border-right-color: transparent; 16 | // stylelint-disable-next-line property-blacklist 17 | border-radius: 50%; 18 | animation: spinner-border .75s linear infinite; 19 | } 20 | 21 | .spinner-border-sm { 22 | width: $spinner-width-sm; 23 | height: $spinner-height-sm; 24 | border-width: $spinner-border-width-sm; 25 | } 26 | 27 | // 28 | // Growing circle 29 | // 30 | 31 | @keyframes spinner-grow { 32 | 0% { 33 | transform: scale(0); 34 | } 35 | 50% { 36 | opacity: 1; 37 | } 38 | } 39 | 40 | .spinner-grow { 41 | display: inline-block; 42 | width: $spinner-width; 43 | height: $spinner-height; 44 | vertical-align: text-bottom; 45 | background-color: currentColor; 46 | // stylelint-disable-next-line property-blacklist 47 | border-radius: 50%; 48 | opacity: 0; 49 | animation: spinner-grow .75s linear infinite; 50 | } 51 | 52 | .spinner-grow-sm { 53 | width: $spinner-width-sm; 54 | height: $spinner-height-sm; 55 | } 56 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Autocloser 2 | on: [issues] 3 | jobs: 4 | autoclose: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Issue auto-closer 8 | uses: roots/issue-closer-action@v1.1 9 | with: 10 | repo-token: ${{ secrets.GITHUB_TOKEN }} 11 | issue-close-message: "@${issue.user.login} this issue was automatically closed because it did not follow our rules:\n\n
    \n\n\n\nIMPORTANT: Please use the following link to create a new issue:\n\nhttps://www.creative-tim.com/new-issue/material-dashboard-react-aspnet\n\n**If your issue was not created using the app above, it will be closed immediately.**\n\n\n\nLove Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:\n👉  https://www.creative-tim.com/bundles\n👉  https://www.creative-tim.com\n\n\n
    \n\n" 12 | issue-pattern: (\#\#\# Version([\S\s.*]*?)\#\#\# Reproduction link([\S\s.*]*?)\#\#\# Operating System([\S\s.*]*?)\#\#\# Device([\S\s.*]*?)\#\#\# Browser & Version([\S\s.*]*?)\#\#\# Steps to reproduce([\S\s.*]*?)\#\#\# What is expected([\S\s.*]*?)\#\#\# What is actually happening([\S\s.*]*?)---([\S\s.*]*?)\#\#\# Solution([\S\s.*]*?)\#\#\# Additional comments([\S\s.*]*?)\<\!-- generated by creative-tim-issues\. DO NOT REMOVE --\>)|(\#\#\# What is your enhancement([\S\s.*]*?)\<\!-- generated by creative-tim-issues\. DO NOT REMOVE --\>) 13 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_image.scss: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | 10 | @mixin img-fluid() { 11 | // Part 1: Set a maximum relative to the parent 12 | max-width: 100%; 13 | // Part 2: Override the height to auto, otherwise images will be stretched 14 | // when setting a width and height attribute on the img element. 15 | height: auto; 16 | } 17 | 18 | 19 | // Retina image 20 | // 21 | // Short retina mixin for setting background-image and -size. 22 | 23 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { 24 | background-image: url($file-1x); 25 | 26 | // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, 27 | // but doesn't convert dppx=>dpi. 28 | // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. 29 | // Compatibility info: https://caniuse.com/#feat=css-media-resolution 30 | @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx 31 | only screen and (min-resolution: 2dppx) { // Standardized 32 | background-image: url($file-2x); 33 | background-size: $width-1x $height-1x; 34 | } 35 | @include deprecate("`img-retina()`", "v4.3.0", "v5"); 36 | } 37 | -------------------------------------------------------------------------------- /React/src/components/Card/CardFooter.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library that concatenates classes 3 | import classNames from "classnames"; 4 | // nodejs library to set properties for components 5 | import PropTypes from "prop-types"; 6 | // @material-ui/core components 7 | import { makeStyles } from "@material-ui/core/styles"; 8 | // @material-ui/icons 9 | 10 | // core components 11 | import styles from "assets/jss/material-dashboard-react/components/cardFooterStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function CardFooter(props) { 16 | const classes = useStyles(); 17 | const { className, children, plain, profile, stats, chart, ...rest } = props; 18 | const cardFooterClasses = classNames({ 19 | [classes.cardFooter]: true, 20 | [classes.cardFooterPlain]: plain, 21 | [classes.cardFooterProfile]: profile, 22 | [classes.cardFooterStats]: stats, 23 | [classes.cardFooterChart]: chart, 24 | [className]: className !== undefined 25 | }); 26 | return ( 27 |
    28 | {children} 29 |
    30 | ); 31 | } 32 | 33 | CardFooter.propTypes = { 34 | className: PropTypes.string, 35 | plain: PropTypes.bool, 36 | profile: PropTypes.bool, 37 | stats: PropTypes.bool, 38 | chart: PropTypes.bool, 39 | children: PropTypes.node 40 | }; 41 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/PasswordController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | using IdentityServer.Models; 4 | using IdentityServerHost.Quickstart.UI; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | namespace IdentityServer.Quickstart.Account 9 | { 10 | [SecurityHeaders] 11 | public class PasswordController : Controller 12 | { 13 | private readonly UserManager _userManager; 14 | 15 | public PasswordController(UserManager userManager) 16 | { 17 | _userManager = userManager; 18 | } 19 | 20 | [HttpPost] 21 | public async Task Index([FromBody] UpdatePasswordModel updatePasswordModel) 22 | { 23 | 24 | var user = await _userManager.FindByNameAsync(updatePasswordModel.UserName); 25 | 26 | if (user == null) 27 | return NotFound("User not found"); 28 | 29 | var result = await _userManager.ChangePasswordAsync(user, updatePasswordModel.CurrentPassword, updatePasswordModel.NewPassword); 30 | 31 | if (result.Succeeded) 32 | { 33 | return Ok(); 34 | } 35 | 36 | return BadRequest(result.Errors.Select(s => s.Description)); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_images.scss: -------------------------------------------------------------------------------- 1 | // Responsive images (ensure images don't scale beyond their parents) 2 | // 3 | // This is purposefully opt-in via an explicit class rather than being the default for all ``s. 4 | // We previously tried the "images are responsive by default" approach in Bootstrap v2, 5 | // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps) 6 | // which weren't expecting the images within themselves to be involuntarily resized. 7 | // See also https://github.com/twbs/bootstrap/issues/18178 8 | .img-fluid { 9 | @include img-fluid(); 10 | } 11 | 12 | 13 | // Image thumbnails 14 | .img-thumbnail { 15 | padding: $thumbnail-padding; 16 | background-color: $thumbnail-bg; 17 | border: $thumbnail-border-width solid $thumbnail-border-color; 18 | @include border-radius($thumbnail-border-radius); 19 | @include box-shadow($thumbnail-box-shadow); 20 | 21 | // Keep them at most 100% wide 22 | @include img-fluid(); 23 | } 24 | 25 | // 26 | // Figures 27 | // 28 | 29 | .figure { 30 | // Ensures the caption's text aligns with the image. 31 | display: inline-block; 32 | } 33 | 34 | .figure-img { 35 | margin-bottom: $spacer / 2; 36 | line-height: 1; 37 | } 38 | 39 | .figure-caption { 40 | @include font-size($figure-caption-font-size); 41 | color: $figure-caption-color; 42 | } 43 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/infoStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | primaryColor, 3 | warningColor, 4 | dangerColor, 5 | successColor, 6 | infoColor, 7 | roseColor, 8 | grayColor 9 | } from "assets/jss/material-dashboard-react.js"; 10 | 11 | const infoStyle = { 12 | infoArea: { 13 | maxWidth: "360px", 14 | margin: "0 auto", 15 | padding: "0px" 16 | }, 17 | iconWrapper: { 18 | float: "left", 19 | marginTop: "24px", 20 | marginRight: "10px" 21 | }, 22 | primary: { 23 | color: primaryColor[0] 24 | }, 25 | warning: { 26 | color: warningColor[0] 27 | }, 28 | danger: { 29 | color: dangerColor[0] 30 | }, 31 | success: { 32 | color: successColor[0] 33 | }, 34 | info: { 35 | color: infoColor[0] 36 | }, 37 | rose: { 38 | color: roseColor[0] 39 | }, 40 | gray: { 41 | color: grayColor[0] 42 | }, 43 | icon: { 44 | width: "36px", 45 | height: "36px" 46 | }, 47 | descriptionWrapper: { 48 | color: grayColor[0], 49 | overflow: "hidden" 50 | }, 51 | title: { 52 | color: grayColor[2], 53 | margin: "30px 0 15px", 54 | textDecoration: "none", 55 | fontSize: "18px" 56 | }, 57 | description: { 58 | color: grayColor[0], 59 | overflow: "hidden", 60 | marginTop: "0px", 61 | fontSize: "14px" 62 | } 63 | }; 64 | 65 | export default infoStyle; 66 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_progress.scss: -------------------------------------------------------------------------------- 1 | // Disable animation if transitions are disabled 2 | @if $enable-transitions { 3 | @keyframes progress-bar-stripes { 4 | from { background-position: $progress-height 0; } 5 | to { background-position: 0 0; } 6 | } 7 | } 8 | 9 | .progress { 10 | display: flex; 11 | height: $progress-height; 12 | overflow: hidden; // force rounded corners by cropping it 13 | @include font-size($progress-font-size); 14 | background-color: $progress-bg; 15 | @include border-radius($progress-border-radius); 16 | @include box-shadow($progress-box-shadow); 17 | } 18 | 19 | .progress-bar { 20 | display: flex; 21 | flex-direction: column; 22 | justify-content: center; 23 | overflow: hidden; 24 | color: $progress-bar-color; 25 | text-align: center; 26 | white-space: nowrap; 27 | background-color: $progress-bar-bg; 28 | @include transition($progress-bar-transition); 29 | } 30 | 31 | .progress-bar-striped { 32 | @include gradient-striped(); 33 | background-size: $progress-height $progress-height; 34 | } 35 | 36 | @if $enable-transitions { 37 | .progress-bar-animated { 38 | animation: progress-bar-stripes $progress-bar-animation-timing; 39 | 40 | @if $enable-prefers-reduced-motion-media-query { 41 | @media (prefers-reduced-motion: reduce) { 42 | animation: none; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | @include font-size($badge-font-size); 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | @include border-radius($badge-border-radius); 16 | @include transition($badge-transition); 17 | 18 | @at-root a#{&} { 19 | @include hover-focus() { 20 | text-decoration: none; 21 | } 22 | } 23 | 24 | // Empty badges collapse automatically 25 | &:empty { 26 | display: none; 27 | } 28 | } 29 | 30 | // Quick fix for badges in buttons 31 | .btn .badge { 32 | position: relative; 33 | top: -1px; 34 | } 35 | 36 | // Pill badges 37 | // 38 | // Make them extra rounded with a modifier to replace v3's badges. 39 | 40 | .badge-pill { 41 | padding-right: $badge-pill-padding-x; 42 | padding-left: $badge-pill-padding-x; 43 | @include border-radius($badge-pill-border-radius); 44 | } 45 | 46 | // Colors 47 | // 48 | // Contextual variations (linked badges get darker on :hover). 49 | 50 | @each $color, $value in $theme-colors { 51 | .badge-#{$color} { 52 | @include badge-variant($value); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | position: relative; 7 | padding: $alert-padding-y $alert-padding-x; 8 | margin-bottom: $alert-margin-bottom; 9 | border: $alert-border-width solid transparent; 10 | @include border-radius($alert-border-radius); 11 | } 12 | 13 | // Headings for larger alerts 14 | .alert-heading { 15 | // Specified to prevent conflicts of changing $headings-color 16 | color: inherit; 17 | } 18 | 19 | // Provide class for links that match alerts 20 | .alert-link { 21 | font-weight: $alert-link-font-weight; 22 | } 23 | 24 | 25 | // Dismissible alerts 26 | // 27 | // Expand the right padding and account for the close button's positioning. 28 | 29 | .alert-dismissible { 30 | padding-right: $close-font-size + $alert-padding-x * 2; 31 | 32 | // Adjust close link position 33 | .close { 34 | position: absolute; 35 | top: 0; 36 | right: 0; 37 | padding: $alert-padding-y $alert-padding-x; 38 | color: inherit; 39 | } 40 | } 41 | 42 | 43 | // Alternate styles 44 | // 45 | // Generate contextual modifier classes for colorizing the alert. 46 | 47 | @each $color, $value in $theme-colors { 48 | .alert-#{$color} { 49 | @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /IdentityServer/Views/Account/LoggedOut.cshtml: -------------------------------------------------------------------------------- 1 | @model LoggedOutViewModel 2 | 3 | @{ 4 | // set this so the layout rendering sees an anonymous user 5 | ViewData["signed-out"] = true; 6 | } 7 | 8 |
    9 |
    10 |
    11 |
    12 |
    13 |

    14 | Logout 15 | You are now logged out 16 |

    17 | 18 | @if (Model.PostLogoutRedirectUri != null) 19 | { 20 |
    21 | Click here to return to the 22 | @Model.ClientName application. 23 |
    24 | } 25 | 26 | @if (Model.SignOutIframeUrl != null) 27 | { 28 | 29 | } 30 |
    31 |
    32 |
    33 |
    34 |
    35 | 36 | @section scripts 37 | { 38 | @if (Model.AutomaticRedirectAfterSignOut) 39 | { 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /React/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "react"; 2 | import { 3 | BrowserRouter as Router, 4 | Route, 5 | Switch, 6 | Redirect, 7 | } from "react-router-dom"; 8 | import LoginPage from "./views/UserProfile/LoginPage"; 9 | import { Provider } from "react-redux"; 10 | import store from "./store"; 11 | import AuthProvider from "./utils/authProvider"; 12 | import oauth, { loadUserFromStorage } from "./services/oauth"; 13 | import PrivateRoute from "./utils/protectedRoute"; 14 | 15 | // core components 16 | import AuthLayout from "layouts/Auth.js"; 17 | import Admin from "layouts/Admin.js"; 18 | import RTL from "layouts/RTL.js"; 19 | 20 | function App() { 21 | useEffect(() => { 22 | // fetch current user 23 | loadUserFromStorage(store); 24 | }, []); 25 | 26 | return ( 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | ); 44 | } 45 | 46 | export default App; 47 | -------------------------------------------------------------------------------- /React/src/components/Card/CardHeader.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library that concatenates classes 3 | import classNames from "classnames"; 4 | // nodejs library to set properties for components 5 | import PropTypes from "prop-types"; 6 | // @material-ui/core components 7 | import { makeStyles } from "@material-ui/core/styles"; 8 | // @material-ui/icons 9 | 10 | // core components 11 | import styles from "assets/jss/material-dashboard-react/components/cardHeaderStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function CardHeader(props) { 16 | const classes = useStyles(); 17 | const { className, children, color, plain, stats, icon, ...rest } = props; 18 | const cardHeaderClasses = classNames({ 19 | [classes.cardHeader]: true, 20 | [classes[color + "CardHeader"]]: color, 21 | [classes.cardHeaderPlain]: plain, 22 | [classes.cardHeaderStats]: stats, 23 | [classes.cardHeaderIcon]: icon, 24 | [className]: className !== undefined 25 | }); 26 | return ( 27 |
    28 | {children} 29 |
    30 | ); 31 | } 32 | 33 | CardHeader.propTypes = { 34 | className: PropTypes.string, 35 | color: PropTypes.oneOf([ 36 | "warning", 37 | "success", 38 | "danger", 39 | "info", 40 | "primary", 41 | "rose" 42 | ]), 43 | plain: PropTypes.bool, 44 | stats: PropTypes.bool, 45 | icon: PropTypes.bool, 46 | children: PropTypes.node 47 | }; 48 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/tasksStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | defaultFont, 3 | primaryColor, 4 | dangerColor, 5 | grayColor 6 | } from "assets/jss/material-dashboard-react.js"; 7 | import tooltipStyle from "assets/jss/material-dashboard-react/tooltipStyle.js"; 8 | import checkboxAdnRadioStyle from "assets/jss/material-dashboard-react/checkboxAdnRadioStyle.js"; 9 | const tasksStyle = { 10 | ...tooltipStyle, 11 | ...checkboxAdnRadioStyle, 12 | table: { 13 | marginBottom: "0", 14 | overflow: "visible" 15 | }, 16 | tableRow: { 17 | position: "relative", 18 | borderBottom: "1px solid " + grayColor[5] 19 | }, 20 | tableActions: { 21 | display: "flex", 22 | border: "none", 23 | padding: "12px 8px !important", 24 | verticalAlign: "middle" 25 | }, 26 | tableCell: { 27 | ...defaultFont, 28 | padding: "8px", 29 | verticalAlign: "middle", 30 | border: "none", 31 | lineHeight: "1.42857143", 32 | fontSize: "14px" 33 | }, 34 | tableCellRTL: { 35 | textAlign: "right" 36 | }, 37 | tableActionButton: { 38 | width: "27px", 39 | height: "27px", 40 | padding: "0" 41 | }, 42 | tableActionButtonIcon: { 43 | width: "17px", 44 | height: "17px" 45 | }, 46 | edit: { 47 | backgroundColor: "transparent", 48 | color: primaryColor[0], 49 | boxShadow: "none" 50 | }, 51 | close: { 52 | backgroundColor: "transparent", 53 | color: dangerColor[0], 54 | boxShadow: "none" 55 | } 56 | }; 57 | export default tasksStyle; 58 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/layouts/authStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | whiteColor, 3 | blackColor, 4 | hexToRgb 5 | } from "assets/jss/material-dashboard-react.js"; 6 | 7 | const pagesStyle = theme => ({ 8 | wrapper: { 9 | height: "auto", 10 | minHeight: "100vh", 11 | position: "relative", 12 | top: "0" 13 | }, 14 | fullPage: { 15 | padding: "120px 0", 16 | position: "relative", 17 | minHeight: "100vh", 18 | display: "flex!important", 19 | margin: "0", 20 | border: "0", 21 | color: whiteColor, 22 | alignItems: "center", 23 | backgroundSize: "cover", 24 | backgroundPosition: "center center", 25 | height: "100%", 26 | [theme.breakpoints.down("sm")]: { 27 | minHeight: "700px!important" 28 | }, 29 | "& footer": { 30 | position: "absolute", 31 | bottom: "0", 32 | width: "100%", 33 | border: "none !important", 34 | zIndex: 2 35 | }, 36 | "&:before": { 37 | backgroundColor: "rgba(" + hexToRgb(blackColor) + ", 0.65)" 38 | }, 39 | "&:before,&:after": { 40 | display: "block", 41 | content: '""', 42 | position: "absolute", 43 | width: "100%", 44 | height: "100%", 45 | top: "0", 46 | left: "0", 47 | zIndex: "2" 48 | } 49 | } 50 | }); 51 | 52 | export default pagesStyle; 53 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 5 | margin-bottom: $breadcrumb-margin-bottom; 6 | @include font-size($breadcrumb-font-size); 7 | list-style: none; 8 | background-color: $breadcrumb-bg; 9 | @include border-radius($breadcrumb-border-radius); 10 | } 11 | 12 | .breadcrumb-item { 13 | // The separator between breadcrumbs (by default, a forward-slash: "/") 14 | + .breadcrumb-item { 15 | padding-left: $breadcrumb-item-padding; 16 | 17 | &::before { 18 | display: inline-block; // Suppress underlining of the separator in modern browsers 19 | padding-right: $breadcrumb-item-padding; 20 | color: $breadcrumb-divider-color; 21 | content: escape-svg($breadcrumb-divider); 22 | } 23 | } 24 | 25 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 26 | // without `
      `s. The `::before` pseudo-element generates an element 27 | // *within* the .breadcrumb-item and thereby inherits the `text-decoration`. 28 | // 29 | // To trick IE into suppressing the underline, we give the pseudo-element an 30 | // underline and then immediately remove it. 31 | + .breadcrumb-item:hover::before { 32 | text-decoration: underline; 33 | } 34 | // stylelint-disable-next-line no-duplicate-selectors 35 | + .breadcrumb-item:hover::before { 36 | text-decoration: none; 37 | } 38 | 39 | &.active { 40 | color: $breadcrumb-active-color; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/ProfileController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | using IdentityServer.Models; 4 | using IdentityServerHost.Quickstart.UI; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | namespace IdentityServer.Quickstart.Account 9 | { 10 | [SecurityHeaders] 11 | public class ProfileController : Controller 12 | { 13 | private readonly UserManager _userManager; 14 | 15 | public ProfileController(UserManager userManager) 16 | { 17 | _userManager = userManager; 18 | } 19 | 20 | [HttpPost] 21 | public async Task Index([FromBody]UpdateProfileModel updateProfileModel) 22 | { 23 | var user = await _userManager.FindByNameAsync(updateProfileModel.CurrentUserName); 24 | 25 | if (user == null) 26 | return NotFound("User not found"); 27 | 28 | user.Email = updateProfileModel.Email; 29 | user.UserName = updateProfileModel.NewUserName; 30 | 31 | var result = await _userManager.UpdateAsync(user); 32 | 33 | 34 | //TODO - In a production env you would have a flow where your would confirm the password change via email/SMS 35 | 36 | if (result.Succeeded) 37 | { 38 | return Ok(updateProfileModel); 39 | } 40 | 41 | return BadRequest(result.Errors.Select(s => s.Description)); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /IdentityServer/IdentityServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | f410efc0-be0f-42c1-8e21-930a0c70ba8a 6 | Linux 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | all 22 | runtime; build; native; contentfiles; analyzers; buildtransitive 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /IdentityServer/tempkey.jwk: -------------------------------------------------------------------------------- 1 | {"alg":"RS256","d":"I4p802hwTXnlECLEOqqmllPELfh8jhW0GKOPIbw_Hw6W79MsHONlzFmOLjf5v6Gznd-kM5fCihL0XUdaUJNDSPUg8UKx97MoZLdqApZKlNU7W7KDNfKke3C-uj-kDe4DY1Bkq9fMeUm8M0FV3AlHzPQ74qMm3ZLo6lxXVmCsOIAVsZe6QGvrfhnAk4NEC-UFbkXx6133XKPk45GqskC4pTKnBYKrITAnePlVHq4mBnKrvycccxwqtfHA9MEy7NqCdfgAHw3iUbGvb4z2v5465VZt0YMsdrvyWnt7vrz-rgH1I9WUKrSq3t3kcohTKkNJ8DCWWaAQhZaLhhMVPMyn0Q","dp":"WDApA5kdy0lb7yKHaDXVZnbaKtMOodoq93xqO-mUFpwuu-kzFgcApUaV9S2npWI5fx9-v-ga2dqdn1rvTo_Y3758qRnhZDvsI75JJxVbj41NppQdcC9sM7WCkCfnD6lsExTAnKT7shU9RfSb-6dcHncO0Ti_QH3i0YCGiiNdPY8","dq":"jBGZmctElRPMFKk0D0xCcY1UaDbW94PbVyK4T5twhsWCSqi6EtSDlQSmEw52UBrGvr1dZF9auZAo5LQ02zSFLQ3E2h256KFrFtoK6LS0eXJCS5JbojtOx1WzEVzq4N98aoefGMFCzlsQOngytY0frNz4vW0ZVI_E7Vr7bU2SOuM","e":"AQAB","kid":"07D6665D480D49DF27B376469B8DD290","kty":"RSA","n":"oVmYio5b5KiVbCvFye24qHBC_gaSGSaOQ4XZFI9NKeGa0gBagzgDrx_AlMlPOd9JRF3z_6UHn1gASbH3M_OViEVoLFPCVICIncDYqtBabM8hSM-su150uRaGQoHHWg03kI8k48bVPwdC-qLiO21ggnKk1IAiD6MMymV3JWHdHxSjf1xggyApbbF1YHWQ3XJLZ7tVwykI-G8ed2zq7xAzCR_SJzQdmdc97opnYexDenCdrAToH0kYpUYqNDGcmQuaBytX75tj_y5oUuCJTbxt7r7Nh3Rk8gna_T0YWIbzgAqc3q4xwJNylaGiqNY1JOkTVZc7N16MH-JGXySUttgQIQ","p":"wgfL_CI3rXynhn88R08192zNJPmO45FzA-e1v2LTk9ENUD6yHrMlf-LOlssOqYxcqKE2N3VGxi5jSB64zwN1a8-IBPAUMp1mc041LSrvMEyRnygk9VMaJSjViE1GEOaRKbcrNz_m5X6UqH_4Kgm1rK3kWISh0zuy9HgmQCW9tgs","q":"1OHMMSlmQFJEVchCBR6RJC7vmxgOkishPvW-b6VJaNmHr6hai5C8OpXl-7eCFY6WuFyLGOW5cNuIdkp9_KXgP1_0pe--x9cI12q8agdVP0XMFnf6R8sMxhn1P7UgcXpSvC8x-N25buFpRjFvyD2hjr3tXGGd-EbeylY-CoOXigM","qi":"uhB0gqmmLeilnnLns3nO8bRMy2C5Tyjxvnk0XrtGYhzW4Rxu5tQ2c3RxWOO-Xs8FlQ6WNzSSkaeNgSOMrv5EF1z5T88QGxTf4obw6BJ9tRSFco6A1jeoYloSTAWrbT5C8962nFUJ_RWFYEgWtEzK4MQv29z_55aBV5xZEmJj9Xw"} -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_border-radius.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable property-blacklist 2 | // Single side border-radius 3 | 4 | @mixin border-radius($radius: $border-radius, $fallback-border-radius: false) { 5 | @if $enable-rounded { 6 | border-radius: $radius; 7 | } 8 | @else if $fallback-border-radius != false { 9 | border-radius: $fallback-border-radius; 10 | } 11 | } 12 | 13 | @mixin border-top-radius($radius) { 14 | @if $enable-rounded { 15 | border-top-left-radius: $radius; 16 | border-top-right-radius: $radius; 17 | } 18 | } 19 | 20 | @mixin border-right-radius($radius) { 21 | @if $enable-rounded { 22 | border-top-right-radius: $radius; 23 | border-bottom-right-radius: $radius; 24 | } 25 | } 26 | 27 | @mixin border-bottom-radius($radius) { 28 | @if $enable-rounded { 29 | border-bottom-right-radius: $radius; 30 | border-bottom-left-radius: $radius; 31 | } 32 | } 33 | 34 | @mixin border-left-radius($radius) { 35 | @if $enable-rounded { 36 | border-top-left-radius: $radius; 37 | border-bottom-left-radius: $radius; 38 | } 39 | } 40 | 41 | @mixin border-top-left-radius($radius) { 42 | @if $enable-rounded { 43 | border-top-left-radius: $radius; 44 | } 45 | } 46 | 47 | @mixin border-top-right-radius($radius) { 48 | @if $enable-rounded { 49 | border-top-right-radius: $radius; 50 | } 51 | } 52 | 53 | @mixin border-bottom-right-radius($radius) { 54 | @if $enable-rounded { 55 | border-bottom-right-radius: $radius; 56 | } 57 | } 58 | 59 | @mixin border-bottom-left-radius($radius) { 60 | @if $enable-rounded { 61 | border-bottom-left-radius: $radius; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/customInputStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | primaryColor, 3 | dangerColor, 4 | successColor, 5 | grayColor, 6 | defaultFont 7 | } from "assets/jss/material-dashboard-react.js"; 8 | 9 | const customInputStyle = { 10 | disabled: { 11 | "&:before": { 12 | backgroundColor: "transparent !important" 13 | } 14 | }, 15 | underline: { 16 | "&:hover:not($disabled):before,&:before": { 17 | borderColor: grayColor[4] + " !important", 18 | borderWidth: "1px !important" 19 | }, 20 | "&:after": { 21 | borderColor: primaryColor[0] 22 | } 23 | }, 24 | underlineError: { 25 | "&:after": { 26 | borderColor: dangerColor[0] 27 | } 28 | }, 29 | underlineSuccess: { 30 | "&:after": { 31 | borderColor: successColor[0] 32 | } 33 | }, 34 | labelRoot: { 35 | ...defaultFont, 36 | color: grayColor[3] + " !important", 37 | fontWeight: "400", 38 | fontSize: "14px", 39 | lineHeight: "1.42857", 40 | letterSpacing: "unset" 41 | }, 42 | labelRootError: { 43 | color: dangerColor[0] 44 | }, 45 | labelRootSuccess: { 46 | color: successColor[0] 47 | }, 48 | feedback: { 49 | position: "absolute", 50 | top: "18px", 51 | right: "0", 52 | zIndex: "2", 53 | display: "block", 54 | width: "24px", 55 | height: "24px", 56 | textAlign: "center", 57 | pointerEvents: "none" 58 | }, 59 | marginTop: { 60 | marginTop: "16px" 61 | }, 62 | formControl: { 63 | paddingBottom: "10px", 64 | margin: "27px 0 0 0", 65 | position: "relative", 66 | verticalAlign: "unset" 67 | } 68 | }; 69 | 70 | export default customInputStyle; 71 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_caret.scss: -------------------------------------------------------------------------------- 1 | @mixin caret-down() { 2 | border-top: $caret-width solid; 3 | border-right: $caret-width solid transparent; 4 | border-bottom: 0; 5 | border-left: $caret-width solid transparent; 6 | } 7 | 8 | @mixin caret-up() { 9 | border-top: 0; 10 | border-right: $caret-width solid transparent; 11 | border-bottom: $caret-width solid; 12 | border-left: $caret-width solid transparent; 13 | } 14 | 15 | @mixin caret-right() { 16 | border-top: $caret-width solid transparent; 17 | border-right: 0; 18 | border-bottom: $caret-width solid transparent; 19 | border-left: $caret-width solid; 20 | } 21 | 22 | @mixin caret-left() { 23 | border-top: $caret-width solid transparent; 24 | border-right: $caret-width solid; 25 | border-bottom: $caret-width solid transparent; 26 | } 27 | 28 | @mixin caret($direction: down) { 29 | @if $enable-caret { 30 | &::after { 31 | display: inline-block; 32 | margin-left: $caret-spacing; 33 | vertical-align: $caret-vertical-align; 34 | content: ""; 35 | @if $direction == down { 36 | @include caret-down(); 37 | } @else if $direction == up { 38 | @include caret-up(); 39 | } @else if $direction == right { 40 | @include caret-right(); 41 | } 42 | } 43 | 44 | @if $direction == left { 45 | &::after { 46 | display: none; 47 | } 48 | 49 | &::before { 50 | display: inline-block; 51 | margin-right: $caret-spacing; 52 | vertical-align: $caret-vertical-align; 53 | content: ""; 54 | @include caret-left(); 55 | } 56 | } 57 | 58 | &:empty::after { 59 | margin-left: 0; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Account/RegisterController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | using IdentityServer.Models; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Identity; 7 | using Microsoft.AspNetCore.Mvc; 8 | 9 | namespace IdentityServer.Quickstart.Account 10 | { 11 | [AllowAnonymous] 12 | public class RegisterController : Controller 13 | { 14 | private readonly UserManager _userManger; 15 | private readonly SignInManager _signInManager; 16 | 17 | public RegisterController(UserManager userManager, 18 | SignInManager signInManager) 19 | { 20 | _userManger = userManager; 21 | _signInManager = signInManager; 22 | } 23 | 24 | 25 | [HttpGet] 26 | public IActionResult Index() 27 | { 28 | throw new NotImplementedException("Identity Server does not contain register form. Did you mean HTTP POST?"); 29 | } 30 | 31 | [HttpPost] 32 | public async Task Index([FromBody] RegisterViewModel vm) 33 | { 34 | if (!ModelState.IsValid) 35 | return BadRequest("Invalid user"); 36 | 37 | var user = new ApplicationUser(vm.Email); 38 | var result = await _userManger.CreateAsync(user, vm.Password); 39 | 40 | if (result.Succeeded) 41 | { 42 | await _signInManager.SignInAsync(user, false); 43 | 44 | return Ok(vm.ReturnUrl); 45 | } 46 | return BadRequest(result.Errors.Select(s => s.Description)); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/tableStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | warningColor, 3 | primaryColor, 4 | dangerColor, 5 | successColor, 6 | infoColor, 7 | roseColor, 8 | grayColor, 9 | defaultFont 10 | } from "assets/jss/material-dashboard-react.js"; 11 | 12 | const tableStyle = theme => ({ 13 | warningTableHeader: { 14 | color: warningColor[0] 15 | }, 16 | primaryTableHeader: { 17 | color: primaryColor[0] 18 | }, 19 | dangerTableHeader: { 20 | color: dangerColor[0] 21 | }, 22 | successTableHeader: { 23 | color: successColor[0] 24 | }, 25 | infoTableHeader: { 26 | color: infoColor[0] 27 | }, 28 | roseTableHeader: { 29 | color: roseColor[0] 30 | }, 31 | grayTableHeader: { 32 | color: grayColor[0] 33 | }, 34 | table: { 35 | marginBottom: "0", 36 | width: "100%", 37 | maxWidth: "100%", 38 | backgroundColor: "transparent", 39 | borderSpacing: "0", 40 | borderCollapse: "collapse" 41 | }, 42 | tableHeadCell: { 43 | color: "inherit", 44 | ...defaultFont, 45 | "&, &$tableCell": { 46 | fontSize: "1em" 47 | } 48 | }, 49 | tableCell: { 50 | ...defaultFont, 51 | lineHeight: "1.42857143", 52 | padding: "12px 8px", 53 | verticalAlign: "middle", 54 | fontSize: "0.8125rem" 55 | }, 56 | tableResponsive: { 57 | width: "100%", 58 | marginTop: theme.spacing(3), 59 | overflowX: "auto" 60 | }, 61 | tableHeadRow: { 62 | height: "56px", 63 | color: "inherit", 64 | display: "table-row", 65 | outline: "none", 66 | verticalAlign: "middle" 67 | }, 68 | tableBodyRow: { 69 | height: "48px", 70 | color: "inherit", 71 | display: "table-row", 72 | outline: "none", 73 | verticalAlign: "middle" 74 | } 75 | }); 76 | 77 | export default tableStyle; 78 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/customTabsStyle.js: -------------------------------------------------------------------------------- 1 | import { hexToRgb, whiteColor } from "assets/jss/material-dashboard-react.js"; 2 | 3 | const customTabsStyle = { 4 | cardTitle: { 5 | float: "left", 6 | padding: "10px 10px 10px 0px", 7 | lineHeight: "24px" 8 | }, 9 | cardTitleRTL: { 10 | float: "right", 11 | padding: "10px 0px 10px 10px !important" 12 | }, 13 | displayNone: { 14 | display: "none !important" 15 | }, 16 | tabsRoot: { 17 | minHeight: "unset !important", 18 | overflowX: "visible", 19 | "& $tabRootButton": { 20 | fontSize: "0.875rem" 21 | } 22 | }, 23 | tabRootButton: { 24 | minHeight: "unset !important", 25 | minWidth: "unset !important", 26 | width: "unset !important", 27 | height: "unset !important", 28 | maxWidth: "unset !important", 29 | maxHeight: "unset !important", 30 | padding: "10px 15px", 31 | borderRadius: "3px", 32 | lineHeight: "24px", 33 | border: "0 !important", 34 | color: whiteColor + " !important", 35 | marginLeft: "4px", 36 | "&:last-child": { 37 | marginLeft: "0px" 38 | } 39 | }, 40 | tabSelected: { 41 | backgroundColor: "rgba(" + hexToRgb(whiteColor) + ", 0.2)", 42 | transition: "0.2s background-color 0.1s" 43 | }, 44 | tabWrapper: { 45 | display: "inline-block", 46 | minHeight: "unset !important", 47 | minWidth: "unset !important", 48 | width: "unset !important", 49 | height: "unset !important", 50 | maxWidth: "unset !important", 51 | maxHeight: "unset !important", 52 | fontWeight: "500", 53 | fontSize: "12px", 54 | marginTop: "1px", 55 | "& > svg,& > .material-icons": { 56 | verticalAlign: "middle", 57 | margin: "-1px 5px 0 0 !important" 58 | } 59 | } 60 | }; 61 | 62 | export default customTabsStyle; 63 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_grid.scss: -------------------------------------------------------------------------------- 1 | // Container widths 2 | // 3 | // Set the container width, and override it for fixed navbars in media queries. 4 | 5 | @if $enable-grid-classes { 6 | // Single container class with breakpoint max-widths 7 | .container { 8 | @include make-container(); 9 | @include make-container-max-widths(); 10 | } 11 | 12 | // 100% wide container at all breakpoints 13 | .container-fluid { 14 | @include make-container(); 15 | } 16 | 17 | // Responsive containers that are 100% wide until a breakpoint 18 | @each $breakpoint, $container-max-width in $container-max-widths { 19 | .container-#{$breakpoint} { 20 | @extend .container-fluid; 21 | } 22 | 23 | @include media-breakpoint-up($breakpoint, $grid-breakpoints) { 24 | %responsive-container-#{$breakpoint} { 25 | max-width: $container-max-width; 26 | } 27 | 28 | @each $name, $width in $grid-breakpoints { 29 | @if ($container-max-width > $width or $breakpoint == $name) { 30 | .container#{breakpoint-infix($name, $grid-breakpoints)} { 31 | @extend %responsive-container-#{$breakpoint}; 32 | } 33 | } 34 | } 35 | } 36 | } 37 | } 38 | 39 | 40 | // Row 41 | // 42 | // Rows contain your columns. 43 | 44 | @if $enable-grid-classes { 45 | .row { 46 | @include make-row(); 47 | } 48 | 49 | // Remove the negative margin from default .row, then the horizontal padding 50 | // from all immediate children columns (to prevent runaway style inheritance). 51 | .no-gutters { 52 | margin-right: 0; 53 | margin-left: 0; 54 | 55 | > .col, 56 | > [class*="col-"] { 57 | padding-right: 0; 58 | padding-left: 0; 59 | } 60 | } 61 | } 62 | 63 | // Columns 64 | // 65 | // Common styles for small and large grid columns 66 | 67 | @if $enable-grid-classes { 68 | @include make-grid-columns(); 69 | } 70 | -------------------------------------------------------------------------------- /React/src/components/Snackbar/SnackbarContent.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | import classNames from "classnames"; 4 | // @material-ui/core components 5 | import { makeStyles } from "@material-ui/core/styles"; 6 | import Snack from "@material-ui/core/SnackbarContent"; 7 | import IconButton from "@material-ui/core/IconButton"; 8 | // @material-ui/icons 9 | import Close from "@material-ui/icons/Close"; 10 | // core components 11 | import styles from "assets/jss/material-dashboard-react/components/snackbarContentStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function SnackbarContent(props) { 16 | const classes = useStyles(); 17 | const { message, color, close, icon, rtlActive } = props; 18 | var action = []; 19 | const messageClasses = classNames({ 20 | [classes.iconMessage]: icon !== undefined 21 | }); 22 | if (close !== undefined) { 23 | action = [ 24 | 30 | 31 | 32 | ]; 33 | } 34 | return ( 35 | 38 | {icon !== undefined ? : null} 39 | {message} 40 | 41 | } 42 | classes={{ 43 | root: classes.root + " " + classes[color], 44 | message: classes.message, 45 | action: classNames({ [classes.actionRTL]: rtlActive }) 46 | }} 47 | action={action} 48 | /> 49 | ); 50 | } 51 | 52 | SnackbarContent.propTypes = { 53 | message: PropTypes.node.isRequired, 54 | color: PropTypes.oneOf(["info", "success", "warning", "danger", "primary"]), 55 | close: PropTypes.bool, 56 | icon: PropTypes.object, 57 | rtlActive: PropTypes.bool 58 | }; 59 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/components/headerStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | container, 3 | defaultFont, 4 | primaryColor, 5 | defaultBoxShadow, 6 | infoColor, 7 | successColor, 8 | warningColor, 9 | dangerColor, 10 | whiteColor, 11 | grayColor 12 | } from "assets/jss/material-dashboard-react.js"; 13 | 14 | const headerStyle = () => ({ 15 | appBar: { 16 | backgroundColor: "transparent", 17 | boxShadow: "none", 18 | borderBottom: "0", 19 | marginBottom: "0", 20 | position: "absolute", 21 | width: "100%", 22 | paddingTop: "10px", 23 | zIndex: "1029", 24 | color: grayColor[7], 25 | border: "0", 26 | borderRadius: "3px", 27 | padding: "10px 0", 28 | transition: "all 150ms ease 0s", 29 | minHeight: "50px", 30 | display: "block" 31 | }, 32 | container: { 33 | ...container, 34 | minHeight: "50px" 35 | }, 36 | flex: { 37 | flex: 1 38 | }, 39 | title: { 40 | ...defaultFont, 41 | letterSpacing: "unset", 42 | lineHeight: "30px", 43 | fontSize: "18px", 44 | borderRadius: "3px", 45 | textTransform: "none", 46 | color: "inherit", 47 | margin: "0", 48 | "&:hover,&:focus": { 49 | background: "transparent" 50 | } 51 | }, 52 | appResponsive: { 53 | top: "8px" 54 | }, 55 | primary: { 56 | backgroundColor: primaryColor[0], 57 | color: whiteColor, 58 | ...defaultBoxShadow 59 | }, 60 | info: { 61 | backgroundColor: infoColor[0], 62 | color: whiteColor, 63 | ...defaultBoxShadow 64 | }, 65 | success: { 66 | backgroundColor: successColor[0], 67 | color: whiteColor, 68 | ...defaultBoxShadow 69 | }, 70 | warning: { 71 | backgroundColor: warningColor[0], 72 | color: whiteColor, 73 | ...defaultBoxShadow 74 | }, 75 | danger: { 76 | backgroundColor: dangerColor[0], 77 | color: whiteColor, 78 | ...defaultBoxShadow 79 | } 80 | }); 81 | 82 | export default headerStyle; 83 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/views/registerPageStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | container, 3 | cardTitle, 4 | blackColor, 5 | hexToRgb, 6 | grayColor 7 | } from "assets/jss/material-dashboard-react.js"; 8 | 9 | import customCheckboxRadioSwitch from "assets/jss/material-dashboard-react/customCheckboxRadioSwitch.js"; 10 | 11 | const registerPageStyle = { 12 | ...customCheckboxRadioSwitch, 13 | cardTitle: { 14 | ...cardTitle, 15 | textAlign: "center" 16 | }, 17 | container: { 18 | ...container, 19 | position: "relative", 20 | zIndex: "3" 21 | // paddingTop: "23vh" 22 | }, 23 | cardSignup: { 24 | borderRadius: "6px", 25 | boxShadow: 26 | "0 16px 24px 2px rgba(" + 27 | hexToRgb(blackColor) + 28 | ", 0.14), 0 6px 30px 5px rgba(" + 29 | hexToRgb(blackColor) + 30 | ", 0.12), 0 8px 10px -5px rgba(" + 31 | hexToRgb(blackColor) + 32 | ", 0.2)", 33 | marginBottom: "100px", 34 | padding: "40px 0px", 35 | marginTop: "15vh" 36 | }, 37 | center: { 38 | textAlign: "center" 39 | }, 40 | right: { 41 | textAlign: "right" 42 | }, 43 | left: { 44 | textAlign: "left" 45 | }, 46 | form: { 47 | padding: "0 20px", 48 | position: "relative" 49 | }, 50 | socialTitle: { 51 | fontSize: "18px" 52 | }, 53 | inputAdornment: { 54 | marginRight: "18px", 55 | position: "relative" 56 | }, 57 | inputAdornmentIcon: { 58 | color: grayColor[6] 59 | }, 60 | customFormControlClasses: { 61 | margin: "0 12px" 62 | }, 63 | checkboxLabelControl: { 64 | margin: "0" 65 | }, 66 | checkboxLabel: { 67 | fontSize: "0.875rem", 68 | marginLeft: "6px", 69 | color: "rgba(" + hexToRgb(blackColor) + ", 0.26)" 70 | } 71 | }; 72 | 73 | export default registerPageStyle; 74 | -------------------------------------------------------------------------------- /CreativeTim.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30406.217 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer", "IdentityServer\IdentityServer.csproj", "{40296D73-154F-4742-887F-EE700EB4AF95}" 7 | EndProject 8 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "React", "React\React.njsproj", "{64919092-B341-4F4D-A1B1-BE804D307678}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FEED38C9-AE90-49F0-AD72-B613C00B4E37}" 11 | ProjectSection(SolutionItems) = preProject 12 | .dockerignore = .dockerignore 13 | .gitignore = .gitignore 14 | docker-compose.yml = docker-compose.yml 15 | README.md = README.md 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Any CPU = Debug|Any CPU 21 | Release|Any CPU = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {40296D73-154F-4742-887F-EE700EB4AF95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {40296D73-154F-4742-887F-EE700EB4AF95}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {40296D73-154F-4742-887F-EE700EB4AF95}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {40296D73-154F-4742-887F-EE700EB4AF95}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {64919092-B341-4F4D-A1B1-BE804D307678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {64919092-B341-4F4D-A1B1-BE804D307678}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {64919092-B341-4F4D-A1B1-BE804D307678}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {64919092-B341-4F4D-A1B1-BE804D307678}.Release|Any CPU.Build.0 = Release|Any CPU 32 | EndGlobalSection 33 | GlobalSection(SolutionProperties) = preSolution 34 | HideSolutionNode = FALSE 35 | EndGlobalSection 36 | GlobalSection(ExtensibilityGlobals) = postSolution 37 | SolutionGuid = {4954565B-CC09-4D18-A6A1-D9EC5C451E6B} 38 | EndGlobalSection 39 | EndGlobal 40 | -------------------------------------------------------------------------------- /IdentityServer/Config.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityServer4; 6 | using IdentityServer4.Models; 7 | using Microsoft.Extensions.Configuration; 8 | using System.Collections.Generic; 9 | 10 | namespace IdentityServer 11 | { 12 | public static class Config 13 | { 14 | public static IEnumerable IdentityResources => 15 | new IdentityResource[] 16 | { 17 | new IdentityResources.OpenId(), 18 | new IdentityResources.Profile(), 19 | new IdentityResources.Email(), 20 | }; 21 | 22 | public static IEnumerable ApiScopes => 23 | new ApiScope[] 24 | { 25 | //new ApiScope("posts-api", "Posts API"), 26 | }; 27 | 28 | public static IEnumerable Clients(IConfiguration configuration) 29 | { 30 | var reactClientUrl = configuration.GetValue("ReactClientUrl"); 31 | return new Client[] 32 | { 33 | new Client 34 | { 35 | ClientId = "react.client", 36 | ClientName = "Client Credentials Client", 37 | 38 | AllowedGrantTypes = GrantTypes.ResourceOwnerPassword, 39 | RequireClientSecret = false, 40 | RequireConsent = false, 41 | 42 | AllowedScopes = { 43 | IdentityServerConstants.StandardScopes.OpenId, 44 | IdentityServerConstants.StandardScopes.Profile, 45 | IdentityServerConstants.StandardScopes.Email, 46 | }, 47 | AllowedCorsOrigins = { reactClientUrl }, 48 | 49 | AllowAccessTokensViaBrowser = true 50 | } 51 | }; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /React/src/components/Footer/Footer.js: -------------------------------------------------------------------------------- 1 | /*eslint-disable*/ 2 | import React from "react"; 3 | import PropTypes from "prop-types"; 4 | // @material-ui/core components 5 | import { makeStyles } from "@material-ui/core/styles"; 6 | import ListItem from "@material-ui/core/ListItem"; 7 | import List from "@material-ui/core/List"; 8 | // core components 9 | import styles from "assets/jss/material-dashboard-react/components/footerStyle.js"; 10 | 11 | const useStyles = makeStyles(styles); 12 | 13 | export default function Footer(props) { 14 | const classes = useStyles(); 15 | return ( 16 | 57 | ); 58 | } 59 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/_pagination.scss: -------------------------------------------------------------------------------- 1 | .pagination { 2 | display: flex; 3 | @include list-unstyled(); 4 | @include border-radius(); 5 | } 6 | 7 | .page-link { 8 | position: relative; 9 | display: block; 10 | padding: $pagination-padding-y $pagination-padding-x; 11 | margin-left: -$pagination-border-width; 12 | line-height: $pagination-line-height; 13 | color: $pagination-color; 14 | background-color: $pagination-bg; 15 | border: $pagination-border-width solid $pagination-border-color; 16 | 17 | &:hover { 18 | z-index: 2; 19 | color: $pagination-hover-color; 20 | text-decoration: none; 21 | background-color: $pagination-hover-bg; 22 | border-color: $pagination-hover-border-color; 23 | } 24 | 25 | &:focus { 26 | z-index: 3; 27 | outline: $pagination-focus-outline; 28 | box-shadow: $pagination-focus-box-shadow; 29 | } 30 | } 31 | 32 | .page-item { 33 | &:first-child { 34 | .page-link { 35 | margin-left: 0; 36 | @include border-left-radius($border-radius); 37 | } 38 | } 39 | &:last-child { 40 | .page-link { 41 | @include border-right-radius($border-radius); 42 | } 43 | } 44 | 45 | &.active .page-link { 46 | z-index: 3; 47 | color: $pagination-active-color; 48 | background-color: $pagination-active-bg; 49 | border-color: $pagination-active-border-color; 50 | } 51 | 52 | &.disabled .page-link { 53 | color: $pagination-disabled-color; 54 | pointer-events: none; 55 | // Opinionated: remove the "hand" cursor set previously for .page-link 56 | cursor: auto; 57 | background-color: $pagination-disabled-bg; 58 | border-color: $pagination-disabled-border-color; 59 | } 60 | } 61 | 62 | 63 | // 64 | // Sizing 65 | // 66 | 67 | .pagination-lg { 68 | @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg); 69 | } 70 | 71 | .pagination-sm { 72 | @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm); 73 | } 74 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/views/dashboardStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | successColor, 3 | whiteColor, 4 | grayColor, 5 | hexToRgb 6 | } from "assets/jss/material-dashboard-react.js"; 7 | 8 | const dashboardStyle = { 9 | successText: { 10 | color: successColor[0] 11 | }, 12 | upArrowCardCategory: { 13 | width: "16px", 14 | height: "16px" 15 | }, 16 | stats: { 17 | color: grayColor[0], 18 | display: "inline-flex", 19 | fontSize: "12px", 20 | lineHeight: "22px", 21 | "& svg": { 22 | top: "4px", 23 | width: "16px", 24 | height: "16px", 25 | position: "relative", 26 | marginRight: "3px", 27 | marginLeft: "3px" 28 | }, 29 | "& .fab,& .fas,& .far,& .fal,& .material-icons": { 30 | top: "4px", 31 | fontSize: "16px", 32 | position: "relative", 33 | marginRight: "3px", 34 | marginLeft: "3px" 35 | } 36 | }, 37 | cardCategory: { 38 | color: grayColor[0], 39 | margin: "0", 40 | fontSize: "14px", 41 | marginTop: "0", 42 | paddingTop: "10px", 43 | marginBottom: "0" 44 | }, 45 | cardCategoryWhite: { 46 | color: "rgba(" + hexToRgb(whiteColor) + ",.62)", 47 | margin: "0", 48 | fontSize: "14px", 49 | marginTop: "0", 50 | marginBottom: "0" 51 | }, 52 | cardTitle: { 53 | color: grayColor[2], 54 | marginTop: "0px", 55 | minHeight: "auto", 56 | fontWeight: "300", 57 | fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", 58 | marginBottom: "3px", 59 | textDecoration: "none", 60 | "& small": { 61 | color: grayColor[1], 62 | fontWeight: "400", 63 | lineHeight: "1" 64 | } 65 | }, 66 | cardTitleWhite: { 67 | color: whiteColor, 68 | marginTop: "0px", 69 | minHeight: "auto", 70 | fontWeight: "300", 71 | fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", 72 | marginBottom: "3px", 73 | textDecoration: "none", 74 | "& small": { 75 | color: grayColor[1], 76 | fontWeight: "400", 77 | lineHeight: "1" 78 | } 79 | } 80 | }; 81 | 82 | export default dashboardStyle; 83 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_borders.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable property-blacklist, declaration-no-important 2 | 3 | // 4 | // Border 5 | // 6 | 7 | .border { border: $border-width solid $border-color !important; } 8 | .border-top { border-top: $border-width solid $border-color !important; } 9 | .border-right { border-right: $border-width solid $border-color !important; } 10 | .border-bottom { border-bottom: $border-width solid $border-color !important; } 11 | .border-left { border-left: $border-width solid $border-color !important; } 12 | 13 | .border-0 { border: 0 !important; } 14 | .border-top-0 { border-top: 0 !important; } 15 | .border-right-0 { border-right: 0 !important; } 16 | .border-bottom-0 { border-bottom: 0 !important; } 17 | .border-left-0 { border-left: 0 !important; } 18 | 19 | @each $color, $value in $theme-colors { 20 | .border-#{$color} { 21 | border-color: $value !important; 22 | } 23 | } 24 | 25 | .border-white { 26 | border-color: $white !important; 27 | } 28 | 29 | // 30 | // Border-radius 31 | // 32 | 33 | .rounded-sm { 34 | border-radius: $border-radius-sm !important; 35 | } 36 | 37 | .rounded { 38 | border-radius: $border-radius !important; 39 | } 40 | 41 | .rounded-top { 42 | border-top-left-radius: $border-radius !important; 43 | border-top-right-radius: $border-radius !important; 44 | } 45 | 46 | .rounded-right { 47 | border-top-right-radius: $border-radius !important; 48 | border-bottom-right-radius: $border-radius !important; 49 | } 50 | 51 | .rounded-bottom { 52 | border-bottom-right-radius: $border-radius !important; 53 | border-bottom-left-radius: $border-radius !important; 54 | } 55 | 56 | .rounded-left { 57 | border-top-left-radius: $border-radius !important; 58 | border-bottom-left-radius: $border-radius !important; 59 | } 60 | 61 | .rounded-lg { 62 | border-radius: $border-radius-lg !important; 63 | } 64 | 65 | .rounded-circle { 66 | border-radius: 50% !important; 67 | } 68 | 69 | .rounded-pill { 70 | border-radius: $rounded-pill !important; 71 | } 72 | 73 | .rounded-0 { 74 | border-radius: 0 !important; 75 | } 76 | -------------------------------------------------------------------------------- /React/src/assets/jss/material-dashboard-react/views/rtlStyle.js: -------------------------------------------------------------------------------- 1 | import { 2 | successColor, 3 | whiteColor, 4 | grayColor, 5 | hexToRgb 6 | } from "assets/jss/material-dashboard-react.js"; 7 | 8 | const rtlStyle = { 9 | successText: { 10 | color: successColor[0] 11 | }, 12 | upArrowCardCategory: { 13 | width: "16px", 14 | height: "16px" 15 | }, 16 | stats: { 17 | color: grayColor[0], 18 | display: "inline-flex", 19 | fontSize: "12px", 20 | lineHeight: "22px", 21 | "& svg": { 22 | top: "4px", 23 | width: "16px", 24 | height: "16px", 25 | position: "relative", 26 | marginRight: "3px", 27 | marginLeft: "3px" 28 | }, 29 | "& .fab,& .fas,& .far,& .fal,& .material-icons": { 30 | top: "4px", 31 | fontSize: "16px", 32 | position: "relative", 33 | marginRight: "3px", 34 | marginLeft: "3px" 35 | } 36 | }, 37 | cardCategory: { 38 | color: grayColor[0], 39 | margin: "0", 40 | fontSize: "14px", 41 | marginTop: "0", 42 | paddingTop: "10px", 43 | marginBottom: "0" 44 | }, 45 | cardCategoryWhite: { 46 | color: "rgba(" + hexToRgb(whiteColor) + ",.62)", 47 | margin: "0", 48 | fontSize: "14px", 49 | marginTop: "0", 50 | marginBottom: "0", 51 | "& a": { 52 | color: whiteColor 53 | } 54 | }, 55 | cardTitle: { 56 | color: grayColor[2], 57 | marginTop: "0px", 58 | minHeight: "auto", 59 | fontWeight: "300", 60 | fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", 61 | marginBottom: "3px", 62 | textDecoration: "none", 63 | "& small": { 64 | color: grayColor[1], 65 | fontWeight: "400", 66 | lineHeight: "1" 67 | } 68 | }, 69 | cardTitleWhite: { 70 | color: whiteColor, 71 | marginTop: "0px", 72 | minHeight: "auto", 73 | fontWeight: "300", 74 | fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", 75 | marginBottom: "3px", 76 | textDecoration: "none", 77 | "& small": { 78 | color: grayColor[1], 79 | fontWeight: "400", 80 | lineHeight: "1" 81 | } 82 | } 83 | }; 84 | 85 | export default rtlStyle; 86 | -------------------------------------------------------------------------------- /React/src/components/CustomButtons/Button.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | // nodejs library that concatenates classes 3 | import classNames from "classnames"; 4 | // nodejs library to set properties for components 5 | import PropTypes from "prop-types"; 6 | 7 | // material-ui components 8 | import { makeStyles } from "@material-ui/core/styles"; 9 | import Button from "@material-ui/core/Button"; 10 | 11 | import styles from "assets/jss/material-dashboard-react/components/buttonStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function RegularButton(props) { 16 | const classes = useStyles(); 17 | const { 18 | color, 19 | round, 20 | children, 21 | disabled, 22 | simple, 23 | size, 24 | block, 25 | link, 26 | justIcon, 27 | className, 28 | muiClasses, 29 | ...rest 30 | } = props; 31 | const btnClasses = classNames({ 32 | [classes.button]: true, 33 | [classes[size]]: size, 34 | [classes[color]]: color, 35 | [classes.round]: round, 36 | [classes.disabled]: disabled, 37 | [classes.simple]: simple, 38 | [classes.block]: block, 39 | [classes.link]: link, 40 | [classes.justIcon]: justIcon, 41 | [className]: className 42 | }); 43 | return ( 44 | 47 | ); 48 | } 49 | 50 | RegularButton.propTypes = { 51 | color: PropTypes.oneOf([ 52 | "primary", 53 | "info", 54 | "success", 55 | "warning", 56 | "danger", 57 | "rose", 58 | "white", 59 | "twitter", 60 | "facebook", 61 | "google", 62 | "linkedin", 63 | "pinterest", 64 | "youtube", 65 | "tumblr", 66 | "github", 67 | "behance", 68 | "dribbble", 69 | "reddit", 70 | "transparent" 71 | ]), 72 | size: PropTypes.oneOf(["sm", "lg"]), 73 | simple: PropTypes.bool, 74 | round: PropTypes.bool, 75 | disabled: PropTypes.bool, 76 | block: PropTypes.bool, 77 | link: PropTypes.bool, 78 | justIcon: PropTypes.bool, 79 | className: PropTypes.string, 80 | // use this to pass the classes props from Material-UI 81 | muiClasses: PropTypes.object, 82 | children: PropTypes.node 83 | }; 84 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_grid-framework.scss: -------------------------------------------------------------------------------- 1 | // Framework grid generation 2 | // 3 | // Used only by Bootstrap to generate the correct number of grid classes given 4 | // any value of `$grid-columns`. 5 | 6 | @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { 7 | // Common properties for all breakpoints 8 | %grid-column { 9 | position: relative; 10 | width: 100%; 11 | padding-right: $gutter / 2; 12 | padding-left: $gutter / 2; 13 | } 14 | 15 | @each $breakpoint in map-keys($breakpoints) { 16 | $infix: breakpoint-infix($breakpoint, $breakpoints); 17 | 18 | // Allow columns to stretch full width below their breakpoints 19 | @for $i from 1 through $columns { 20 | .col#{$infix}-#{$i} { 21 | @extend %grid-column; 22 | } 23 | } 24 | .col#{$infix}, 25 | .col#{$infix}-auto { 26 | @extend %grid-column; 27 | } 28 | 29 | @include media-breakpoint-up($breakpoint, $breakpoints) { 30 | // Provide basic `.col-{bp}` classes for equal-width flexbox columns 31 | .col#{$infix} { 32 | flex-basis: 0; 33 | flex-grow: 1; 34 | max-width: 100%; 35 | } 36 | 37 | @for $i from 1 through $grid-row-columns { 38 | .row-cols#{$infix}-#{$i} { 39 | @include row-cols($i); 40 | } 41 | } 42 | 43 | .col#{$infix}-auto { 44 | @include make-col-auto(); 45 | } 46 | 47 | @for $i from 1 through $columns { 48 | .col#{$infix}-#{$i} { 49 | @include make-col($i, $columns); 50 | } 51 | } 52 | 53 | .order#{$infix}-first { order: -1; } 54 | 55 | .order#{$infix}-last { order: $columns + 1; } 56 | 57 | @for $i from 0 through $columns { 58 | .order#{$infix}-#{$i} { order: $i; } 59 | } 60 | 61 | // `$columns - 1` because offsetting by the width of an entire row isn't possible 62 | @for $i from 0 through ($columns - 1) { 63 | @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0 64 | .offset#{$infix}-#{$i} { 65 | @include make-col-offset($i, $columns); 66 | } 67 | } 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/jquery/README.md: -------------------------------------------------------------------------------- 1 | # jQuery 2 | 3 | > jQuery is a fast, small, and feature-rich JavaScript library. 4 | 5 | For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/). 6 | For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery). 7 | 8 | If upgrading, please see the [blog post for 3.5.0](https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/). This includes notable differences from the previous version and a more readable changelog. 9 | 10 | ## Including jQuery 11 | 12 | Below are some of the most common ways to include jQuery. 13 | 14 | ### Browser 15 | 16 | #### Script tag 17 | 18 | ```html 19 | 20 | ``` 21 | 22 | #### Babel 23 | 24 | [Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively. 25 | 26 | ```js 27 | import $ from "jquery"; 28 | ``` 29 | 30 | #### Browserify/Webpack 31 | 32 | There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this... 33 | 34 | ```js 35 | var $ = require( "jquery" ); 36 | ``` 37 | 38 | #### AMD (Asynchronous Module Definition) 39 | 40 | AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html). 41 | 42 | ```js 43 | define( [ "jquery" ], function( $ ) { 44 | 45 | } ); 46 | ``` 47 | 48 | ### Node 49 | 50 | To include jQuery in [Node](nodejs.org), first install with npm. 51 | 52 | ```sh 53 | npm install jquery 54 | ``` 55 | 56 | For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes. 57 | 58 | ```js 59 | const { JSDOM } = require( "jsdom" ); 60 | const { window } = new JSDOM( "" ); 61 | const $ = require( "jquery" )( window ); 62 | ``` 63 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_gradients.scss: -------------------------------------------------------------------------------- 1 | // Gradients 2 | 3 | @mixin gradient-bg($color) { 4 | @if $enable-gradients { 5 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x; 6 | } @else { 7 | background-color: $color; 8 | } 9 | } 10 | 11 | // Horizontal gradient, from left to right 12 | // 13 | // Creates two color stops, start and end, by specifying a color and position for each color stop. 14 | @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) { 15 | background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); 16 | background-repeat: repeat-x; 17 | } 18 | 19 | // Vertical gradient, from top to bottom 20 | // 21 | // Creates two color stops, start and end, by specifying a color and position for each color stop. 22 | @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) { 23 | background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); 24 | background-repeat: repeat-x; 25 | } 26 | 27 | @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) { 28 | background-image: linear-gradient($deg, $start-color, $end-color); 29 | background-repeat: repeat-x; 30 | } 31 | @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) { 32 | background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color); 33 | background-repeat: no-repeat; 34 | } 35 | @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) { 36 | background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color); 37 | background-repeat: no-repeat; 38 | } 39 | @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) { 40 | background-image: radial-gradient(circle, $inner-color, $outer-color); 41 | background-repeat: no-repeat; 42 | } 43 | @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) { 44 | background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent); 45 | } 46 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/mixins/_grid.scss: -------------------------------------------------------------------------------- 1 | /// Grid system 2 | // 3 | // Generate semantic grid columns with these mixins. 4 | 5 | @mixin make-container($gutter: $grid-gutter-width) { 6 | width: 100%; 7 | padding-right: $gutter / 2; 8 | padding-left: $gutter / 2; 9 | margin-right: auto; 10 | margin-left: auto; 11 | } 12 | 13 | 14 | // For each breakpoint, define the maximum width of the container in a media query 15 | @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) { 16 | @each $breakpoint, $container-max-width in $max-widths { 17 | @include media-breakpoint-up($breakpoint, $breakpoints) { 18 | max-width: $container-max-width; 19 | } 20 | } 21 | } 22 | 23 | @mixin make-row($gutter: $grid-gutter-width) { 24 | display: flex; 25 | flex-wrap: wrap; 26 | margin-right: -$gutter / 2; 27 | margin-left: -$gutter / 2; 28 | } 29 | 30 | @mixin make-col-ready($gutter: $grid-gutter-width) { 31 | position: relative; 32 | // Prevent columns from becoming too narrow when at smaller grid tiers by 33 | // always setting `width: 100%;`. This works because we use `flex` values 34 | // later on to override this initial width. 35 | width: 100%; 36 | padding-right: $gutter / 2; 37 | padding-left: $gutter / 2; 38 | } 39 | 40 | @mixin make-col($size, $columns: $grid-columns) { 41 | flex: 0 0 percentage($size / $columns); 42 | // Add a `max-width` to ensure content within each column does not blow out 43 | // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari 44 | // do not appear to require this. 45 | max-width: percentage($size / $columns); 46 | } 47 | 48 | @mixin make-col-auto() { 49 | flex: 0 0 auto; 50 | width: auto; 51 | max-width: 100%; // Reset earlier grid tiers 52 | } 53 | 54 | @mixin make-col-offset($size, $columns: $grid-columns) { 55 | $num: $size / $columns; 56 | margin-left: if($num == 0, 0, percentage($num)); 57 | } 58 | 59 | // Row columns 60 | // 61 | // Specify on a parent element(e.g., .row) to force immediate children into NN 62 | // numberof columns. Supports wrapping to new lines, but does not do a Masonry 63 | // style grid. 64 | @mixin row-cols($count) { 65 | & > * { 66 | flex: 0 0 100% / $count; 67 | max-width: 100% / $count; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/Home/HomeController.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityServer4.Services; 6 | using Microsoft.AspNetCore.Authorization; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.AspNetCore.Mvc; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | using System.Threading.Tasks; 12 | 13 | namespace IdentityServerHost.Quickstart.UI 14 | { 15 | [SecurityHeaders] 16 | [AllowAnonymous] 17 | public class HomeController : Controller 18 | { 19 | private readonly IIdentityServerInteractionService _interaction; 20 | private readonly IWebHostEnvironment _environment; 21 | private readonly ILogger _logger; 22 | 23 | public HomeController(IIdentityServerInteractionService interaction, IWebHostEnvironment environment, ILogger logger) 24 | { 25 | _interaction = interaction; 26 | _environment = environment; 27 | _logger = logger; 28 | } 29 | 30 | public IActionResult Index() 31 | { 32 | if (_environment.IsDevelopment()) 33 | { 34 | // only show in development 35 | return View(); 36 | } 37 | 38 | _logger.LogInformation("Homepage is disabled in production. Returning 404."); 39 | return NotFound(); 40 | } 41 | 42 | /// 43 | /// Shows the error page 44 | /// 45 | public async Task Error(string errorId) 46 | { 47 | var vm = new ErrorViewModel(); 48 | 49 | // retrieve error details from identityserver 50 | var message = await _interaction.GetErrorContextAsync(errorId); 51 | if (message != null) 52 | { 53 | vm.Error = message; 54 | 55 | if (!_environment.IsDevelopment()) 56 | { 57 | // only show in development 58 | message.ErrorDescription = null; 59 | } 60 | } 61 | 62 | return View("Error", vm); 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /IdentityServer/Views/Diagnostics/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model DiagnosticsViewModel 2 | 3 |
      4 |
      5 |

      Authentication Cookie

      6 |
      7 | 8 |
      9 |
      10 |
      11 |
      12 |

      Claims

      13 |
      14 |
      15 |
      16 | @foreach (var claim in Model.AuthenticateResult.Principal.Claims) 17 | { 18 |
      @claim.Type
      19 |
      @claim.Value
      20 | } 21 |
      22 |
      23 |
      24 |
      25 | 26 |
      27 |
      28 |
      29 |

      Properties

      30 |
      31 |
      32 |
      33 | @foreach (var prop in Model.AuthenticateResult.Properties.Items) 34 | { 35 |
      @prop.Key
      36 |
      @prop.Value
      37 | } 38 | @if (Model.Clients.Any()) 39 | { 40 |
      Clients
      41 |
      42 | @{ 43 | var clients = Model.Clients.ToArray(); 44 | for(var i = 0; i < clients.Length; i++) 45 | { 46 | @clients[i] 47 | if (i < clients.Length - 1) 48 | { 49 | , 50 | } 51 | } 52 | } 53 |
      54 | } 55 |
      56 |
      57 |
      58 |
      59 |
      60 |
      61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /React/src/services/oauth.js: -------------------------------------------------------------------------------- 1 | import ClientOAuth2 from "client-oauth2"; 2 | import axios from "axios"; 3 | import { setAuthHeader } from "utils/axiosHeaders"; 4 | import { 5 | storeUserError, 6 | storeUser, 7 | userSignedOut, 8 | } from "../actions/authActions"; 9 | import store from "store"; 10 | 11 | const config = { 12 | clientId: "react.client", 13 | accessTokenUri: `${process.env.REACT_APP_AUTH_SERVER_URL}/connect/token`, 14 | userInfoUri: `${process.env.REACT_APP_AUTH_SERVER_URL}/connect/userinfo`, 15 | endsessionUri: `${process.env.REACT_APP_AUTH_SERVER_URL}/connect/endsession`, 16 | introspectURL: `${process.env.REACT_APP_AUTH_SERVER_URL}/connect/introspect`, 17 | scopes: [], 18 | }; 19 | 20 | const oauth = new ClientOAuth2(config); 21 | 22 | export async function loadUserFromStorage(store) { 23 | try { 24 | let user = await userProfile(); 25 | if (!user) { 26 | return store.dispatch(storeUserError()); 27 | } 28 | store.dispatch(storeUser(user.data)); 29 | } catch (e) { 30 | console.error(`User not found: ${e}`); 31 | store.dispatch(storeUserError()); 32 | } 33 | } 34 | 35 | export const login = (params) => { 36 | return oauth.owner 37 | .getToken(params.email, params.password) 38 | .then((result) => { 39 | localStorage.setItem("access_token", result.accessToken); 40 | setAuthHeader(result.accessToken); 41 | 42 | //get and store user details 43 | loadUserFromStorage(store); 44 | 45 | return result; 46 | }) 47 | .catch((error) => { 48 | localStorage.removeItem("access_token"); 49 | console.log(error); 50 | }); 51 | }; 52 | 53 | export const logoff = () => { 54 | userSignedOut(); 55 | }; 56 | 57 | export const userProfile = () => { 58 | var token = localStorage.getItem("access_token"); 59 | if (token) { 60 | axios.defaults.headers.common["Authorization"] = token 61 | ? "Bearer " + token 62 | : ""; 63 | return axios.get(config.userInfoUri); 64 | } else { 65 | return null; 66 | } 67 | }; 68 | 69 | export const validateToken = (token) => { 70 | return axios 71 | .post(config.introspectURL, { token: token }) 72 | .then((result) => { 73 | console.log(result); 74 | }) 75 | .catch((error) => { 76 | console.error(error); 77 | }); 78 | }; 79 | 80 | export default oauth; 81 | -------------------------------------------------------------------------------- /IdentityServer/Quickstart/TestUsers.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityModel; 6 | using IdentityServer4.Test; 7 | using System.Collections.Generic; 8 | using System.Security.Claims; 9 | 10 | namespace IdentityServerHost.Quickstart.UI 11 | { 12 | public class TestUsers 13 | { 14 | public static List Users = new List 15 | { 16 | new TestUser{SubjectId = "818727", Username = "alice", Password = "alice", 17 | Claims = 18 | { 19 | new Claim(JwtClaimTypes.Name, "Alice Smith"), 20 | new Claim(JwtClaimTypes.GivenName, "Alice"), 21 | new Claim(JwtClaimTypes.FamilyName, "Smith"), 22 | new Claim(JwtClaimTypes.Email, "AliceSmith@email.com"), 23 | new Claim(JwtClaimTypes.EmailVerified, "true", ClaimValueTypes.Boolean), 24 | new Claim(JwtClaimTypes.WebSite, "http://alice.com"), 25 | new Claim(JwtClaimTypes.Address, @"{ 'street_address': 'One Hacker Way', 'locality': 'Heidelberg', 'postal_code': 69118, 'country': 'Germany' }", IdentityServer4.IdentityServerConstants.ClaimValueTypes.Json) 26 | } 27 | }, 28 | new TestUser{SubjectId = "88421113", Username = "bob", Password = "bob", 29 | Claims = 30 | { 31 | new Claim(JwtClaimTypes.Name, "Bob Smith"), 32 | new Claim(JwtClaimTypes.GivenName, "Bob"), 33 | new Claim(JwtClaimTypes.FamilyName, "Smith"), 34 | new Claim(JwtClaimTypes.Email, "BobSmith@email.com"), 35 | new Claim(JwtClaimTypes.EmailVerified, "true", ClaimValueTypes.Boolean), 36 | new Claim(JwtClaimTypes.WebSite, "http://bob.com"), 37 | new Claim(JwtClaimTypes.Address, @"{ 'street_address': 'One Hacker Way', 'locality': 'Heidelberg', 'postal_code': 69118, 'country': 'Germany' }", IdentityServer4.IdentityServerConstants.ClaimValueTypes.Json), 38 | new Claim("location", "somewhere") 39 | } 40 | } 41 | }; 42 | } 43 | } -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_text.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Text 5 | // 6 | 7 | .text-monospace { font-family: $font-family-monospace !important; } 8 | 9 | // Alignment 10 | 11 | .text-justify { text-align: justify !important; } 12 | .text-wrap { white-space: normal !important; } 13 | .text-nowrap { white-space: nowrap !important; } 14 | .text-truncate { @include text-truncate(); } 15 | 16 | // Responsive alignment 17 | 18 | @each $breakpoint in map-keys($grid-breakpoints) { 19 | @include media-breakpoint-up($breakpoint) { 20 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 21 | 22 | .text#{$infix}-left { text-align: left !important; } 23 | .text#{$infix}-right { text-align: right !important; } 24 | .text#{$infix}-center { text-align: center !important; } 25 | } 26 | } 27 | 28 | // Transformation 29 | 30 | .text-lowercase { text-transform: lowercase !important; } 31 | .text-uppercase { text-transform: uppercase !important; } 32 | .text-capitalize { text-transform: capitalize !important; } 33 | 34 | // Weight and italics 35 | 36 | .font-weight-light { font-weight: $font-weight-light !important; } 37 | .font-weight-lighter { font-weight: $font-weight-lighter !important; } 38 | .font-weight-normal { font-weight: $font-weight-normal !important; } 39 | .font-weight-bold { font-weight: $font-weight-bold !important; } 40 | .font-weight-bolder { font-weight: $font-weight-bolder !important; } 41 | .font-italic { font-style: italic !important; } 42 | 43 | // Contextual colors 44 | 45 | .text-white { color: $white !important; } 46 | 47 | @each $color, $value in $theme-colors { 48 | @include text-emphasis-variant(".text-#{$color}", $value, true); 49 | } 50 | 51 | .text-body { color: $body-color !important; } 52 | .text-muted { color: $text-muted !important; } 53 | 54 | .text-black-50 { color: rgba($black, .5) !important; } 55 | .text-white-50 { color: rgba($white, .5) !important; } 56 | 57 | // Misc 58 | 59 | .text-hide { 60 | @include text-hide($ignore-warning: true); 61 | } 62 | 63 | .text-decoration-none { text-decoration: none !important; } 64 | 65 | .text-break { 66 | word-break: break-word !important; // IE & < Edge 18 67 | overflow-wrap: break-word !important; 68 | } 69 | 70 | // Reset 71 | 72 | .text-reset { color: inherit !important; } 73 | -------------------------------------------------------------------------------- /IdentityServer/wwwroot/lib/bootstrap/scss/utilities/_spacing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Margin and Padding 4 | 5 | @each $breakpoint in map-keys($grid-breakpoints) { 6 | @include media-breakpoint-up($breakpoint) { 7 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 8 | 9 | @each $prop, $abbrev in (margin: m, padding: p) { 10 | @each $size, $length in $spacers { 11 | .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } 12 | .#{$abbrev}t#{$infix}-#{$size}, 13 | .#{$abbrev}y#{$infix}-#{$size} { 14 | #{$prop}-top: $length !important; 15 | } 16 | .#{$abbrev}r#{$infix}-#{$size}, 17 | .#{$abbrev}x#{$infix}-#{$size} { 18 | #{$prop}-right: $length !important; 19 | } 20 | .#{$abbrev}b#{$infix}-#{$size}, 21 | .#{$abbrev}y#{$infix}-#{$size} { 22 | #{$prop}-bottom: $length !important; 23 | } 24 | .#{$abbrev}l#{$infix}-#{$size}, 25 | .#{$abbrev}x#{$infix}-#{$size} { 26 | #{$prop}-left: $length !important; 27 | } 28 | } 29 | } 30 | 31 | // Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`) 32 | @each $size, $length in $spacers { 33 | @if $size != 0 { 34 | .m#{$infix}-n#{$size} { margin: -$length !important; } 35 | .mt#{$infix}-n#{$size}, 36 | .my#{$infix}-n#{$size} { 37 | margin-top: -$length !important; 38 | } 39 | .mr#{$infix}-n#{$size}, 40 | .mx#{$infix}-n#{$size} { 41 | margin-right: -$length !important; 42 | } 43 | .mb#{$infix}-n#{$size}, 44 | .my#{$infix}-n#{$size} { 45 | margin-bottom: -$length !important; 46 | } 47 | .ml#{$infix}-n#{$size}, 48 | .mx#{$infix}-n#{$size} { 49 | margin-left: -$length !important; 50 | } 51 | } 52 | } 53 | 54 | // Some special margin utils 55 | .m#{$infix}-auto { margin: auto !important; } 56 | .mt#{$infix}-auto, 57 | .my#{$infix}-auto { 58 | margin-top: auto !important; 59 | } 60 | .mr#{$infix}-auto, 61 | .mx#{$infix}-auto { 62 | margin-right: auto !important; 63 | } 64 | .mb#{$infix}-auto, 65 | .my#{$infix}-auto { 66 | margin-bottom: auto !important; 67 | } 68 | .ml#{$infix}-auto, 69 | .mx#{$infix}-auto { 70 | margin-left: auto !important; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /React/src/components/Navbars/Navbar.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import classNames from "classnames"; 3 | import PropTypes from "prop-types"; 4 | // @material-ui/core components 5 | import { makeStyles } from "@material-ui/core/styles"; 6 | import AppBar from "@material-ui/core/AppBar"; 7 | import Toolbar from "@material-ui/core/Toolbar"; 8 | import IconButton from "@material-ui/core/IconButton"; 9 | import Hidden from "@material-ui/core/Hidden"; 10 | // @material-ui/icons 11 | import Menu from "@material-ui/icons/Menu"; 12 | // core components 13 | import AdminNavbarLinks from "./AdminNavbarLinks.js"; 14 | import RTLNavbarLinks from "./RTLNavbarLinks.js"; 15 | import Button from "components/CustomButtons/Button.js"; 16 | 17 | import styles from "assets/jss/material-dashboard-react/components/headerStyle.js"; 18 | 19 | const useStyles = makeStyles(styles); 20 | 21 | export default function Header(props) { 22 | const classes = useStyles(); 23 | function makeBrand() { 24 | var name; 25 | props.routes.map(prop => { 26 | if (window.location.href.indexOf(prop.layout + prop.path) !== -1) { 27 | name = props.rtlActive ? prop.rtlName : prop.name; 28 | } 29 | return null; 30 | }); 31 | return name; 32 | } 33 | const { color } = props; 34 | const appBarClasses = classNames({ 35 | [" " + classes[color]]: color 36 | }); 37 | return ( 38 | 39 | 40 |
      41 | {/* Here we create navbar brand, based on route name */} 42 | 45 |
      46 | 47 | {props.rtlActive ? : } 48 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | 60 | ); 61 | } 62 | 63 | Header.propTypes = { 64 | color: PropTypes.oneOf(["primary", "info", "success", "warning", "danger"]), 65 | rtlActive: PropTypes.bool, 66 | handleDrawerToggle: PropTypes.func, 67 | routes: PropTypes.arrayOf(PropTypes.object) 68 | }; 69 | -------------------------------------------------------------------------------- /React/src/components/Snackbar/Snackbar.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import classNames from "classnames"; 3 | import PropTypes from "prop-types"; 4 | // @material-ui/core components 5 | import { makeStyles } from "@material-ui/core/styles"; 6 | import Snack from "@material-ui/core/Snackbar"; 7 | import IconButton from "@material-ui/core/IconButton"; 8 | // @material-ui/icons 9 | import Close from "@material-ui/icons/Close"; 10 | // core components 11 | import styles from "assets/jss/material-dashboard-react/components/snackbarContentStyle.js"; 12 | 13 | const useStyles = makeStyles(styles); 14 | 15 | export default function Snackbar(props) { 16 | const classes = useStyles(); 17 | const { message, color, close, icon, place, open, rtlActive } = props; 18 | var action = []; 19 | const messageClasses = classNames({ 20 | [classes.iconMessage]: icon !== undefined 21 | }); 22 | if (close !== undefined) { 23 | action = [ 24 | props.closeNotification()} 30 | > 31 | 32 | 33 | ]; 34 | } 35 | return ( 36 | 49 | {icon !== undefined ? : null} 50 | {message} 51 | 52 | } 53 | action={action} 54 | ContentProps={{ 55 | classes: { 56 | root: classes.root + " " + classes[color], 57 | message: classes.message, 58 | action: classNames({ [classes.actionRTL]: rtlActive }) 59 | } 60 | }} 61 | /> 62 | ); 63 | } 64 | 65 | Snackbar.propTypes = { 66 | message: PropTypes.node.isRequired, 67 | color: PropTypes.oneOf(["info", "success", "warning", "danger", "primary"]), 68 | close: PropTypes.bool, 69 | icon: PropTypes.object, 70 | place: PropTypes.oneOf(["tl", "tr", "tc", "br", "bl", "bc"]), 71 | open: PropTypes.bool, 72 | rtlActive: PropTypes.bool, 73 | closeNotification: PropTypes.func 74 | }; 75 | --------------------------------------------------------------------------------