emersonart/suapoauth2

用于连接 IFRN 的 SUAP API 的库。

dev-master 2020-03-30 15:44 UTC

This package is auto-updated.

Last update: 2024-09-29 05:29:44 UTC


README

用于连接 IFRN 的 SUAP API 的库。

仍在开发中!

关于

Suap OAuth2 php 实现了与 SUAP 的集成,具有以下两个主要功能:

  • 通过 OAuth2 使用 SUAP 登录
  • 通过 OAuth2 消费 API(以用户的名义获取资源)

要求

安装

在安装之前,请确保满足要求。安装有两种方式:手动或通过 composer。

1. 手动。将此包中的文件移动到您的服务器

Root                          # → Root Project Directory
├── class/
│   └── Suap-OAuth2.php  
├── includes/
│   └── constants.php
├── suap_logs
│   └── index.html
└── index.php                 # → Arquivo para teste de funções  

2. 通过 Composer。将此包中的文件移动到您的服务器

将其添加到您的项目的 composer.json 文件中

{
  "require" {
    "emersonart/suapoauth2" : "dev-develop"
  }
}

然后执行

composer update

或者

执行以下命令

composer require emersonart/suapoauth2:dev-develop

说明

在 SUAP 中创建您的应用程序

https://suap.ifrn.edu.br/api/ 上创建您的应用程序,并使用以下信息

  • Client Type: Confidential
  • Authorization Grant Type: authorization-code
  • Redicert URIs: SEU_HOST/suap_auth/(将您的服务器替换为)
  • /includes/constants.php 文件中配置 Client_idClient_secretRedirect_uri