16 | {props.teaserText} 17 |
18 | 19 | {props.content} 20 |├── .gitignore ├── Resources ├── Private │ ├── Fusion │ │ ├── Login │ │ │ └── Login.fusion │ │ ├── Root.fusion │ │ ├── Integration │ │ │ └── Controller │ │ │ │ ├── Login │ │ │ │ ├── AskForSecondFactor.fusion │ │ │ │ └── SetupSecondFactor.fusion │ │ │ │ └── Backend │ │ │ │ ├── Index.fusion │ │ │ │ └── New.fusion │ │ └── Presentation │ │ │ ├── Components │ │ │ ├── Footer.fusion │ │ │ ├── LoginFlashMessages.fusion │ │ │ ├── FlashMessages.fusion │ │ │ ├── LoginSecondFactorStep.fusion │ │ │ └── SecondFactorList.fusion │ │ │ ├── Pages │ │ │ ├── DefaultPage.fusion │ │ │ ├── AbstractPage.fusion │ │ │ ├── LoginSecondFactorPage.fusion │ │ │ └── SetupSecondFactorPage.fusion │ │ │ └── BodyLayout │ │ │ └── Default.fusion │ └── Translations │ │ ├── en │ │ ├── Main.xlf │ │ └── Backend.xlf │ │ └── de │ │ ├── Main.xlf │ │ └── Backend.xlf └── Public │ ├── index.js │ └── Styles │ └── Login.css ├── Classes ├── Domain │ ├── AuthenticationStatus.php │ ├── Model │ │ ├── Dto │ │ │ └── SecondFactorDto.php │ │ └── SecondFactor.php │ └── Repository │ │ └── SecondFactorRepository.php ├── Service │ ├── SecondFactorSessionStorageService.php │ ├── TOTPService.php │ └── SecondFactorService.php ├── Controller │ ├── BackendController.php │ └── LoginController.php └── Http │ └── Middleware │ └── SecondFactorMiddleware.php ├── Configuration ├── Views.yaml ├── Policy.yaml ├── Routes.yaml └── Settings.yaml ├── LICENSE ├── Migrations └── Mysql │ ├── Version20240812091514.php │ ├── Version20220207105522.php │ └── Version20231114151915.php ├── composer.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # 3rd party sources 2 | Packages/ 3 | vendor/ 4 | 5 | # composer 6 | composer.lock 7 | 8 | # IDEs 9 | .idea/ 10 | -------------------------------------------------------------------------------- /Resources/Private/Fusion/Login/Login.fusion: -------------------------------------------------------------------------------- 1 | prototype(Sandstorm.NeosTwoFactorAuthentication:Login) < prototype(Neos.Fusion:Component) { 2 | renderer = 'login comming soon' 3 | } 4 | -------------------------------------------------------------------------------- /Resources/Private/Fusion/Root.fusion: -------------------------------------------------------------------------------- 1 | # you need to include ALL packages you want to use here, there is no AutoInclude! 2 | include: resource://Neos.Fusion/Private/Fusion/Root.fusion 3 | include: resource://Neos.Fusion.Form/Private/Fusion/Root.fusion 4 | 5 | # include all files in here 6 | include: **/*.fusion 7 | -------------------------------------------------------------------------------- /Classes/Domain/AuthenticationStatus.php: -------------------------------------------------------------------------------- 1 | = 8.1 6 | class AuthenticationStatus 7 | { 8 | const AUTHENTICATION_NEEDED = 'AUTHENTICATION_NEEDED'; 9 | const AUTHENTICATED = 'AUTHENTICATED'; 10 | } 11 | -------------------------------------------------------------------------------- /Configuration/Views.yaml: -------------------------------------------------------------------------------- 1 | - 2 | requestFilter: 'isPackage("Sandstorm.NeosTwoFactorAuthentication") && isController("Login") && isAction("index") && isFormat("html")' 3 | viewObjectName: 'Neos\Fusion\View\FusionView' 4 | options: 5 | fusionPathPatterns: 6 | - 'resource://Sandstorm.NeosTwoFactorAuthentication/Private/Fusion/Login' 7 | -------------------------------------------------------------------------------- /Resources/Private/Fusion/Integration/Controller/Login/AskForSecondFactor.fusion: -------------------------------------------------------------------------------- 1 | Sandstorm.NeosTwoFactorAuthentication.LoginController.askForSecondFactor = Sandstorm.NeosTwoFactorAuthentication:Page.LoginSecondFactorPage { 2 | site = ${site} 3 | styles = ${styles} 4 | username = ${username} 5 | flashMessages = ${flashMessages} 6 | } 7 | -------------------------------------------------------------------------------- /Resources/Private/Fusion/Integration/Controller/Login/SetupSecondFactor.fusion: -------------------------------------------------------------------------------- 1 | Sandstorm.NeosTwoFactorAuthentication.LoginController.setupSecondFactor = Sandstorm.NeosTwoFactorAuthentication:Page.SetupSecondFactorPage { 2 | site = ${site} 3 | styles = ${styles} 4 | scripts = ${scripts} 5 | username = ${username} 6 | flashMessages = ${flashMessages} 7 | qrCode = ${qrCode} 8 | secret = ${secret} 9 | } 10 | -------------------------------------------------------------------------------- /Resources/Private/Fusion/Presentation/Components/Footer.fusion: -------------------------------------------------------------------------------- 1 | prototype(Sandstorm.NeosTwoFactorAuthentication:Component.Footer) < prototype(Neos.Fusion:Component) { 2 | primaryAction = '' 3 | title = '' 4 | 5 | renderer = afx` 6 |
11 | ` 12 | } 13 | -------------------------------------------------------------------------------- /Resources/Private/Fusion/Presentation/Components/LoginFlashMessages.fusion: -------------------------------------------------------------------------------- 1 | prototype(Sandstorm.NeosTwoFactorAuthentication:Component.LoginFlashMessages) < prototype(Neos.Fusion:Component) { 2 | flashMessages = ${[]} 3 | 4 | renderer = afx` 5 |16 | {props.teaserText} 17 |
18 | 19 | {props.content} 20 || {I18n.id('module.index.list.header.name').package('Sandstorm.NeosTwoFactorAuthentication').source('Backend').translate()} | 9 |{I18n.id('module.index.list.header.type').package('Sandstorm.NeosTwoFactorAuthentication').source('Backend').translate()} | 10 |{I18n.id('module.index.list.header.creationDate').package('Sandstorm.NeosTwoFactorAuthentication').source('Backend').translate()} | 11 |12 | |
|---|