Download the PHP package glz/nvwa-core without Composer

On this page you can find all versions of the php package glz/nvwa-core. 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 nvwa-core

nvwaCommon.NvwaApi

负责远程调用相关的接口

nvwaCommon.NvwaApi.NvwaUic

负责远程取回用户信息相关的接口

服务器端使用方法

1. 引入NvwaUic

执行

2. 设置app secret

修改.env文件,增加内容:

3. 给某个controller添加回调方法:
客户端检查到用户未登陆时,会引导用户到服务器

客户端使用方法:

1. 引入NvwaUic

执行

2. 设置中间件

修改,修改变量,给这个成员变量添加一项:

3. 在路由中引用中间件:

在routes里,引用这个middleware,示例如下:

4.设置认证服务器的地址,密钥:

请在.env中设置这一项:

注意,密钥和用户认证的服务端应该相同。

5.在您的代码中取得用户信息

只需要调用即能得到RemoteUser的实例(存储了当前存入的用户信息);

示例代码:

客户端的临时方法

有时没有联网,或是服务器端有故障 ,怎么办呢? 也有办法,让客户端并不实时到服务器去校验. 步聚如下:

1. 确保引入了nvwa-common:
2. 设置.env文件,以开启假用户模式:

好了,现在在你的代码里启用 就总是能返回一个用户对象了.


All versions of nvwa-core with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
snoopy/snoopy Version >=1.0
firebase/php-jwt Version >=3.0
vlucas/phpdotenv Version ~2.2
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 glz/nvwa-core contains the following files

Loading the files please wait ....