Download the PHP package hawk-hhg/auth-client without Composer

On this page you can find all versions of the php package hawk-hhg/auth-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package auth-client

HAWK Auth Client

codecov Create new Release (PHP)

A comprehensive authentication and authorization library that wraps around the Keycloak REST API ( using hawk-keycloak-auth-server for additional features). The library provides a sophisticated way to build microservices with secure authentication, authorization, and user management.

Core Components

Features

Authentication

The library provides two authentication approaches:

  1. Stateful Authentication (Session-based)

    • Ideal for server-rendered websites
    • Automatic session management
    • Built-in token refresh handling
    • See stateful-auth example
  2. Stateless Authentication (Token-based)
    • Perfect for API implementations
    • No session state required
    • Token validation and verification
    • See stateless-auth example

Permission System

The Guard system provides sophisticated access control:

Profile Management

Flexible user profile system with:

See the user-profile example for implementation details.

Frontend Integration

TypeScript companion library (@hawk-hhg/auth-client) providing:

See the frontend-api example for implementation details.

Installation

PHP Library

JavaScript Companion (Optional)

Basic Configuration

Examples

The library includes several example implementations:

Each example demonstrates a specific use case with detailed comments and working code.

The examples come with their own docker-compose.yml file you can use to start them locally. Just run docker-compose up in the example directory and open the http://localhost:8099 URL in your browser. Note, that you must modify the environment variables in the docker-compose.yml file to match your Keycloak setup.

Alternatively, if you are using the HAWK Keycloak Infrastructure, you can copy the docker-compose.keycloak.yml file to docker-compose.override.yml and start the environment with docker compose up.

Development Setup

CLI Interface

The library comes with a powerful CLI interface (bin/env) built with bashly, providing commands for development and testing:

Docker Setup

The library includes Docker support for development and testing. To use the demo environment:

  1. Clone the HAWK Keycloak Infrastructure
  2. Copy docker-compose.keycloak.yml to docker-compose.override.yml
  3. Start the environment:

The demo environment automatically starts the examples for you which you can access at http://localhost:8099.

Testing

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Thank you :D


All versions of auth-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
league/oauth2-client Version ^2.8
psr/clock Version ^1.0
psr/log Version ^3.0
ext-ctype Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hawk-hhg/auth-client contains the following files

Loading the files please wait ....