Commit cccfb2a Dani Pfeil
committed
1 parent b386880 commit cccfb2a Copy full SHA for cccfb2a
File tree 6 files changed +69
-3
lines changed
Classes/Backend/LoginProvider
6 files changed +69
-3
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+
4
+ namespace DanielPfeil \Samlauthentication \Backend \LoginProvider ;
5
+
6
+
7
+ use TYPO3 \CMS \Backend \Authentication \PasswordReset ;
8
+ use TYPO3 \CMS \Backend \Controller \LoginController ;
9
+ use TYPO3 \CMS \Backend \LoginProvider \LoginProviderInterface ;
10
+ use TYPO3 \CMS \Core \Authentication \BackendUserAuthentication ;
11
+ use TYPO3 \CMS \Core \Page \PageRenderer ;
12
+ use TYPO3 \CMS \Core \Utility \GeneralUtility ;
13
+ use TYPO3 \CMS \Extbase \Utility \DebuggerUtility ;
14
+ use TYPO3 \CMS \Fluid \View \StandaloneView ;
15
+
16
+ class SamlLoginProvider implements LoginProviderInterface
17
+ {
18
+ public function render (StandaloneView $ view , PageRenderer $ pageRenderer , LoginController $ loginController )
19
+ {
20
+ /**
21
+ * @var $beuser BackendUserAuthentication
22
+ */
23
+ $ beuser = $ GLOBALS ["BE_USER " ];
24
+ $ _POST ["uident " ] = rand ();
25
+ $ beuser ->start ();
26
+
27
+ $ pageRenderer ->loadRequireJsModule ('TYPO3/CMS/Backend/UserPassLogin ' );
28
+
29
+ $ view ->setTemplatePathAndFilename (GeneralUtility::getFileAbsFileName ('EXT:samlauthentication/Resources/Private/Templates/Backend/samllogin.html ' ));
30
+
31
+ $ view ->assign ('enablePasswordReset ' , false );
32
+ }
33
+ }
Original file line number Diff line number Diff line change 21
21
<file source-language =" en" datatype =" plaintext" original =" messages" date =" 2011-10-18T18:20:51Z" product-name =" my-ext" >
22
22
<header />
23
23
<body >
24
+ <trans-unit id =" login.simplesaml" xml : space =" preserve" >
25
+ <source >Simplesaml Login</source >
26
+ </trans-unit >
24
27
<trans-unit id =" fieldMapping" xml : space =" preserve" >
25
28
<source >Field mapping</source >
26
29
</trans-unit >
Original file line number Diff line number Diff line change
1
+ < f:layout name ="Login " />
2
+
3
+ < f:section name ="loginFormFields ">
4
+ < div class ="form-group t3js-login-username-section " id ="t3-login-username-section ">
5
+ < div class ="form-control-wrap ">
6
+ < div class ="form-control-holder ">
7
+ < input type ="text " id ="t3-username " name ="username " value ="{presetUsername} " aria-label ="{f:translate(key: 'login.username')} " placeholder ="{f:translate(key: 'login.username')} " class ="form-control input-login t3js-clearable t3js-login-username-field " autofocus ="autofocus " />
8
+ < div class ="form-notice-capslock hidden t3js-login-alert-capslock ">
9
+ < img src ="{images.capslock} " width ="14 " height ="14 " alt ="{f:translate(key: 'login.error.capslock')} " title ="{f:translate(key: 'login.error.capslock')} " />
10
+ </ div >
11
+ </ div >
12
+ </ div >
13
+ </ div >
14
+ </ f:section >
15
+ < f:section name ="ResetPassword ">
16
+ < div class ="forgot-password ">
17
+ < div class ="text-right ">
18
+ < f:be .link route ="password_forget " parameters ="{loginProvider: loginProviderIdentifier} "> {f:translate(key: 'login.password_forget')}</ f:be .link>
19
+ </ div >
20
+ </ div >
21
+ </ f:section >
Original file line number Diff line number Diff line change 10
10
" serviceprovider"
11
11
],
12
12
"license" : " GPL-3.0-only" ,
13
- "version" : " 4.0 .0" ,
13
+ "version" : " 4.1 .0" ,
14
14
"require" : {
15
15
"typo3/minimal" : " >=9" ,
16
16
"simplesamlphp/simplesamlphp" : " ^1.19"
Original file line number Diff line number Diff line change 20
20
$ EM_CONF ["samlauthentication " ] = [
21
21
'title ' => 'SAML Authentication ' ,
22
22
'description ' => 'This extension adds a authentication method for SAML with different service provider. ' ,
23
- 'version ' => '4.0 .0 ' ,
23
+ 'version ' => '4.1 .0 ' ,
24
24
'category ' => 'services ' ,
25
25
'constraints ' => [
26
26
'depends ' => [
Original file line number Diff line number Diff line change 33
33
34
34
'className ' => 'DanielPfeil \\Samlauthentication \\Service \\AuthenticationService ' ,
35
35
]
36
- );
36
+ );
37
+
38
+ $ GLOBALS ['TYPO3_CONF_VARS ' ]['SVCONF ' ]['auth ' ]['setup ' ]['BE_fetchUserIfNoSession ' ] = true ;
39
+
40
+ $ GLOBALS ['TYPO3_CONF_VARS ' ]['EXTCONF ' ]['backend ' ]['loginProviders ' ][1433416020 ] = [
41
+ 'provider ' => \DanielPfeil \Samlauthentication \Backend \LoginProvider \SamlLoginProvider::class,
42
+ 'sorting ' => 50 ,
43
+ 'icon-class ' => 'fa-key ' ,
44
+ 'label ' => 'LLL:EXT:samlauthentication/Resources/Private/Language/locallang.xlf:login.simplesaml '
45
+ ];
You can’t perform that action at this time.
0 commit comments