Download the PHP package betterbrief/silverstripe-opauth without Composer

On this page you can find all versions of the php package betterbrief/silverstripe-opauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-opauth

This module depends on Opauth which is no longer maintained - we don't recommend continuing to use this module as we aren't actively developing it any longer.

SilverStripe Opauth Module

Build Status Scrutinizer Code Quality Code Coverage

Introduction

Uses the Opauth library for easy drop-in strategies for social login. See their documentation

Current Status

1.1 - stable. No known major issues. Report issues using the bug tracker.

How does it work?

The module provides an additional login form which the developer has control over, that allows users to instantly sign in to your website with an identity provided by any Oauth provider. The providers are each handled by using an OpauthStrategy, many of which are freely available. There are strategies for Facebook, Twitter, Google, and many more.

Based on the identity data from the Oauth provider, the module will find or create a new Member object based on the provided email address in the identity. This also means a Member can have many Oauth identities linked to a single account; these are saved in to the OpauthIdentity object.

If the resultant Member generated from the provider's response doesn't have an email address, or any other piece of data you require, there is functionality built in to handle this. You can enforce required fields, or any other kind of validation, by setting the OpauthValidator's custom_validator property to the class name of the validator you require.

Other than that, the user flow is quite simple. Provided all required data is there, the member is logged in with Member::login and then redirected to the page they were looking at or the default destination, settable in your config - just like the default MemberAuthenticator.

Requirements

FAQ

What does this module include?

It includes:

NB: Opauth's maintainers recommend you include strategies as required, rather than bundling them together.

Where can I get strategies?

You can find a list under the "Available Strategies" heading on the Opauth homepage

Packagist provides a list of strategies you can use to install via Composer.

Where should I put strategies?

Use composer to require your strategies

How do I map the API responses to a Member?

You define the OpauthIdentity member_mapper block in your _config.yml. Simply provide a hash map of member fields to dot notated paths of the Opauth response array for simple fields, or if you need to perform some parsing to retrieve the value you want, an array of class name and function, like ['OpauthResponseHelper', 'get_first_name']. It takes the auth response array as an argument. See the example config YAML below for more details.

How do I configure the module and its strategies?

All Opauth-specific configuration variables can be put under opauth_settings and are passed directly to Opauth.

You can put these settings in your _config.yml file. Additionally, as your strategy API details will likely change per domain and thus per environment, you are able to update these using the Config API. Please see the Opauth config documentation. Here's some examples to help you:

_config.yml example:
_config.php example:

NB: As you can see, sometimes the Strategy configuration settings may have inconsistent namings - we can't help with that, sorry!

Documentation

Please read the Opauth documentation and our own documentation

Raising bugs and suggesting enhancements

If you find a bug or have a Really Good Idea™, please raise an issue. Better still, if you can fix the bug, then feel free to send in a pull request with the remedial code that ideally respects the coding conventions used thus far.

Attribution


All versions of silverstripe-opauth with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ~3.1
opauth/opauth Version ^1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package betterbrief/silverstripe-opauth contains the following files

Loading the files please wait ....