File tree Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,19 @@ Auth::routes();
180180Route::post('/postLogin', 'Auth\LoginController@showLoginForm'); 
181181``` 
182182
183+ You'll also need to add a csrf exemption to ``` App\Http\Middleware\VerifyCsrfToken ``` 
183184
185+ class VerifyCsrfToken extends Middleware
186+ {
187+     /** 
188+      * The URIs that should be excluded from CSRF verification.
189+      *
190+      * @var   array
191+      * /
192+     protected $except = [ 
193+         '/postLogin'
194+     ] ;
195+ }
184196
185197### Debugging Connection  
186198
Original file line number Diff line number Diff line change 99class  SamlIdpController extends  Controller 
1010{
1111    use  SamlAuth;
12-     
13-     // This includes the controller routing points for  
14-     // - metadata 
15-     // - certfile 
16-     // - keyfile (this one should be used only for authenticated users) 
12+ 
13+     protected  function  metadata () {
14+         return  response (
15+             $ this  ->getSamlFile (config ('saml.idp.metadata ' ), false ),
16+             200 , [
17+                 'Content-Type '  => 'application/xml ' 
18+             ]
19+         );
20+     }
1721}
Original file line number Diff line number Diff line change 1- <? xml   version = " 1.0 " ?> 
2- <!--  GENERATED WITH https ://www.samltool.com/idp_metadata.php 
3- http://idp.[MYSITE] is just  the Entity id,  it doesn't need to exist, just needs to be unique 
4- -- >
1+ {{-- GENERATED WITH https://www.samltool.com/idp_metadata.php --}} 
2+ {{-- http ://idp.[MYSITE] is just the Entity id, it doesn't need to exist, just needs to be unique --}} 
3+ {{-- We have to escape  the document definition as well or  it doesn't run on certain php implementations  --}} 
4+ < {{ ' ? ' } } xml version="1.0" {{ ' ? ' } }  >
55<md:EntityDescriptor  xmlns:md =" urn:oasis:names:tc:SAML:2.0:metadata"   validUntil =" 2100-01-01T00:00:00Z"   cacheDuration =" PT1535772621S"   entityID =" {{ config (' saml.idp.entityId'  )} }"  >
66    <md:IDPSSODescriptor  WantAuthnRequestsSigned =" false"   protocolSupportEnumeration =" urn:oasis:names:tc:SAML:2.0:protocol"  >
77        <md:KeyDescriptor  use =" signing"  >
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments