Download the PHP package drago-ex/keycloak without Composer
On this page you can find all versions of the php package drago-ex/keycloak. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drago-ex/keycloak
More information about drago-ex/keycloak
Files in drago-ex/keycloak
Package keycloak
Short Description Simple Keycloak adapter for easy integration.
License MIT
Informations about the package keycloak
Drago Keycloak
Simple Keycloak adapter for easy integration.
Requirements
- PHP >= 8.3, < 9
- Nette Framework
- Composer
Installation
Extension Registration
Usage in Presenter
Extend Drago\Keycloak\BasePresenter (it adds the persistent $backlink parameter) and use the
KeycloakAdapter trait. On startup the trait:
- redirects a guest without an authorization code to Keycloak and stores the OAuth state;
- checks the returned state and answers 403 when it does not match; the state is valid for one exchange only;
- exchanges the code for an access token and loads the resource owner into
KeycloakSessions.
Errors from Keycloak end with a generic 403 message; the original exception is kept as the previous exception for logging.
The presenter then signs the user in from the resource owner, for example with your own authenticator:
KeycloakAuthenticator stands for your own service that maps the Keycloak user (getId(), getName(),
getEmail(), toArray()) to an identity of your application and throws AuthenticationException when
the user is not allowed in.
Error message in @layout.latte
Items from Keycloak
User Logout Method
All versions of keycloak with dependencies
nette/application Version ^3.2
nette/http Version ^3.1
nette/di Version ^3.0
nette/schema Version ^1.2
nette/security Version ^3.2
stevenmaguire/oauth2-keycloak Version ^6.1