cakephp / authentication

Authentication plugin for CakePHP. Can also be used in PSR7 based applications.
MIT License
116 stars 100 forks source link

EnvironmentAuthenticator #565

Closed MolbioUnige closed 1 year ago

MolbioUnige commented 1 year ago

Hi, My institute uses Shibboleth as SSO. After identification by the identity provider, the credentials are injected as environment variables by the http server. This authenticator is a TokenAuthenticator but:

I don't know if there are other SSO technologies outside Shibboleth that uses environment variable to pass credentials, and have no idea how spread Shibboleth is.

Usage

  1         $service->loadAuthenticator('Authentication.Environment', [
  2             'loginUrl' => $service->getConfig('unauthenticatedRedirect'),
  3             'attributes' => [
  4                 'ENV_VAR_1' => 'app_var_1',
  5                 'ENV_VAR_2' => 'app_var_2',
  6             ],
  7         ]);
MolbioUnige commented 1 year ago

I revised the code a bit. Should I make a new commit or should I squash it to the previous one? Sorry for asking, it's the first time a make a pull request.

ndm2 commented 1 year ago

Please squash, having rather small changes scattered over multiple commits is somewhat annoying when browsing the history and trying to understand changes. A more relevant commit message would also be nice 😉

markstory commented 1 year ago

I revised the code a bit. Should I make a new commit or should I squash it to the previous one?

We can also squash on our side when merging :smile:

MolbioUnige commented 1 year ago

Sorry I made a mess with my commits

MolbioUnige commented 1 year ago

I don't understand where the CI errors come from. I don't see anything if I click on details

MolbioUnige commented 1 year ago

Should I start again from scratch? The PR I mean

ndm2 commented 1 year ago

It wasn't your fault:

This is a scheduled Ubuntu-18.04 brownout. The Ubuntu-18.04 environment is deprecated and will be removed on April 1st, 2023. For more details, see https://github.com/actions/runner-images/issues/6002