定制 deuxhuithuit/craft-agency-auth 二次开发

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

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

deuxhuithuit/craft-agency-auth

最新稳定版本:2.0.1

Composer 安装命令:

composer require deuxhuithuit/craft-agency-auth

包简介

Adds SSO login in the cp with Google

README 文档

README

This plugin allows us to log in the control panel with our Google Account.

Note

This is meant to be internally used by Deux Huit Huit and might not do what you want. Pull Requests are welcome :)

Create and save the credentials

  1. Create OAuth client ID here
  2. Application type to Web application
  3. Name the credentials with the client's project name
  4. Add the authorized redirect URIs according to your setup. e.g. https://example.com/actions/agency-auth/callback no language are required.
  5. Save the credentials
  6. Fill the credentials in the /config/agency-auth.php file
  7. Commit the changes

config/agency-auth.php

The possible settings are:

<?php

return [
    '*' => [
        'client_id' => '',
        'client_secret' => '',
        'domain' => '',
        'default_password' => '',
        'photo_volume_handle' => '', // optional
        'photo_folder_name' => '', // optional
    ]
];

src/AgencyAuth.php

This file will prevent the manual login with a password into craft's CP. It will also add js and css into the login page for the oauth2 dialog button.

src/controllers/DialogController.php

This will only redirect the user to the oauth2 dialog.

src/controllers/CallbackController.php

This will handle the oauth2 callback and login the user.

mod_sec

Rule id 930120 does not like the .profile string in Google's response, so make sure to tweak it for your needs.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-14