Download the PHP package fyre/auth without Composer

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

FyreAuth

FyreAuth is a free, open-source authentication/authorization library for PHP.

Table Of Contents

Installation

Using Composer

In PHP:

Basic Usage

Default configuration options will be resolved from the "Auth" key in the Config.

Autoloading

It is recommended to bind the Auth to the Container as a singleton.

Any dependencies will be injected automatically when loading from the Container.

Methods

Access

Get the Access.

Add Authenticator

Add an Authenticator.

Attempt

Attempt to login as a user.

Authenticator

Get an authenticator by key.

Authenticators

Get the authenticators.

Get Login URL

Get the login URL.

Identifier

Get the Identifier.

Is Logged In

Determine if the current user is logged in.

Login

Login as a user.

Logout

Logout the current user.

User

Get the current user.

Access

After

Execute a callback after checking rules.

Allows

Check whether an access rule is allowed.

Any additional arguments supplied will be passed to the access rule callback or Policy method.

Any

Check whether any access rule is allowed.

Any additional arguments supplied will be passed to the access rule callbacks or Policy methods.

Authorize

Authorize an access rule.

Any additional arguments supplied will be passed to the access rule callback or Policy method.

Before

Execute a callback before checking rules.

Clear

Clear all rules and callbacks.

Define

Define an access rule.

Denies

Check whether an access rule is not allowed.

Any additional arguments supplied will be passed to the access rule callback or Policy method.

None

Check whether no access rule is allowed.

Any additional arguments supplied will be passed to the access rule callbacks or Policy methods.

Identifier

Attempt

Attempt to identify a user.

Get Identifier Fields

Get the user identifier fields.

Get Model

Get the identity Model.

Get Password Field

Get the user password field.

Identify

Find an identity by identifier.

Authenticators

Custom authenticators can be created by extending the \Fyre\Auth\Authenticator class, and overwriting the below methods as required.

Authenticate

Authenticate a ServerRequest.

Before Response

Update the ClientResponse before sending to client.

Login

Login as a user.

Logout

Logout the current user.

Cookie

The cookie authenticator can be loaded using custom configuration.

This authenticator is only active when the $rememberMe argument is set to true in the $auth->attempt or $auth->login methods.

Session

The session authenticator can be loaded using custom configuration.

Token

The token authenticator can be loaded using custom configuration.

Policy Registry

Add Namespace

Add a namespace for loading policies.

Build

Build a Policy.

Clear

Clear all namespaces and policies.

Get Namespaces

Get the namespaces.

Has Namespace

Determine if a namespace exists.

Map

Map an alias to a Policy class name.

Remove Namespace

Remove a namespace.

Resolve Alias

Resolve a modal alias.

Unload

Unload a policy.

Use

Load a shared Policy instance.

Policies

Policies can be created by suffixing the singular model alias with "Policy" as the class name.

Policy rules should be represented as methods on the class, that accept the current user and resolved Entity as arguments.

Middleware

Auth Middleware

This middleware will authenticate using the loaded authenticators, and add any authentication headers to the response.

Any dependencies will be injected automatically when loading from the Container.

Handle

Handle a ServerRequest.

This method will return a ClientResponse.

Authenticated Middleware

This middleware will throw an UnauthorizedException or return a login RedirectResponse if the user is not authenticated.

Any dependencies will be injected automatically when loading from the Container.

Handle

Handle a ServerRequest.

This method will return a ClientResponse.

Authorized Middleware

This middleware will throw a ForbiddenException or a login RedirectResponse if the user is not authorized.

Any dependencies will be injected automatically when loading from the Container.

Handle

Handle a ServerRequest.

This method will return a ClientResponse.

Unauthenticated Middleware

This middleware will throw a NotFoundException if the user is authenticated.

Any dependencies will be injected automatically when loading from the Container.

Handle

Handle a ServerRequest.

This method will return a ClientResponse.


All versions of auth with dependencies

PHP Build Version
Package Version
Requires fyre/config Version ^4.1
fyre/container Version ^1.0
fyre/error Version ^6.0
fyre/inflector Version ^3.0
fyre/middleware Version ^6.0
fyre/orm Version ^11.0
fyre/router Version ^7.0
fyre/server Version ^4.1
fyre/session Version ^5.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 fyre/auth contains the following files

Loading the files please wait ....