Download the PHP package timefrontiers/api-auth-client without Composer

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

TimeFrontiers API Auth Client

Client-side HMAC request authentication for TimeFrontiers APIs.

PHP Version

Installation

Requirements: PHP 8.5+, ext-curl, and ext-json.

Quick start

public_key is a key selector used by a 1.1 server to cross-check the app and credential record. It is not an asymmetric public key, is not a second secret, and is not included in the six canonical lines.

Credentials can also be loaded with Credentials::fromArray() or Credentials::fromEnv('API'). The latter reads API_APP_ID, API_PUBLIC_KEY, and API_SECRET_KEY. Credential objects redact the HMAC secret from debug output and cannot be serialized.

Client configuration

The verify_ssl argument remains for source compatibility with 1.0 callers, but passing false now throws. Remove any insecure override before upgrading.

Use withBaseUrl() and withHeaders() to create configured copies. Defaults and per-request headers are compared case-insensitively. X-App-Id, X-Public-Key, X-Timestamp, X-Nonce, X-Body-Hash, and X-Signature are reserved and cannot be supplied by callers.

Request construction

The convenience methods are get(), post(), put(), patch(), and delete(). request() accepts an exact string body and an already-built origin-form target:

The path must begin with one /. Absolute URLs, network-path targets beginning with //, fragments, spaces, controls, and targets over 8192 bytes are rejected. A manually built query is transmitted without parsing or re-encoding. The default transport sets both cURL's explicit request-target and path-as-is controls so dot segments and percent-escape casing remain byte-for-byte intact.

Array queries use RFC 3986 (%20, never +). Associative keys are sorted at every level and list order is retained. PHP bracket notation represents nested and repeated values:

JSON bodies recursively sort associative keys and preserve list order. The exact encoding flags are JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION. Encoding failure throws ClientConfigurationException with code JSON_ENCODING_ERROR before a transport is opened.

Signing protocol

The canonical string remains the 1.0 six-line format:

body_hash is lowercase SHA-256 hexadecimal for every non-empty byte string. The body "0" is non-empty and is hashed. Only '' leaves the final canonical line empty and omits X-Body-Hash.

A new timestamp and nonce are generated for each physical request. Version 1.1 does not retry. A future retry implementation must re-sign every attempt and limit retries to explicitly retry-safe operations.

Deterministic shared vectors, including empty and "0" bodies, UTF-8 JSON, RFC 3986 spaces, nested/repeated queries, and an invalid signature, live in fixtures/protocol-v1.1.json. The paired timefrontiers/api-auth 1.1 verifier must consume this committed fixture.

JavaScript signing

Python signing

Bash/cURL signing

Injectable transport

ApiClient uses CurlTransport by default. Tests and host applications may inject HttpTransportInterface. A transport receives one immutable HttpRequest containing the final URL, exact target, exact body, normalized headers, timeouts, TLS verification policy, redirect policy, and protocol allowlist. It returns ApiResponse or throws ApiException for a transport failure. Implementations must not log request headers or bodies and must not retry automatically.

Responses and errors

Malformed and scalar JSON are separately observable without changing the backward-compatible json(): ?array return. Repeated response headers are retained. Remote error message/code fields are type-normalized and bounded; large or malformed error bodies produce a generic HTTP error rather than being copied into an exception.

getBody(), getHeadersMulti(), and getHeaderValues() are explicit raw accessors. Their values may contain secrets or personal data and must not be logged. toArray() intentionally returns safe metadata only.

Development

The CI gate runs PHP 8.5 with both highest and lowest supported dependencies.

License

MIT License.


All versions of api-auth-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-json Version *
ext-curl 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 timefrontiers/api-auth-client contains the following files

Loading the files please wait ...