Download the PHP package singingfox/o365auth without Composer

On this page you can find all versions of the php package singingfox/o365auth. 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 o365auth

Office 365 PHP Auth

This package adds authenticate against Office 365 to a Laravel application.

The package is largely based on program logic from microsoftgraph/php-connect-sample, but aimed to easier integration with Laravel 5, and utilized more Laravel native things.

Expected Behaviors

Installation and essential configurations

Install package with Composer

(NOTE: packagist not updated yet, the following may not work)

First, run composer require singingfox/o365auth under Laraval application root directory.

Add the following to composer.json

Singingfox\\O365Auth\\": "vendor/singingfox/o365auth/src

Add the following to config/app.php

Singingfox\O365Auth\O365AuthServiceProvider::class,

Run

composer dump-autoload

Alternatively, add then following to composer.json then run composer update

Dependencies

When installing this package, the following packages and their dependencies are going to be pulled in as well.

Configurations

Office 365 parameters needed in Laravel .env

Add the following to .env file

If not specified, a successful authentication will attempt to redirect application to the URL immediately prior to the authentication, or fall back to web root "/".

Display specific errors

Add a new view resources/views/errors/500.blade.php. The content could be as simple as

This is optional, but if done, specific error message from this package, could be displayed. Otherwise, the following generic error message will be displayed for all errors:

Whoops, looks like something went wrong.

What to do after authentication

At this time, the built-in program logic try to

The following is a sample of what can be done after successful authentication:

  1. Retrieve access_token as stored in session
  2. Initialize a Graph object, and assign the token to it
  3. Now we should be able to call all kinds of Graph API endpoints and do whatever we need to do
  4. Optionally, O365_AFTER_AUTH_URL can be specified in .env under Laraval application root, then a successful authentication process would be followed by some immediate actions, such as setting authenticated user locally, etc. The following sample route doesn't really do that. It only illustrates how to get a piece of user info -- email.

This authentication process can also be used to register new users that allows for access.


All versions of o365auth with dependencies

PHP Build Version
Package Version
Requires league/oauth2-client Version ^2.3
microsoft/microsoft-graph Version ^1.3
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 singingfox/o365auth contains the following files

Loading the files please wait ....