PHPackages                             germania-kg/authapi-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. germania-kg/authapi-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

germania-kg/authapi-client
==========================

HTTP-Client for Germania's Authentication API

1.1.1(3y ago)035PHPPHP ^7.3|^8.0

Since Nov 8Pushed 3y ago2 watchersCompare

[ Source](https://github.com/GermaniaKG/AuthApiClient)[ Packagist](https://packagist.org/packages/germania-kg/authapi-client)[ RSS](/packages/germania-kg-authapi-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (13)Versions (6)Used By (0)

[![](https://camo.githubusercontent.com/cac3140c0c6e758f67a1ba689683ced67aa2d534e2187d6e03c5c721ffe3b976/68747470733a2f2f7374617469632e6765726d616e69612d6b672e636f6d2f6c6f676f732f67612d6c6f676f2d323031362d7765622e7376677a)](https://camo.githubusercontent.com/cac3140c0c6e758f67a1ba689683ced67aa2d534e2187d6e03c5c721ffe3b976/68747470733a2f2f7374617469632e6765726d616e69612d6b672e636f6d2f6c6f676f732f67612d6c6f676f2d323031362d7765622e7376677a)

---

AuthApi Client
==============

[](#authapi-client)

**Service-side PHP client for retrieving an Auth token from Germania's Authentication API (AuthApi).**

Installation
------------

[](#installation)

```
composer require germania-kg/authapi-client
```

Interfaces and abstracts
------------------------

[](#interfaces-and-abstracts)

### AuthApiInterface

[](#authapiinterface)

The **AuthApiInterface** provides three public methods:

- **getToken** which requires *username* and *password* and returns an **AuthToken** instance, optionally with long TTL (“refresh”)
- **login** which requires *username* and *password* and returns an **AuthToken** instance, usually with short TTL.
- **refresh** which accepts an **AuthToken** instance and returns a new **AuthToken** instance

```
