deutschepost / sdk-api-autocomplete-authentication
Deutsche Post Direkt Addressfactory Autocomplete Authentication SDK
Installs: 163 583
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 9
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- ext-json: *
- php-http/discovery: ^1.0.0
- php-http/httplug: ^2.0.0
- php-http/logger-plugin: ^1.0.0
- psr/http-client: ^1.0.0
- psr/http-client-implementation: ^1.0.0
- psr/http-factory: ^1.0.0
- psr/http-factory-implementation: ^1.0.0
- psr/http-message: ^1.0 || ^2.0
- psr/http-message-implementation: ^1.0 || ^2.0
- psr/log: ^1.0.0 || ^2.0.0 || ^3.0.0
Requires (Dev)
- fig/log-test: ^1.1
- nyholm/psr7: ^1.0.0
- php-http/mock-client: ^1.5.0
- phpstan/phpstan: ^1.0.0
- phpunit/phpunit: ^9.5.0
- rector/rector: ^0.15.21
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-11-24 11:08:10 UTC
README
The Autocomplete API makes address input easy for you and your customers with the automatic completion of postal data.
This SDK can be used to generate API tokens for DATAFACTORY Autocomplete web service access. It does not connect to autocompletion endpoints. Instead, the generated token can be used together with a separate frontend library or SDK, for example @netresearch/postdirekt-autocomplete-sdk or @netresearch/postdirekt-autocomplete-library.
Requirements
System Requirements
- 8.1+ with JSON extension
Package Requirements
php-http/discovery
: Discovery service for HTTP client and message factory implementationsphp-http/httplug
: Pluggable HTTP client abstractionphp-http/logger-plugin
: HTTP client logger plugin for HTTPlugpsr/http-client
: PSR-18 HTTP client interfacespsr/http-factory
: PSR-7 HTTP message factory interfacespsr/http-message
: PSR-7 HTTP message interfacespsr/log
: PSR-3 logger interfaces
Virtual Package Requirements
psr/http-client-implementation
: Any package that provides a PSR-18 compatible HTTP clientpsr/http-factory-implementation
: Any package that provides PSR-7 compatible HTTP message factoriespsr/http-message-implementation
: Any package that provides PSR-7 HTTP messages
Development Package Requirements
nyholm/psr7
: PSR-7 HTTP message factory & message implementationphpunit/phpunit
: Testing frameworkphp-http/mock-client
: HTTPlug mock client implementationphpstan/phpstan
: Static analysis toolrector/rector
: Refactoring toolfig/log-test
: Test utilities forpsr/log
squizlabs/php_codesniffer
: Static analysis tool
Installation
composer require deutschepost/sdk-api-autocomplete-authentication
Uninstallation
composer remove deutschepost/sdk-api-autocomplete-authentication
Testing
composer run test
Static code analysis
composer run phpstan
composer run lint
Features
The Deutsche Post Direkt DATAFACTORY Autocomplete API Authentication SDK supports the following features:
- Create authentication token
Authentication
Public API
The library's components suitable for consumption are
- service:
- service factory
- authentication service
- data transfer objects:
- authentication token
Usage
<?php $logger = new \Psr\Log\NullLogger(); $serviceFactory = new \PostDirekt\Sdk\Autocomplete\Authentication\Service\ServiceFactory(); $authService = $serviceFactory->createAuthenticationService('username', 'password', $logger); $token = $authService->authenticate();