dv-team / ms-entra-auth
A entra id auth helper
dev-main
2025-08-20 14:42 UTC
Requires
- php: >= 8.1
- psr/http-client: ^1.0
- psr/http-factory: ^1.1
Requires (Dev)
- guzzlehttp/guzzle: ^7.9
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2025-08-20 14:42:39 UTC
README
Setup details
https://www.adminlabs.de/anmeldung-mit-microsoft-azuread-php-anwendung/
![]() |
![]() |
![]() |
---|---|---|
![]() |
![]() |
![]() |
PHP-DI:
return [ /* ... */ EntraIDEndpoints::class => autowire() ->constructorParameter('authorizationEndpoint', 'https://login.microsoftonline.com/<id>/oauth2/v2.0/authorize') ->constructorParameter('tokenEndpoint', 'https://login.microsoftonline.com/<id>/oauth2/v2.0/token'), EntraIDAuthFactory::class => autowire(EntraIDAuthFactory::class) ->constructorParameter('landingPageUri', 'https://<host>/entra-id-login.html'), EntryIDAuthClient::class => factory(function (EntraIDAuthFactory $factory, Container $container) { /** @var string $clientId */ $clientId = $container->get('microsoft.entra-id.client-id'); /** @var string $clientSecret */ $clientSecret = $container->get('microsoft.entra-id.client-secret'); return $factory->createAuthClient($clientId, $clientSecret); }), /* ... */ ];