memberpoint/mp-auth-bundle

There is no license information available for the latest version (v1.0.12) of this package.

Installs: 0

Dependents: 0

Suggesters: 0

Type:symfony-bundle

v1.0.12 2020-04-30 06:08 UTC

README

This Bundle provides a simple OAUTH2 Server to the MemberPoint Environment.

Setup

This bundle requires a few setup step, including a public and private key-set created for JWT tokens.

Replace passphrase with a secure passphrase below

$ mkdir config/mp-auth
$ openssl genrsa -passout pass:_passphrase_ -out config/mp_auth/private.key 2048
$ openssl rsa -in config/mp_auth/private.key -passin pass:_passphrase_ -pubout -out config/mp_auth/public.key

Configuration

This bundle also requires a symfony configuration file created with the following fields.

key_path: The relative path to the private key created above. pub_key_path: The relative path to the public key created above. key_passphrase: The passphrase to the keys created above. secret: A secret string used as an encryption key for the Oauth2 security.

Templates

This bundle utilizes a twig template to display a login form to the user.

The template utilizes a form called login_form. The default template can be overridden as long as it implements;

 {{ form(login_form) }}

Routes

This bundle exposes a series of routes that provide access to the oauth server.

/authorize: This route is used by the AuthorizationCode Grant on the Oauth2 server. It displays the login form and manages users authentication.

/access_token: A programmatic route used by an Oauth2 client to validate a /authorize response.

/token-info: This route will return minimal user data for a valid access_token (first name, last name, email)