Download the PHP package phpdot/iam without Composer

On this page you can find all versions of the php package phpdot/iam. 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 iam

phpdot/iam

This is an experimental package. The API surface may change in any release without a deprecation cycle — pin the constraint and read the release notes before upgrading.

Identity and access management for the PHPdot ecosystem: staged, policy-driven authentication (password plus any further factors, resumed across requests), typed permission keys declared as attributes and mirrored into storage, and policy-class authorization over explicit identity and typed resource objects. No policy engine, no DSL — a permission is membership, a policy is a class you wrote.

Table of Contents

Requirements

Requirement Constraint
PHP >= 8.5
ext-mbstring *
phpdot/attribute ^0.5
phpdot/console ^0.5
phpdot/contracts ^0.5
psr/clock ^1.0
psr/container ^2.0
symfony/console ^8.0

phpdot/container is a dev-only suggestion for the binding attributes; phpdot/http and phpdot/session are suggested for hosts wiring the authorization edge as middleware and running the session-backed authenticator.

Installation

Usage

Declare permissions on catalog class constants — the constant's value is the key (single source of truth), the attribute carries the metadata. App code references the constant, so a mistyped permission is a static-analysis error, not a silent deny. iam:permission:sync finds them and mirrors them into storage at deploy:

Authorization is two verbs on the scoped AuthorizerInterface — possession (has, hasAny, hasAll) and policy (can). Every verb fails closed: an empty permission list answers false, an unknown key is a grant nobody holds, and a context with no identity denies everything.

Authentication is staged: each stage proves one factor, an AuthenticationPolicy decides how many factors a login needs, and a half-finished login parks in the pending-auth store — namespaced away from the authenticated session, expiring after a TTL — until the remaining factors arrive or the attempt fails. Every attempt runs through a LoginThrottleInterface seam: a closed throttle refuses before any stage (and its Argon2id cost) runs; bind a cache- or table-backed limiter, the default lets everything through.

The iam:* CLI (over phpdot/console) administers the result: iam:permission:sync, iam:permission:list, iam:policy:list, iam:role:create, iam:role:delete, iam:role:grant, iam:role:revoke, iam:role:list, iam:assign, iam:unassign, iam:has, and iam:why. Every command addresses roles and mirrored permissions by id; the list commands take --q, --page and --limit.

Storage contract

The package owns the engine; the host owns storage. Four repository contracts, the permission mirror's read half, and the two catalogs (PermissionCatalogInterface, PolicyCatalogInterface) are implemented by the host against its own schema. Reads take a FilterDTO (q, named filters, page/perPage) and answer a SearchDTO composing a Paginator of entity DTOs — there is no unfiltered all(): a list without a question does not exist. Mutations arrive as SaveDTOs and address roles and mirrored permissions by id — a name is unique data a person reads, never an address. Permission keys stay strings exactly where a key is the currency: the check path (has, hasAny, hasAll, can) and permissionsOf(). Terms every adapter must hold:

Architecture

DefaultAuthorizer is request-scoped over an IdentityContext; it resolves an actor's effective permissions once through the PermissionProviderInterface (assignments joined to role grants) and answers possession questions by membership. IamScan walks the declared paths with phpdot/attribute and produces the permission and policy inventory that iam:permission:sync mirrors into storage. The AuthenticationEngine runs stages to an AuthenticationPolicy's satisfaction, parking partial attempts in a PendingAuthStoreInterface.

Testing

License

MIT.

This repository is a read-only mirror, generated by CI from phpdot/monorepo. Pull requests and issues belong in the monorepo.


All versions of iam with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-mbstring Version *
phpdot/attribute Version ^0.6
phpdot/console Version ^0.6
phpdot/contracts Version ^0.6
psr/clock Version ^1.0
psr/container Version ^2.0
symfony/console Version ^8.0
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 phpdot/iam contains the following files

Loading the files please wait ...