定制 remotemethod/socialite-teamviewer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

remotemethod/socialite-teamviewer

Composer 安装命令:

composer require remotemethod/socialite-teamviewer

包简介

Laravel Socialite TeamViewer libraries.

README 文档

README

Introduction

Laravel Socialite provides an expressive, fluent interface to OAuth authentication with TeamViewer. It handles almost all of the boilerplate social authentication code you are dreading writing.

License

Laravel Socialite TeamViewer is open-sourced software licensed under the MIT license

Official Documentation Laravel Socialite

Install Laravel Socialite, if not previously was the establishment

In addition to typical, form based authentication, Laravel also provides a simple, convenient way to authenticate with OAuth providers using Laravel Socialite. Socialite currently supports authentication with Facebook, Twitter, LinkedIn, Google, GitHub and Bitbucket.

Install with Composer

To get started with Socialite TeamViewer, add to your composer.json file as a dependency:

    composer require remotemethod/socialite-teamviewer

Configuration

After installing the Socialite library, register the RemoteMethod\Socialite\TeamViewer\TeamViewerProvider in your config/app.php configuration file:

    'providers' => [
        // Other service providers...

        RemoteMethod\Socialite\TeamViewer\TeamViewerProvider::class,
    ],

You will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your config/services.php configuration file, and should use the key teamviewer depending on the providers your application requires. For example:

    'teamviewer' => [
        'client_id' => 'your-teamviewer-app-id',
        'client_secret' => 'your-teamviewer-app-secret',
        'redirect' => 'http://your-callback-url',
    ],

Basic Usage

Next, you are ready to authenticate users! You will need two routes: one for redirecting the user to the OAuth provider, and another for receiving the callback from the provider after authentication. We will access Socialite using the Socialite facade:

    <?php

    namespace App\Http\Controllers;

    use Socialite;

    class AuthController extends Controller
    {
        /**
         * Redirect the user to the TeamViewer authentication page.
         *
         * @return Response
         */
        public function redirectToProvider()
        {
            return Socialite::driver('teamviewer')->redirect();
        }

        /**
         * Obtain the user information from TeamViewer.
         *
         * @return Response
         */
        public function handleProviderCallback()
        {
            $user = Socialite::driver('teamviewer')->user();

            // $user->token;
        }
    }

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固