Download the PHP package friendsofcat/github-team-auth without Composer

On this page you can find all versions of the php package friendsofcat/github-team-auth. 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 github-team-auth

GitHubLogin

Build Status

Coverage Status

Overview

The GitHubLogin is a Laravel package which uses the socialite(https://github.com/laravel/socialite) to login a user by getting his github user account and permission. It basically get a github account and validate if the use is part of the expected organization and teams, and send a event with the user data. The expected organization and teams must be populated in database, which is possible to do by UI (See the UI section for more information).

Requirements

"require": {
    "php": ">=5.5.9",
    "illuminate/support": "5.*",
    "laravel/socialite": "^3.0@dev",
    "knplabs/github-api": "^2.9",
    "php-http/guzzle6-adapter": "^1.1",
    "graham-campbell/github": "^7.4"
  }

Install

Composer install

composer require friendsofcat/github-team-auth

Publish config File

 php artisan vendor:publish 

Publish config file

php artisan vendor:publish --provider="Friendsofcat\GitHubTeamAuth\GitHubTeamAuthProvider" --tag='github_team_auth:config'

The config file has only onw parameter, team_table_name, which define the name of the table in database for githubteams names, the default value is 'teams'

The config file has only onw parameter, custom_redirect, which define where we should redirect.

Publish migrations

php artisan vendor:publish --provider="Friendsofcat\GitHubTeamAuth\GitHubTeamAuthProvider" --tag='github_team_auth:migrations'

Publish views

php artisan vendor:publish --provider="Friendsofcat\GitHubTeamAuth\GitHubTeamAuthProvider" --tag='github_team_auth:views'

Edit app/config/service.php to add the code below

    'github' => [
        'client_id' => env('GITHUB_CLIENT_ID'),
        'client_secret' => env('GITHUB_CLIENT_SECRET'),
        'redirect' =>   'https://cat-quality-service.test/auth/github/callback',
    ],

Env file For service.php configurations is necessary to inform:

You can get all these parameters after register the app in the github callback feature.

View to Manage Organization and orgs

https://{domain}/admin/github-team-auth

This is the dashboard page which list all the team and orgs from this page you are able to delete an organization or team. Also you can navaguete to create team or create organization screen.

https://{domain}/admin/github-team-auth/add/team

This page was design for add a new team, display the team possibilities using the github token storaged in cache when user logged in. Also allow the user add a tag for label the access level of team, it can be add by the 'acl' field.

https://{domain}/admin/github-team-auth/add/org

This page was design for add a new team, display the organization possibilities using the github token storaged in cache when user logged in.

Event

In the end of process the user will be login and an event will be trigger. This event has to public parameters:

HTML

You must add the git hub loggin button in your login page, as the example below:

<a class="btn mb-2 btn-secondary"  href="{{ route('git_auth') }}">
    <i class="fa fa-github"></i>&nbsp;GitHub
</a>

@if ($errors->has('github'))
    <span class="help-block alert alert-dark">
        <strong>{{ $errors->first('github') }}</strong>
    </span>
@endif

Chicken - Egg dilemma

For add a new Organization/Team the user need to be logged at the system, but for loggin the system must have some vaid organization and team in DB. To solve this problem create a migration and insert the basic organization and team.


All versions of github-team-auth with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/support Version 6.*
laravel/socialite Version ^4.0
knplabs/github-api Version ^2.9
php-http/guzzle6-adapter Version ^1.1
graham-campbell/github Version ^8.6
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 friendsofcat/github-team-auth contains the following files

Loading the files please wait ....