Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/authwave/php-client

PHP client for integrating Authwave into your projects.
https://github.com/authwave/php-client

authentication authentication-backend authentication-middleware authentication-service password php-7 php-74 php-authentication php-client

Last synced: about 1 month ago
JSON representation

PHP client for integrating Authwave into your projects.

Awesome Lists containing this project

README

        

PHP client library to implement Authwave in your application
============================================================

Authwave is an open source Identity-as-a-Service product that can be self-hosted. Using Authwave allows your application to offer authentication with great user experience and security, without you having to program any of the authentication yourself.

To use this repository, your application must be registered to obtain a client key (see example below). This can be done from https://www.authwave.com or from your own instance of [Authwave Provider](https://github.com/Authwave/provider) if you are self-hosting.

Basic usage
-----------

With the following PHP code below, you can display a log in button that, when clicked, changes to a log out button and displays a greeting to the logged in user.

```php
login();
}
elseif(isset($_GET["logout"])) {
$auth->logout();
}

// Authentication is handled by Authwave, so you can trust "isLoggedIn"
// as a mechanism for protecting your sensitive information.
if($auth->isLoggedIn()) {
echo <<You are logged in as {$auth->getEmail()}

Log out


HTML;
}
else {
echo <<You are not logged in!

Log in


HTML;
}
```