final class SamlService (View source)

Runs the SAML login flow: builds the IdP redirect, consumes the assertion and handles single logout.

Constants

private FLOW_COOKIE_NAME

private FLOW_COOKIE_TTL

Methods

__construct(ConfigurationInterface $configManager, SamlConfigurationService $samlConfigurationService, UserProvisioningService $userProvisioningService, LoggerInterface $logger, AuthenticationService $authenticationService, AuditService $auditService, MfaService $mfaService, SessionInterface $session, Request|null $request = null, Auth|null $auth = null)

No description

bool
isEnabled()

No description

array
getAvailableProviders()

No description

string
initiateAuthFlow(string $providerId)

No description

static string
relayStateFor(string $providerId)

The RelayState sent with login and logout requests: the provider id, which handleAssertion() reads back when the session no longer holds it.

string|null
handleAssertion()

Consumes the posted assertion and finishes the login. Returns the application path the caller must redirect to when a second factor is still owed, null otherwise.

string|null
initiateSingleLogout(string $providerId)

No description

void
handleSingleLogout()

No description

string
generateMetadata(string $providerId)

No description

Details

__construct(ConfigurationInterface $configManager, SamlConfigurationService $samlConfigurationService, UserProvisioningService $userProvisioningService, LoggerInterface $logger, AuthenticationService $authenticationService, AuditService $auditService, MfaService $mfaService, SessionInterface $session, Request|null $request = null, Auth|null $auth = null)

No description

Parameters

ConfigurationInterface $configManager
SamlConfigurationService $samlConfigurationService
UserProvisioningService $userProvisioningService
LoggerInterface $logger
AuthenticationService $authenticationService
AuditService $auditService
MfaService $mfaService
SessionInterface $session
Request|null $request
Auth|null $auth

bool isEnabled()

No description

Return Value

bool

array getAvailableProviders()

No description

Return Value

array

string initiateAuthFlow(string $providerId)

No description

Parameters

string $providerId

Return Value

string

static string relayStateFor(string $providerId)

The RelayState sent with login and logout requests: the provider id, which handleAssertion() reads back when the session no longer holds it.

Parameters

string $providerId

Return Value

string

string|null handleAssertion()

Consumes the posted assertion and finishes the login. Returns the application path the caller must redirect to when a second factor is still owed, null otherwise.

Return Value

string|null

string|null initiateSingleLogout(string $providerId)

No description

Parameters

string $providerId

Return Value

string|null

void handleSingleLogout()

No description

Return Value

void

string generateMetadata(string $providerId)

No description

Parameters

string $providerId

Return Value

string