承接 networkrailbusinesssystems/entra 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

networkrailbusinesssystems/entra

Composer 安装命令:

composer require networkrailbusinesssystems/entra

包简介

Easily sign-in and poll users and groups in Microsoft Entra

README 文档

README

Composer status Coverage status Laravel version PHP version Tests status

Easily sign-in and poll users and groups in Microsoft Entra, built using Laravel Microsoft Graph.

Setup

  1. Install this library using Composer:
    composer require networkrailbusinesssystems/entra
  2. Publish the Entra configuration file using Artisan:
    php artisan vendor:publish --provider="NetworkRailBusinessSystems\Entra\EntraServiceProvider" --tag="entra"
  3. Adjust the entra.php configuration file to suit your needs.
    • sync_attributes will automatically create and update Models to match the details from Entra
    • user_model should be the fully qualified class name of the Model used for Laravel authentication
  4. Implement the EntraAuthenticatable interface on your chosen Model
  5. Add the AuthenticatesWithEntra trait on your chosen Model for a standard fetch and sync setup, or implement the methods yourself
  6. Add the Entra authentication routes to your routes/web.php using the macro:
    Route::entra();
    
    Route::middleware('MsGraphAuthenticated')->group(function () {
        // Your authenticated routes here...
    }
  7. Perform any additional configuration following the Laravel Microsoft Graph documentation

Usage

Users will automatically be redirected to the Microsoft Azure login page whenever they attempt to access an authenticated route as a guest.

The EntraServiceProvider automatically registers the relevant event listeners for authentication.

You can use the Laravel Microsoft Graph library as normal.

Entra helper

Entra::findUser()

Entra::findUsers()

Entra::importUser()

Rules

UserExistsInEntra

Emulator

Entra::emulate()

Manual sign-in and out

You can allow users to manually login by providing a link to the login route.

Users can logout by calling the logout route.

Entra responses

Sample responses are provided in the tests/Data directory.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-04