2017 © Pedro PelĂĄez
 

library rest-plugin-indieauth

IndieAuth plugin for fkooman/rest

image

fkooman/rest-plugin-indieauth

IndieAuth plugin for fkooman/rest

  • Friday, March 25, 2016
  • by fkooman
  • Repository
  • 1 Watchers
  • 0 Stars
  • 176 Installations
  • PHP
  • 0 Dependents
  • 2 Suggesters
  • 0 Forks
  • 0 Open issues
  • 18 Versions
  • 3 % Grown

The README.md

Build Status Scrutinizer Code Quality, (*1)

Introduction

This plugin enables one to use IndieAuth authentication with fkooman/rest., (*2)

API

The plugin works by registering three endpoints under /_auth/indieauth in the fkooman/rest framework:, (*3)

  • /_auth/indieauth/auth
  • /_auth/indieauth/callback
  • /_auth/indieauth/logout

So if your application is running under https://www.example.org/foo, the /indieauth/auth endpoint becomes https://www.example.org/foo/indieauth/auth., (*4)

Authentication

The /_auth/indieauth/auth endpoint accepts a POST containing the me parameter with the URL to the user's homepage and the optionally the redirect_to parameter. If the redirect_to field is missing the browser will redirect back to the application root., (*5)

So for example to ask the user for their home page and redirecting them to https://www.example.org/foo/profile after successful authentication you can use the following <form>:, (*6)

<form method="post" action="_auth/indieauth/auth">
    https://<input type="text" name="me" placeholder="example.org" required>
    <input type="hidden" name="redirect_to" value="https://www.example.org/foo/profile">
    <input type="submit" value="Sign In">
</form>

The POST to the /_auth/indieauth/auth endpoint will take care of validating and normalizing the provided URL and determining "Distributed IndieAuth" support by performing discovery., (*7)

The callback will take care of receiving the authentication code from the IndieAuth service and validating it. Then it will redirect the browser back to redirect_to. Nothing needs to be configured for that., (*8)

Logout

You can send a POST to /_auth/indieauth/logout to log out of the session. An optional form parameter redirect_to can be used to redirect to a specific URL. If it is omitted the browser is redirected to the application root, for example:, (*9)

<form method="post" action="_auth/indieauth/logout">
    <input type="hidden" name="redirect_to" value="https://www.example.org/foo/welcome">
    <input type="submit" value="Logout">
</form>

The Versions

25/03 2016

dev-master

9999999-dev

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by François Kooman

25/03 2016

2.0.1

2.0.1.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by François Kooman

22/01 2016

2.0.0

2.0.0.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

13/10 2015

1.0.2

1.0.2.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

21/09 2015

1.0.1

1.0.1.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

20/07 2015

1.0.0

1.0.0.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

09/07 2015

0.5.2

0.5.2.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

09/07 2015

0.5.1

0.5.1.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

28/06 2015

0.5.0

0.5.0.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

05/05 2015

0.4.0

0.4.0.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

01/05 2015

0.3.0

0.3.0.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

12/04 2015

0.2.2

0.2.2.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

24/03 2015

0.2.1

0.2.1.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

24/03 2015

0.2.0

0.2.0.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

15/03 2015

0.1.3

0.1.3.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

15/03 2015

0.1.2

0.1.2.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

10/03 2015

0.1.1

0.1.1.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman

10/03 2015

0.1.0

0.1.0.0

IndieAuth plugin for fkooman/rest

  Sources   Download

Apache-2.0

The Requires

 

by François Kooman