Saml2Service
class Saml2Service
Methods
Initiate SSO login for an IDP.
Process the ACS (Assertion Consumer Service) response.
Process ACS response by extracting the Issuer (IDP EntityID) from the SAML response.
Extract the Issuer element from a SAML response XML.
Initiate SLO logout.
Process the SLS (Single Logout Service) response/request.
Generate SP metadata XML, with optional caching.
Generate SP metadata XML.
Map SAML attributes using the IDP-specific or global mapping.
Get the IDP resolver instance.
Get the metadata parser instance.
Details
at line 17
__construct(IdpResolver $idpResolver, MetadataParser $metadataParser)
No description
at line 25
array
buildSettings(Saml2Idp|string $idp)
Build onelogin/php-saml settings array for an IDP.
at line 80
Auth
getAuth(Saml2Idp|string $idp)
Get a configured Auth instance for an IDP.
at line 89
string
login(string $idpKey, string|null $returnTo = null)
Initiate SSO login for an IDP.
at line 103
array
processAcsResponse(string $idpKey)
Process the ACS (Assertion Consumer Service) response.
Returns the parsed SAML data and dispatches Saml2LoginEvent.
at line 118
array
processAcsResponseAuto()
Process ACS response by extracting the Issuer (IDP EntityID) from the SAML response.
This allows a single ACS URL for all IDPs.
at line 147
protected array
processAcsWithIdp(Saml2Idp $idp)
Process ACS with a resolved IDP.
at line 194
protected string|null
extractIssuerFromResponse(string $xml)
Extract the Issuer element from a SAML response XML.
at line 220
string
logout(string $idpKey, string|null $returnTo = null, string|null $nameId = null, string|null $sessionIndex = null)
Initiate SLO logout.
at line 235
string|null
processSlo(string $idpKey, callable|null $cbDeleteSession = null, string|null $nameId = null, string|null $sessionIndex = null)
Process the SLS (Single Logout Service) response/request.
at line 260
string
getMetadataXml()
Generate SP metadata XML, with optional caching.
at line 274
protected string
generateMetadataXml()
Generate SP metadata XML.
at line 323
protected array
mapAttributes(array $attributes, Saml2Idp|null $idp = null)
Map SAML attributes using the IDP-specific or global mapping.
at line 345
IdpResolver
getIdpResolver()
Get the IDP resolver instance.
at line 353
MetadataParser
getMetadataParser()
Get the metadata parser instance.