Expressive Zend-Authentication Module and Expressive Authorization Module Usage example with expressive skeleton

expressive

#1

Greetings.

Can anyone help with usage examples of the expressive zend-authentication module and expressive authorization modules?

I have them installed but there is no documentation on them. Quick question too. Why publish them without documentation on how to?


#2

Aren’t the docs at
https://docs.zendframework.com/zend-expressive-authentication/ ?


#3

There is also some info in the RFC: RFC: authentication module for Expressive and PSR-7 apps

And then there are some blog posts:

As it’s a proposal and doesn’t have a official release yet, the docs are not complete or completely missing for some of the components.


#4

Aren’t the docs at
https://docs.zendframework.com/zend-expressive-authentication/3 ?

Did you even looked at that docs and how helpful it is ?


#5

Hah, I didn’t - couldn’t click through from mobile :slight_smile:

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


#6

I have not made this working, but this is after looking at the api etc . So there may be errors.

First you need to register your route something as

$app->get('/login', \Zend\Expressive\Authentication\AuthenticationMiddleware::class, 'login');

Now you may need one of the package.

Assuming you are installing https://github.com/zendframework/zend-expressive-authentication-session

You need to register the service Zend\Expressive\Authentication\UserRepositoryInterface in your di container.

According to the authentication adapter you need to register some of the config values.

There is much more configurations

So you may want to manually look at the source code / figure out most of them.


#7

All I see is 404 page not found. The official doc is saying documentation is forthcoming.


#8

The only docs there is on how to install the modules.


#9

These aren’t the documentations to the modules and the blogs aren’t specific to these modules.


#10

There is a good news there is a post https://samsonasik.wordpress.com/2018/01/12/create-login-functionality-in-expressive-3/ . I hope this will really help you.


#11

For authorization, I wrote another post https://samsonasik.wordpress.com/2018/01/13/create-authorization-functionality-in-expressive-3/