PHP Class Overtrue\LaravelWechat\Middleware\OAuthAuthenticate

Afficher le fichier Open project: overtrue/laravel-wechat

Méthodes publiques

Méthode Description
__construct ( Application $wechat ) Inject the wechat service.
handle ( Illuminate\Http\Request $request, Closure $next, string | null $scopes = null ) : mixed Handle an incoming request.

Méthodes protégées

Méthode Description
getTargetUrl ( Request $request ) : string Build the target business url.
isWeChatBrowser ( ) : boolean Detect current user agent type.
needReauth ( array $scopes ) : boolean Is different scopes.

Method Details

__construct() public méthode

Inject the wechat service.
public __construct ( Application $wechat )
$wechat EasyWeChat\Foundation\Application

getTargetUrl() protected méthode

Build the target business url.
protected getTargetUrl ( Request $request ) : string
$request Request
Résultat string

handle() public méthode

Handle an incoming request.
public handle ( Illuminate\Http\Request $request, Closure $next, string | null $scopes = null ) : mixed
$request Illuminate\Http\Request
$next Closure
$scopes string | null
Résultat mixed

isWeChatBrowser() protected méthode

Detect current user agent type.
protected isWeChatBrowser ( ) : boolean
Résultat boolean

needReauth() protected méthode

Is different scopes.
protected needReauth ( array $scopes ) : boolean
$scopes array
Résultat boolean