Giter Site home page Giter Site logo

authwave / php-client Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 185 KB

PHP client for integrating Authwave into your projects.

Home Page: https://www.authwave.com/clients/php

PHP 100.00%
authentication authentication-middleware authentication-backend authentication-service php-client php-authentication php-7 php-74 password

php-client's People

Contributors

g105b avatar

Watchers

 avatar  avatar  avatar

php-client's Issues

Logout via provider

The provider needs to know that a log out has occurred, so that the provider and application state are in sync.

Fake login on dev

It's really useful to be able to make a quick login while on development, but it doesn't necessarily need to perform the whole authentication on a remote provider.

It would be useful to be able to perform a fake login that only works on localhost by default.

Split out Authenticator's constructor "path" parameter into "clientHost" and "clientPath"

This has caught me out more than once while building Authwave. I see currentPath, so I provide it with $this->server->getRequestUri(), but the provider actually requires the host too, to load the correct settings on the provider's database. This could be fixed by changing the name of the parameter to indicate that the full path with host is required, but would be cleaner to provide it as two parameters.

Allow redirecting to a different URI

Currently after login completes, the provider will always return to the current URI. Add a new function to Authenticator, such as setReturnUri(string $uri).

Specify logged in period

When logging in, the provider should know how long the user should remain logged in for before being automatically logged out.

Test improvement: current URI has a query string

Authwave's provider will redirect back to the provided "currentUri" value after a successful authentication. The current path is transferred to the provider within the path query string, uri-encoded. It is a safe assumption that the current uri contains its own query string, and this is a good opportunity to strengthen some edge-case tests.

Local development - how to redirect to localhost?

Work will need to be done in this repository and the Authwave/provider to allow redirecting to localhost or similar local hostname, without having to hardcode values or change settings within the provider itself.

Initial idea: create a development client key within the provider which will use a preconfigured host, or even the referer header.

Simplify RedirectHandler

RedirectHandler should construct with a nullable callback function. If it's not supplied, then continue using the header() call by default, otherwise call the callback.

This will allow passing in the Gt\Http\Response's redirect function, like this:

new Authenticator(
	$this->config->getString("authwave.api_key"),
	$serverInfo->getRequestUri(),
	$this->config->getString("authwave.host"),
	$awSession,
	$response->redirect(...),
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.